An Interest In:
Web News this Week
- March 3, 2024
- March 2, 2024
- March 1, 2024
- February 29, 2024
- February 28, 2024
- February 27, 2024
- February 26, 2024
$350 XSS in 15 minutes
Hello
This is my first and last Bug Bounty Writeup this year.
I am sharing with you my latest XSS finding, which Ive found 2 weeks ago.
This was the fastest and a bit unusual flow that I normally do when I search for XSS.
So lets dive in
- Company asked me to retest an old XSS report.
- Ive checked that XSS and confirmed that it was fixed properly.
- The specific endpoint had
name
a param that was vulnerable to Reflected XSS injection.
example.com/profile?name=<img+src=1+onerror=alert(1337)>
- Ive started to search for a bypass and used the Search function in Chrome Developer tools to search this endpoint
/profile
in all JS files to check for another vulnerable param, but found another endpoint:
example.com/services
- The first idea that came to my mind was to put this URL in the google search engine and see if this endpoint was cached somewhere on the google web space with params.
- After the first try, I found a cached endpoint with params on the first page of the results, the endpoint had ID param and some other params.
example.com/services?id=123&page=Demo
- Ive added my payload
qwe'"<X</
to the ID param and started to check if anything is reflected somewhere on the webpages source code.
example.com/services?id=123qwe'"<X</
- Besides that, Ive opened the Network tab in Chrome Developer tools to check all requests that this endpoint might send somewhere.
- After the second refresh of the page, I found an interesting AJAX request that used the JSONP callback param together with the ID param from the endpoint itself. The AJAX request URL was similar to this:
lib.com/find?id=123qwe&jsonp=cb12
- The first thing that I tested was the JSONP param itself, to see if I can change it to an
alert
function with a custom parameter - To my surprise, there was no check for JSONP value, so I easily changed it to
alert(1337);
- Now it was time to check the ID param once again and see if it accepts other symbols, for example,
%
sign to craft an encoded payload in order to add custom parameters to AJAX URL. - Ive changed the endpoint URL to
example.com/services?id=1%26jsonp=alert(1337);%23
- When JS processed it, it transformed
%26
to & and%23
to #. Everything that is behind the # (hashtag) symbol is ignored by the browser. The final AJAX call looked like this:
lib.com/find?id=1&jsonp=alert(1337);#&jsonp=cb12
- Using this AJAX URL manipulation (parameter pollution attack) I have successfully triggered an alert box with text
1337
. This confirmed the DOM XSS vulnerability existence and I have received a $350 bounty, with an additional $50 for a retest of an old report.
Thanks for reading!
P.S. Im working on a book for beginners in Bug Bounty world. This book will include Networking, HTML & JavaScript basics, a short description of widespread vulnerabilities, and an in-depth analysis of XSS vulnerability with examples, tips, tools, and tricks. At the end of the book, I will teach you how to create and deploy your own NodeJS service for testing Blind-XSS / SSRF vulnerabilities.
P.S.S. Stay tuned for updates and dont forget to subscribe at least somewhere so you wont miss any info regarding the book.
Happy Holidays & Happy New Year!
Sharing Bug Bounty Tips on
LinkedIn https://linkedin.com/in/therceman
Instagram https://instagram.com/therceman
Telegram https://t.me/therceman
TikTok https://tiktok.com/@therceman
YouTube https://youtube.com/therceman
Twitter https://twitter.com/therceman
Anton (therceman)
Original Link: https://dev.to/therceman/350-xss-in-15-minutes-13c3
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To