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 1337/TCP >>

On port 1337 is running web server, let’s inpect >>

And there is a Login page, when we look on source, we can found this comment >

So we can try to fuzz it >>

NOTE: For success fuzzing need end FUZZ/, if not there is no result, because, wfuzz test files, no directories 😉

So what is interesting for us , is hmr_logs directory, lets’s look >>

And there is log file, when we open it we can found e-mail address of tester@hammer.thm >

So we know e-mail, we can try to restore password of this user >

After sending request we have to get 4-digit pin

That is restricted to 180 seconds time loop after that it is time reset.

When we Burp it we can found this request >

So we can try to bypassed, we know that time limit is driven by server. But we can try to send X-Forwarded-For: header and change IP. Maybe server null time limit request before.

For this I create simple script >>

https://github.com/TheSysRat/Hammer–THM

And we can try to run >

And there is, we can try to change password >

And we are in >>

User Flag >>


There is some thing like command injection, so we can try to Burmp it and we will see what is possible >>

When we send this request, we can found some hidden files in dir /var/www/html >

But what is really interesting is file “188ade1.key”, there is probably signature and maybe we can be able to manipulate with JWT token! As user role we have only small possibilities, but if we are able to change to admin role, there will be no restriction for us. Let’s try >>

For this I used jwt.io >>

So what we can changed, we know that “kid” is in /var/www/html/188ade1.key and role will be “admin”, after that we can signature verified but signature from hidden file >>

Grab JWT token and add to Burp and we can try to use >>

And we can what we will, so lets try to grab flag >

And we are DONE!

Hammer machine was PWNed !!

Happy hacking!!

Leave a Reply

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