Upgrade to Pro — share decks privately, control downloads, hide ads and more …

XSS

 XSS

A quick overview of cross site scripting

Mike Klemarewski

April 05, 2016
Tweet

More Decks by Mike Klemarewski

Other Decks in Programming

Transcript

  1. What is it? • Text based attack • Exploits the

    browser's interpreter, allowing the attacker to run code on the target site
  2. What can be done using XSS? • hijack user sessions

    • insert content • redirect users • hijack the user’s browser using malware
  3. Who can do these attacks? • Anyone that can send

    data to the system • Anyone that can craft a url and put it in front of other people
  4. Stored • User input is stored on the server and

    rendered to any user that visits the page • Eg. User reviews, comments, profiles
  5. Reflected • User input is returned by the web application

    and rendered without being sanitized • Eg. Search results
  6. DOM Based XSS • The response doesn't contain the exploit

    payload • Some client side code reads the malicious data from the URL or DOM and executes it
  7. Example attacks • Samy MySpace Worm • Spread through 1

    million users in 20 hours • StrongWebmail CEO email hacked • XSS Worm Examples
  8. Prevention • Properly escape untrusted data • Input validation can

    help, but isn't a full solution • Use sanitization libraries
  9. FIN