SpeedHacking on Youtube >>

CREDS >>

TryHackMe – https://tryhackme.com/p/TheSysRat

HackTheBox – https://app.hackthebox.com/profile/1298347


TryHackMe >>

https://tryhackme.com/r/room/thenewyorkflankees


Recon >>>

nmap >>

Port 8080/TCP >>

There is Custom web page, so let’s inspect >>

When we click on link Test we are redirected to /debug.html page and there we can found this >>

If we try to ask API for login hardcoded blob it is success !! >>

If is in blob any mistake there is a Error message >>

So we can try padding oracle attack for brute Oracle Pad >>

There are many possibilities for tools like padbuster, unlocker and etc. I choose this tool called “Padre”>>

https://github.com/glebarez/padre

So let’s attack >>

AND SUCCESS !! We can try to login >>

Now we have one other option “DEBUG” >>

And there we can execute some commands, so let’s try >>

We can try if we can get some content from our server and upload reverse shell >>

Just simple prepare python http.server >

And try to get touch >>

And there it is !! So we can try to prepare reverse shell, I chose python3 reverse shell and save “rev.sh” >>

And try to upload and execute >>

Upload rev. shell to /tmp/rev.sh >

Set execution attribute >>

Set listener to our port >>

And execute >>

If everything is correct we will get a rev. shell >>

How you can see we are in Docker container, so we can try to escape >>

For enumerate I used deepce.sh, really great tool >>

https://github.com/stealthcopter/deepce

So we can start with enumeration >>

And there we can found this >>

Docker Sock is mounted, so let’s check if is writeable >>

And success !! We can use this breakout technique >>

https://book.hacktricks.xyz/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation

Exploitation >>

We looking for an other Docker containers, if we have luck we can escape to root machine >>

And YES we escape from Docker container to physical machine!!

And we are DONE!

New York Flankees was completely PWNed !!

Happy hacking!!

Leave a Reply

Your email address will not be published. Required fields are marked *