bug-slash3. Blind OS command injection with output redirection

Lets open the vulnerable lab:

Move around:

We have this post request and those parameters, lets test those parameters to see if we have blind command injection:

As we can see the email parameter is vulnerable, lets redirect whoami command to the directory mentioned in the objective above:

Lets go back to enumerate the website:

Lets try to open the images in a new tab:

As we can see maybe it fetches the photos from the directory we redirected the whoami command to, lets try:

As we can see we retrieved the output.

Solve it using a python3 script:

Last updated