Brooklyn99 CTF (THM)

————————————————————————————————————————————————————————————————————————————————————————

Nmap Scan

Image

I found a ftp server running at port 21, SSH server running at port 22, and a web server at port 80

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Enumerating Web Server

Image

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Login into FTP (using anonymous login)

Image

I got file ‘’note_to_jake.txt’’ and downloaded it into my local machine

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Reading the ‘note’

————————————————————————————————————————————————————————————————————————————————————————

Image

So I got a username and we know that password is weak after reading the note

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Brute Forcing Using Hydra

————————————————————————————————————————————————————————————————————————————————————————

Image

Finally I got a ‘’password’’ using brute-forcing. Let’s login into ssh.

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Login Into SSH

————————————————————————————————————————————————————————————————————————————————————————

Image

I could not find the user flag as I can’t access other user directories.

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

PrivEssc

Image

I found out that as ‘’Jake’’. I can run ‘’less’’ binary as superuser.

————————————————————————————————————————————————————————————————————————————————————————

I found the command on GTFO bin website and finally got the root shell.

Image

————————————————————————————————————————————————————————————————————————————————————————

Image

————————————————————————————————————————————————————————————————————————————————————————

Image

————————————————————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————————————————————

Last updated

Was this helpful?