CREDS >>

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

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


First what we need is add domain to /etc/hosts >>

Discovery >>

nmap >>

We can try look on page cctv.thm and look around >>

dirsearch >>

OK, there is something looks like hint /mail/ response 200, let’s look on it >>

And we can found message file dump.txt >>

OK, so we have some hint that we should to do.


Task 1 – Send UDP request >>

For simple send UDP request we can use python and socket library >>

Quick script and we can test >>

And we can checked https://cctv.thm/fpassword.php?id=1

And success!


Task 2 – send TCP request with specify User Agent >>

For this task we can try to use python and requests library >>

Quick script and we can test it >>

And let’s check https://cctv.thm/fpassword.php?id=2 >>

And success >>


Task 3 – send ping packet >>

This task is quite tricky, in standard sending ping request is no User-Agent used, but we can manipulate our request over scrapy >>

And checked >>


Task 4 – attempt to login FTP >>

This task is really easy, we can just use standard tool ftp >>

Wait for while and closed it >>

Now we can checked flag >>


Task 5 – send TCP request to flagger.cgi >>

For this task we can use again python and socket library >>

Quick script and let’s test it >

And success, Stage I is done!


Stage II >>>

For access dashboard we can create password as was noted in dump.txt >>

So easy access to dashboard >>

If we look into the source codes, can found this script >>

So lets burp request maybe is there possible command injection over “commands” parameter >>

Let’s try >>

And success!!

So we can try reverse shell >>

And we are in >>


lsb_release -r -s task simple use command as is >>


User able login to admin page >>

We can looks around in the files >>

And we can found it in index.php >>


And finally CCTV admin panel flag >>

There are two options login or look on source code >>

I look on source code and in file dashboard.php we can find flag >>

Tasks are DONE !!


Bonus – Root Path >>>

What we can found, we can start with linpeas.sh >>

But not work, for access mysql…

So we can try to use relatively new exploit CVE-2024-1086 >>

https://github.com/Notselwyn/CVE-2024-1086

So let’s start with clone git and compile >>

After that delivery on server and try >>

And success!! We are ROOT !!

Happy hacking!!

Leave a Reply

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