HTB Irked

Lessons Learned

  1. Debian doesn't have the command sudo if root password is set.
  2. steghide extract -sf irked.jpg (steghide exists).
  3. TEST OUT ALL SUIDS THAT DON'T END UP IN DEFAULT.
  4. HexChat is an IRC client.

Walkthrough

I first do an aggressive nmap scan. I find a web server with a few IRC ports open.

I connect via netcat on port 6697, 8067, and 65534. I see some activity going on. The other port, 40542 is not responding. From using IRC in the past, I know I need an IRC client. I download HexChat to use.

I see that the banner version is displaying when I connect. It says Unreal3.2.8.1. I try out some exploits and find this one works the best: https://github.com/Ranger11Danger/UnrealIRCd-3.2.8.1-Backdoor

Open up exploit.py and change the lines to your IP Address and port

Be careful with the shell. If it gets stuck, you will need to restart the box. A trick of mine is to have the shell open up another shell with OpenBSD Netcat. If I quit the second shell, the first shell will go back to normal.

This part I had to look up. I guess you would know to use steghide if you encountered it before. The image contains a pass.txt and with the .backup password, you can open it.

I return to my shell tab and input the password for djmardov.

I tried a few different things to Priv Esc. I was confused on why sudo wasn't on the box. I found a few answers that said something along the lines of this: https://unix.stackexchange.com/questions/106529/why-is-sudo-not-installed-by-default-in-debian. All of my sudo jutsus were trashed. LinPeas wasn't picking up anything. Neither was LinEnum. I ran Lin-Local-Suggester and found DirtyC0w was highly possible. I tried 3 dirtyc0w exploits and they failed. I noticed viewuser in suid and that was the way to escalate.

Comments

Popular posts from this blog

Palo Alto for GNS3 CCDC Tutorial

Release of CCDC ISE Manager Website

Trace Labs Global Missing Persons CTF V