CREDS >>

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

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


Discovery >

nmap >

So we can try looks on web page >>

We can found doman creative.thm, so let’s add it to /etc/hosts >>

We can found nice looks web page, but nothing special, but only one thing is there interesting and that are possible usernames for bruteforcing>>

An we can try also we can try brute forcing web page content >>

But nothing special, so we can try looks for subdomain >>

And we can found beta subdomain so we can add it to /etc/host and look on new end point >>

And there is some kind of testing if the page is alive, so let’s test >>

We can try to connect to our machine >>

And success >>

So we can try access some file in our machine >>

And it work >>

So can we read file on server? We can try localhost to get access >>

And work >>

So we can try SSRF to read file /etc/passwd >>

But not work, but we can try anothre port >>

And response is Dead >>

There is a chance that we can fuzz port, maybe there is a port filtering. I used Caido for this action >>

We catch the response >>

And add to Automate section >>

Mark the section and use payload as numbers of port, you can generate by this script >>

An run it >>

There are two ports look different 80 and 1337, so let’s try to look on port 1337 response >>

And big success, we can read files on server!!

In the list of users we can found user saad >>

Maybe have id_rsa file to ssh connect >>

And YES, we can try to connect >>

But we need passphrase for this id_rsa key, so we can try to crack it >>

So we can try connection to saad user SSH >>

AND WORK USER IS DONE !!


ROOT Path >>>

We can start by linpeas.sh >>

There is some spice information >>

There is store password in th history file !! So we can inspect sudo -l >>

And there is ping command to run as ROOT, but what is most interesting is the LD_PRELOAD !!

We can easy exploit this >>

We can make this poison library in /tmp/thesysrat.c

Compiled >>

And use as PRELOAD env variable >>

If everthing goes correctly we can get a root access >>

And we are DONE!

Creative was completely PWNed !!

Happy hacking!!

Leave a Reply

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