GeorgeBanu
  • About me
  • Pentesting CheatSheets
    • Information Gathering
    • Ports Enumeration
      • FTP-21
      • SSH-22
      • Telnet-23
      • SMTP - 25,465,587
      • DNS-53
      • NetBIOS, SMB - 139,445
      • SNMP-161
      • MySQL-3306
      • RDP-3389
      • WinRM-5985
    • Web Cheat Sheet
    • Privilege Escalation
      • Linux Enumeration
      • Linux Privesc Techniques
    • Tricks
    • Template
  • TryHackMe Writeups
    • Starter
    • Dreaming
    • ColddBox: Easy
    • Ollie
    • Blog
    • KoTH Hackers
    • Brooklyn Nine Nine
    • Chill Hack
    • Undiscovered
    • Archangel
    • Jason
    • GLITCH
    • VulnNet: Node
    • Road
    • VulnNet:Internal
    • W1seGuy
  • CyberEDU Writeups
    • flag-is-hidden
    • file-crawler
    • reccon
    • this-file-hides-something
    • wifiland
    • old-tickets
    • inodat
    • pattern
    • ultra-crawl
  • eJPT
Powered by GitBook
On this page
  • Lab Setup
  • Enumeration
  1. TryHackMe Writeups

KoTH Hackers

PreviousBlogNextBrooklyn Nine Nine

Last updated 1 year ago

Lab Setup

mkdir ~/Documents/TryHackMe/koth
cd ~/Documents/TryHackMe/koth
mkdir recon enumeration notes
touch notes/{README.md,creds,vulns}

export IP=10.10.157.94
export URL=http://$IP

Enumeration

Upon obtaining an IP address, my initial step involves conducting a comprehensive scan of the targeted machine for open ports, employing both rustscan and nmap.

Access the ftp server with default user and you will see two files (remember always to use -a when you listing because you might lose some info).

Found 2 users. After I try to enumerate the HTTP port I got nothing so I try to come back to ftp user. Brute force the login password for each user and you will get the passwords for both. Keep in mind that the password are changed every time you deploy the machine, so you need to do this on your own.

hydra -l "username" -P ~/Documents/rockyou.txt $IP ftp 

Note: My path to rockyou.txt database is ~/Documents, so it might differ on your attack machine

In the ftp server you will get two more flags and some info to get access to this machine. Try to login as rccambell user to ssh port with same password as ftp and we have success. When you get the password for the other user you can login and in home directory you will get an id_rsa key to connect with ssh.

I found a vulnerability when I get access to gcrawford user.

Find on Gtfobins how to use that to get root access.

sudo /bin/nano /home/gcrawfor/businness.txt 
^R ^X
reset; sh 1>&0 2>&0

I don't find all the nine flags, but once you have root access you can search for those.