TryHackMe · Medium
Basic Pentesting
Room focused on fundamental penetration testing skills: service enumeration, SMB analysis, brute-forcing SSH credentials, and Linux privilege escalation via weak file permissions. Good introduction to a real pentesting workflow.
nmap
enum4linux
hydra
ssh
find
john
1. Reconnaissance
Start with a full port scan to discover all open services on the target.
$ nmap -sV -sC -p- --min-rate 5000 10.10.x.x
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.2p2
80/tcp open http Apache httpd 2.4.18
139/tcp open netbios-ssn Samba smbd 3.X - 4.X
445/tcp open netbios-ssn Samba smbd 4.3.11
8009/tcp open ajp13 Apache Jserv
8080/tcp open http Apache Tomcat 9.0.0.M1
Found: SSH, HTTP (Apache + Tomcat), SMB (Samba 4.3.11)
Enumerate SMB shares and users with enum4linux to find potential attack vectors.
$ enum4linux -a 10.10.x.x
[+] Getting domain info...
Domain Name: WORKGROUP
[+] Enumerating users...
user:[kay] rid:[0x3e8]
user:[jan] rid:[0x3e9]
[+] Share Enumeration...
Sharename: Anonymous Access: READ
Discovered users: kay and jan — targets for brute force
Key Takeaways
Always enumerate SMB — usernames found there enabled the whole attack chain
Weak SSH passwords are still common — hydra + rockyou is effective
Encrypted SSH private keys can be cracked offline with John the Ripper
sudo misconfiguration (vim, less, python) = instant root via GTFOBins