HTB: Irked
/01-58ff1e1644.jpg)
Using searchsploit and searching IRC shows us theres a backdoor for unreal ircd which theres a metasploit module for
6697/tcp open irc UnrealIRCd
We run it and get a reverse shell, im going to try to do this again later without metasploit.
/02-d41c8bcbc1.jpg)
root:x:0:0:root:/root:/bin/bash
djmardov:x:1000:1000:djmardov,,,:/home/djmardov:/bin/bash
We arent a user on the machine so we need to pivot
ircd@irked:/home/djmardov/Documents$ cat .backup
cat .backup
Super elite steg backup pw
UPupDOWNdownLRlrBAbaSSss
This password extracts a file hidden from the webpage. We extract it with steghide and use the password above and we get a new password file.
Kab6h+m+bbp2J:HG
djmardov:Kab6h+m+bbp2J:HG
/03-730de60389.png)
I ran linux exploit suggester and tried a few exploits but Pwnkit worked
https://github.com/berdav/CVE-2021-4034/
/04-a468a230a2.jpg)
I didnt go back and and do it manually because the other way is just downloading a script that does the same exact thing.
There was another way to get root which I will do here
There is a tool called viewuser which we can use to execute any command as root
/05-f233737d54.jpg)
we echo “sh” into /tmp/listusers and this program executes anything in the file making us root
/06-881640b2ef.png)