HOW I FOUND XSS IN PRIVATE PROGRAM

Hi there, Hope you all are doing great and healthy. Recently i was hacking on a private program and found an reflected xss there. So let us begin.

Let’s talk about the basic question i.e what is XSS?

In simple terms, xss is a vulnerability that allows attacker to embed their code(javascript) into the webpage which could impact it’s user and sometimes even the server.

Now you know the meaning behind xss so let’s quicky jump into the vulnerability.

The first thing which i do while approaching a target is collecting all of the subdomains. After that i look for valid http response code like 2XX,3XX,4XX,5XX etc and then manually visit them one by one. I have created a python script which does all the task and makes my life easy.

After that i have found a subdomain let’s say x.hack.com which have search option enabled. Seeing this, i quickly tried <script>alert(1)</script> but failed.

Then i started digging and tried to find where my payload was reflecting. I found that the payload was reflecting in the escape function inside the script tag.

Knowing this, I tried the following payload:

‘);</script><script>alert(1)</script>

And guess what..It worked!!!

I quickly sent a report to the company but unfortunately it was duplicate.Still, I was overjoyed because this was my second xss report to a company.

Takeaways:

1- Stay Motivated.

2- Gather every bit of information about the target.

3- Always check where the payload is reflecting.

4- Follow the road less traveled ;)

Thanks for reading. Please forgive me if my English was not good enough. See you all soon!

Till then, Please stay at home and be safe. :)

UPDATE: If anyone who is interested in hacking windows with just python then they can enroll the course below for free! Just use “FEBHACK” in the coupon.

Course Link: https://www.udemy.com/course/hacking-windows-with-python-from-scratch-2022/?referralCode=1647ED5816EFD5D2F2EB

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store