Module 5: Cross-Site Scripting Introduction and Discovery
Introduction to the Sandbox
Accessing the Sandbox
Start the VPN and start the VM. Add the IP to hosts file.
Understanding the Sandbox
Explaining the sandbox webpage.
JavaScript Basics for Offensive Uses
Syntax Overview
Function example
01 function processData(data) {
02 data.items.forEach(item => {
03 console.log(item)
04 });
05 }
06
07 let foo = {
08 items: [
09 "Hello",
10 "Zdravo",
11 "Hola"
12 ]
13 }
14
15 processData(foo)Useful APIs




Starting HTTP listener

HTTP Server Log
Original Keylogging Payload

HTTP Server Log
Cross-Site Scripting - Discovery
Reflected Server XSS
Often found in locations where user input is sent via GET parameters.


It's inside a <div> tag, it may be vulnerable. Testing with HTML injection has less potential for error β this doesn't always mean we can inject JavaScript but is a great indicator.


Encoded search payload


Stored Server XSS









Reflected Client XSS







Mozilla's innerHTML Bypass

Stored Client XSS






PreviousModule 4: Introduction to Burp SuiteNextModule 6: Cross-Site Scripting Exploitation and Case Study
Last updated