Indirect Payload - Miscellaneous (MEDIUM) Huntress CTF Writeup

Indirect Payload - Writeup

Visiting the website we get this page:

indrect payload 1

When I clickked on the button, it redirected me to another url, and got error message. Hmmm… It seems as clicking the button results in an endless loop of redirection.

indrect payload 2

indrect payload 3

I then decided to see what is happening using burpsuite.

indrect payload 4

Everytime I sent a GET request to /flag.php site, I got new URLs instead. This was when I decided to follow it manually, and after 2 more redirections I could finally see the first character of the flag.

indrect payload 5

This is when I realized that the flag is scattered through all the URLs that I was forced to redirect to. To save time, I used this python script that follows the urls and prints the payload whenever there is.

indrect payload 6

After running the script, I was able to see whole picture.

indrect payload 7

I first saved the output to a file called “flag.txt” and then ran another python script that parses the output and prints the flag in the correct format.

indrect payload 8

indrect payload 9