ูุง ุชูุณุง ุงูุฏุนุงุก ูู ุงุฎูุงุชูุง ูู ุบุฒุฉ
๐ฅ Introduction
ุงูุณูุงู ุนูููู ๐ My name is Abdelmonem Reda, a beginner bug hunter ๐, and this is my first write-up on Medium โ๏ธ. I hope you enjoy reading it ๐
For policy reasons, we will assume that the target website is called example.com.
๐งญ Reconnaissance Phase
I started with normal reconnaissance:
- ๐ Enumerating subdomains
- โก Using httpx to probe live hosts
- ๐งช Then I used a tool called virustotalx, which was created by orwagodfather
I'm still not very experienced with this tool, but it's actually useful if you want to collect interesting URLs to test ๐.
๐ฏ Finding the Target
After finishing recon, I started reviewing the discovered subdomains and found this one:
https://caree.example.com/job-search-resultsAt first glance, it looked normal and didn't seem interesting ๐ค, but I decided to check it anyway.
When I opened the page, I found a job search system ๐ผ where users can search for jobs based on their needs and location.
While inspecting the page, I noticed an HTML <select> element with multiple <option> values.
Since I had previously found XSS vulnerabilities in HTML select elements โ ๏ธ I decided to test this one as well.
๐งจ Discovering the Vulnerability
I found a parameter called category.
As soon as I injected the value:
Abdo"I noticed that an <a> tag was added to the HTML code, with an attribute called aria-label.
I also observed that my injected value was reflected inside the aria-label attribute, appearing as follows:
aria-label="Removed Abdo" "=""At that point, I immediately knew this was an XSS vulnerability ๐จ.
๐ก๏ธ Initial Payload & WAF Issues
I tried my first payload:
Abdo" autofocus onfocus=alert()But it didn't work โ.
It turned out that there was a WAF blocking the payload ๐งฑ. I spent around 8 hours โฑ๏ธ trying to bypass it.
WAF Behavior:
- ๐ซ It blocked any HTML event handlers such as:
onclickonfocusonmousemove- etc.
- ๐ซ It also blocked parentheses
()
like: onfocus=alert('hay')
๐ Bypass Attempts
I tried many techniques, including:
- ๐งฌ Using null bytes
- ๐ฃ Adding special characters to events to evade detection
None of these worked ๐.
Then I tried injecting a closing tag:
</a>But I noticed that it was completely removed โ๏ธ.
For example, when I injected:
https://caree.example.com/job-search-results/?category=</a>It was transformed into:
https://caree.example.com/job-search-results/?category=๐ก New Idea
At this point, I thought:
What if I place the closing tag inside the event name itself? ๐คฏ
The idea was that the WAF would remove the tag while parsing the URL and then continue processing the remaining payload without detecting the event handler.
So I crafted this payload:
https://caree.example.com/job-search-results/?category=Abdo"autofocus onfo</select>cus=(alert)('hay')Unfortunately, it still didn't work ๐.
After inspecting the HTML again, I realized that the <a> tag was no longer being injected, which explained why the payload failed.
๐ Final Breakthrough
After 5 more hours โณ of testing and almost giving up, I decided to try one last thing: testing another parameter ๐ฏ.
I crafted the following payload:
https://caree.example.com/job-search-results/?category=Abdo">&employment_type=Abdo"autofocus onfo</select>cus=(alert)(docum</select>ent.cookie)๐ And it worked! ๐
๐ Reporting
I was extremely happy ๐ and immediately submitted a bug bounty report ๐. The report was successfully triaged โ , ุงูุญู ุฏ ููู ๐คฒ.
๐ Final Advice
If you want a piece of advice: Keep learning , keep practicing , and leave the results to Allah ๐คฒ. If this field is written for you, you will succeed โ no matter what