CREDS >>

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

HackTheBox (aka TheSysRat)


Discovery >>>

nmap >>

Nothing interesting here …

We can look for subdomains, but no luck.

So we can inspect web-site >

dirseach >>

And there we can find some interesting files and directories >

Port 80/tcp >>

Looks normal Wappalyzer didn’t found something special >

In /v2/ we can found a login page to administration >

So we can try to register new account >

NOTE: 10 digit mobile number you can take as you wish.

After sing in we can see any administration page >

In profile setting we can see, that we can upload a avatar >

And that is not all … in source code we can found something special >

So we can try to upload an image and test, if it is working >

And there is and error >

So we can try to modify a user account, so let’s try. I find a ResetUser in panel. So start BurpSuite and try to inspect a request >

We know a admin email and that is a username to login, so let’s try to modify >

Shows like success >

We can try to login as admin >

And success we can upload a image or reverse shell? 🙂 >>

So I try to upload a check if is path correct and result is great, it works >

User flag >>>

So we can try to upload PHP reverse shell, I today use p0wny-shell

https://github.com/flozz/p0wny-shell

Upload correctly, let’s try >>

And can get a regular shell >>

After short recon, we can found this >

On port 27017 is running MongoDB, so we can try to access >

And success we can found backup database and there is a username and password.

So let’ try to connect >>

So USER FLAG is DONE !!


ROOT Path >>>

We can try sudo -l >>

And there is it ” env_keep+=LD_PRELOAD ” >>

Prepare >>

Exploitation >>

So we completely PWNed this machine !!

Happy hacking and see you next time ;-).

Leave a Reply

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