Writeups

Write ups and Walkthroughs about vulnerable machines

View on GitHub

Bounty Hacker

Back to Tryhackme page


Starting point

Bounty hacker is tryhackme room. Room has tags of linux , tar , privesc and security.


Enumeration

Using nmap , we found 3 open ports. Port 21,22 and 80.

nmap result


Website

Visiting website gave us some story and 4 usernames.

website

Viewing source file shows nothing special.

website source

Started directory enumeration using gobuster also showed no result.

gobuster

Images directory was also not interesting.

images

Nothing interesting found so leaving website end here.


ftp

Focusing of ftp port now. Connecting to ftp as anonymous.

ftp

We got two files named user.txt and locks.txt

ftp result

locks.txt is definitely password file. user.txt shows another username called lin.


Password cracking

Using hydra , started password bruteforce on ssh port. Having no idea to start brute force for which user , created user file where I added all possible usernames. Made mistake here , wrote username with first letter capital so didn’t quite work. After trying lin as user on other terminal found lin is right username.

hydra

Password : RedDr4gonSynd1cat3


SSH

Login SSH , found that user flag was directly located on home path.


User flag

Got user flag easily.

user flag


Root flag

Checked sudo permission for user and tar has sudo permission Cheking gtfobins showed tar exploit for sudo.

gtfobins

Using this gave root permission. Found root flag.

root flag


Source