Intermediate Nmap: TryHackMe
Replace TARGET_IP with the active room address. The screenshots show the address from the original session.
1. Scan the target
I ran a default nmap scan:
1
sudo nmap TARGET_IP
The scan listed port 22 as ssh, port 2222 as EtherNetIP-1, and port 31337 as Elite. These are Nmap’s port labels from this default scan, not results from service-version detection: 
2. Read the service hint
Connect to port 31337 to read the supplied account details:
1
nc TARGET_IP 31337
The service returns the SSH username and password.
Recovered SSH credential: ubuntu:Dafdas!!/str0ng
3. Log in and inspect the home directory
1
ssh ubuntu@TARGET_IP
The login starts in a minimal shell. I switched to Bash:
I listed the visible and hidden files. The home directory contained only basic dotfiles.
Search for the flag file:
1
find / -name 'flag.*' 2>/dev/null
The file is /home/user/flag.txt; read it:
1
cat /home/user/flag.txt
Flag:
1
flag{251f309497a18888dde5222761ea88e4}
Findings
My nmap scan listed ports 22 (ssh), 2222 (EtherNetIP-1), and 31337 (Elite). I connected to port 31337 and it gave me the SSH login details. I then logged in and found flag.txt under /home/user. Room: TryHackMe Intermediate Nmap.
What I Learned
The port number alone didn’t tell me much. Connecting to it gave me the useful hint, then ssh got me into the machine (Nmap guide, OpenSSH guide).
