On this page 6 sections
1. Build the map before choosing an exploit
Record every host, port, service, version, hostname, credential and route. Start broad, then run focused scans against discovered services. Check all TCP ports when the first scan does not explain the lab: preparation CTFs often place FTP or web services on non-standard ports.
nmap -Pn -sS --top-ports 1000 --open -oA scans/quick <TARGET>nmap -Pn -p- --open -oA scans/all-tcp <TARGET>nmap -Pn -sC -sV -p <PORTS> -oA scans/services <TARGET>2. Enumerate by service, not by tool
For each open port, answer four questions: what is it, which version/configuration is exposed, what can be accessed anonymously, and what new usernames, files or hosts does it reveal? Reuse discoveries across services. A username from SMTP, a password from a backup and a hidden SMB share may form one path.
HOST | PORT | SERVICE | VERSION | ACCESS | FINDING | NEXT TEST3. Web reconnaissance before payloads
Inspect headers, source, robots.txt, common backup files, exposed .git data, virtual hosts, directories and supported methods. If authentication is present, identify its type before testing credentials. Treat uploads and writable shares as execution paths only after proving where files are served.
curl -i http://<TARGET>/
whatweb http://<TARGET>/
ffuf -u http://<TARGET>/FUZZ -w <WORDLIST> -fc 404curl -i -X OPTIONS http://<TARGET>/4. Validate access carefully
Try anonymous and null-session access before password testing. Keep credential attacks small and targeted: start with usernames and wordlists supplied or discovered in the lab, watch for lockouts, and stop when evidence disproves the path.
smbclient -L //<TARGET>/ -N
netexec smb <TARGET> -u '' -p '' --sharesnmap -p <PORT> --script ftp-anon,ftp-syst -sV <TARGET>5. Re-enumerate after every foothold
A shell changes the visible attack surface. Identify the user, interfaces, routes, listening services, credentials and writable paths. Internal-only services and a second subnet are signals to pivot. Add the route first, verify reachability, then scan through the pivot with techniques compatible with the tunnel.
id; hostname; ip addr; ip route; ss -lntup; sudo -lwhoami /all
ipconfig /all
route print
netstat -ano6. Exam discipline
Keep notes as you work, save scans, answer from direct evidence and revisit unresolved services when progress stalls. The useful cycle is enumerate, form a hypothesis, run the smallest validating test, record the result and enumerate again. Do not let one exploit attempt replace methodology.