Unlocking XSS Vulnerabilities: A Simple Technique for Bug Hunters

ABDELKARIM MOUCHQUELITA
3 min readSep 13, 2023

--

Simple Trick To Get XSS

السلام علیکم و رحمة الله

Simplifying XSS Vulnerability Discovery

There are numerous techniques for exploiting Cross-Site Scripting (XSS) vulnerabilities, but one stands out as particularly potent: the discovery of (GET, POST) parameters. While it may not seem overly complex, it does require a certain level of knowledge and finesse.

But sometimes, even the tools for parameter fuzzing may yield no results; that’s when this trick can come to your rescue.

The Approach

Begin with a target domain reconnaissance (collecting endpoints) using gau, filtering for interested endpoints with a “200” status code using httpx. This yields promising endpoints for further investigation.

gau www.target.com | grep -v -e js -e css -e svg -e png -e jpg -e eot -e ttf -e woff | httpx -mc 200

The Discovery

I identify a simple webpage with an error message div.

Inspect the source code of this page for get “id” attributes.

Testing them as GET parameters, like adding “helloworld” to the URL, can reveal reflected input in the error message div — a potential XSS vulnerability.

then i try simple xss payload and it works good

by allah bless and this trick i got a valid rxss:

Conclusion

In your quest for uncovering vulnerabilities, always remember to examine your target’s source code meticulously. Pay particular attention to the presence of “ids” attributes and experiment by testing them as GET parameters. This simple but effective practice can lead to the discovery of significant security flaws.

Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog if you liked them.

LinkedIn

--

--

ABDELKARIM MOUCHQUELITA

Python Ninja, CTF Player and I Break Into Machines When They Refuse to Have A Peaceful Conversation.