SpeedHacking on Youtube >>

CREDS >>

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

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


TryHackMe >>

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


Recon >>>

We can add publisher.thm to /etc/hosts

nmap >>

Port 80/TPC >>

Looks normal, but there is some hints >

For example link to this blog describe this RCE >>

So we can found this public exploit >

https://github.com/nuts7/CVE-2023-27372

So we can try >>

We can brumped page http://publisher.thm/spip/spip.php?page=spip_pass&lang=fr and try exploit >>

We can generate payload by exploit and add it to Repeater as parameter ‘oubli’ >

And finaly work, because I’m lazy I slittely change script do print out command response in console you can get it from GitHub >>

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

Usage is really simple >

And try >>

Work well, so what is interesting, we know user ‘think’, maybe we can found ssh key of this user >

And there is so we can try to login and get USER Flag >>

AND WORK USER IS DONE !!


ROOT Path >>>

In the beginning there is a hint >>

OK let’s look what is restrict >>

First what we can found is this >

For user ‘think’ is default ash, so we can look in apparmor if is something restrict and really are some restriction there>

It looks that something is hidden inside /opt/ folder we can try to look inside but >>

OK, but we will try to change ash to bash if it is possible >

We change it but still is restricted, I think it is because we are running bash inside /bin folder, so we can try to copy to /tmp or /dev/shm maybe it will help >

And it works!!

And we can check our privileges and we can write to this file!

In quick running linpeas.sh we can found this SUID >>

OK, we can look on this file closer >>

Let’s try to find some strings >

And there is something interesting, SUID app runs script in /opt/ folder, so we can try to change run_containre.sh and try to run this SUID app.

I tried just simple add ‘bash -p’ in the beginning >>

And try if it works >

And work perfectly !!

And we are DONE!

Publisher was completely PWNed !!

Happy hacking!!

Leave a Reply

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