Tuesday, June 24, 2014

A3 Cross-Site Scripting (XSS)

XSS flaw occurs whenever an application takes untrusted data and sends it to a web browser without proper validation or escaping. XSS allows attackers to execute scripts in the victim’s browser which can hijack user session, deface websites, or redirect the user to malicious sites.
Types of XSS:
  1. Server Side Attack
    1. Stored XSS / Presistent XSS
    2. Reflected XSS / Non-Persistent XSS
  2. Client Side XSS
    1. Stored XSS / Persistent XSS
    2. Reflected XSS / Non-Persistent XSS
    3. DOM Based XSS 
Possible Attack:
  1. Attacker can access any cookies.
  2. Attacker can hijack user session.
  3. Attacker can retrieve sensitive information retained by browser.
  4. Attacker can rewrite the content of HTML page.
  5. Attacker can redirect user to malicious site.
  6. Attacker can deface website. 
Impacts on Security:
  1. Attack on Confidentiality
  2. Attack on Integrity
Detectibility   : Easy
Exploitability : Average
Impact          : Moderate
How to Prevent:
  1. Turn off HTTP TRACE support on all web server.
  2. Properly escape all untrusted data based on the HTML content (body, attribute, JavaScript, CSS, or URL) that the data will be placed into.
  3. Positive or “White-list” input validation is recommended.

No comments:

Post a Comment