pentesting, updated

Testing for reflected cross site scripting

Check whether input is echoed back into the response unescaped, letting an attacker-supplied script run in the victim's browser via a crafted link.

Goal

Confirm every reflected input point escapes or encodes output for its context (HTML body, attribute, JS string, URL).

How to test

Inject a harmless marker into every parameter, header and path segment, and check where it lands unescaped:

curl -s "https://example.com/search?q=<script>alert(document.domain)</script>"
curl -s "https://example.com/search?q=%22%3E%3Cimg%20src=x%20onerror=alert(1)%3E"

Test the context-appropriate payload: HTML body (<script>), attribute (" onmouseover=alert(1) x="), JS string (';alert(1);').

What to look for

The payload reflected back without encoding, and executing when you load the response in a browser.

References

§ home
~/knubertus/home/
1,1 Top