This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Difference between revisions of "OWASP Proactive Controls"
From OWASP
m |
m |
||
Line 146: | Line 146: | ||
Persistent XSS (or Stored XSS) occurs when an XSS attack can be embedded in a website database or filesystem. This flavor of XSS is more dangerous because users will already be logged into the site when the attack is executed. Reflected XSS occurs when the attacker places an XSS attack at the end of a URL and tricks a victim into visiting that URL. When a victim visits this URL, the XSS attack is launched. This type of XSS is less dangerous since the victim needs to be tricked into visiting the dangerous link and must already be logged into the site. | Persistent XSS (or Stored XSS) occurs when an XSS attack can be embedded in a website database or filesystem. This flavor of XSS is more dangerous because users will already be logged into the site when the attack is executed. Reflected XSS occurs when the attacker places an XSS attack at the end of a URL and tricks a victim into visiting that URL. When a victim visits this URL, the XSS attack is launched. This type of XSS is less dangerous since the victim needs to be tricked into visiting the dangerous link and must already be logged into the site. | ||
− | Contextual output encoding is a crucial programming technique needed to stop XSS. This is performed on output, when you’re building a user interface, at the last moment before untrusted data is dynamically added to HTML. Forms of encoding needing to stop XSS include HTML Entity Encoding, JavaScript Encoding and Percent Encoding (aka URL Encoding). Encoding needed to stop other forms of injection include Unix encoding, Windows encoding, LDAP encoding, XML encoding and others. OWASP's Enterprise Security API (ESAPI) provides encoders for these functions. | + | Contextual output encoding is a crucial programming technique needed to stop XSS. This is performed on output, when you’re building a user interface, at the last moment before untrusted data is dynamically added to HTML. Forms of encoding needing to stop XSS include HTML Entity Encoding, JavaScript Encoding and Percent Encoding (aka URL Encoding). Encoding needed to stop other forms of injection include Unix encoding, Windows encoding, LDAP encoding, XML encoding and others. OWASP's Enterprise Security API (ESAPI) provides encoders for these functions in Java. In .NET 4.5, the [http://msdn.microsoft.com/en-us/library/system.web.security.antixss.antixssencoder%28v=vs.110%29.aspx AntiXssEncoder Class] provides CSS, HTML, URL, JavaScriptString and XML encoders - these encoders and other encoders for LDAP and VBScript are included in the open source AntiXSS library). |
'''Key References''' | '''Key References''' | ||
Line 285: | Line 285: | ||
It is important not to log too much, or too little - be careful not to log private or confidential data or secrets. Use knowledge of the intended purposes to guide what, when and how much. To protect from Log Injection aka Log Forging, make sure to perform validation or encoding on untrusted data before logging it. | It is important not to log too much, or too little - be careful not to log private or confidential data or secrets. Use knowledge of the intended purposes to guide what, when and how much. To protect from Log Injection aka Log Forging, make sure to perform validation or encoding on untrusted data before logging it. | ||
− | The [[OWASP AppSensor Project]] is a conceptual framework and methodology that offers prescriptive guidance to implement intrusion detection and automated response into an existing application: where to add sensors or [https://www.owasp.org/index.php/AppSensor_DetectionPoints detection points] and what | + | The [[OWASP AppSensor Project]] is a conceptual framework and methodology that offers prescriptive guidance to implement intrusion detection and automated response into an existing application: where to add sensors or [https://www.owasp.org/index.php/AppSensor_DetectionPoints detection points] and what [https://www.owasp.org/index.php/AppSensor_ResponseActions response actions] to take when an exception is encountered in your application. |