Enumeration is 80% of network pentesting. Exploits are rare and dramatic; enumeration is constant and quietly wins engagements. Scanners tell you a port is open; this chapter tells you what to do with each one. Keep notes per service: versions, users, shares, creds.
SMB (445/139) — the internal goldmine
SMB leaks users, shares, policies and often lets you read files anonymously.
# One tool to rule internal enum: NetExec (nxc)
nxc smb 10.10.10.0/24 # host list + signing + OS
nxc smb 10.10.10.10 -u '' -p '' --shares # null-session shares
nxc smb 10.10.10.10 -u guest -p '' --users --rid-brute
# Classic alternatives
smbclient -L //10.10.10.10 -N # list shares, no creds
smbmap -H 10.10.10.10 -u guest # share + permission map
enum4linux-ng -A 10.10.10.10 # everything, parsedQuick wins: readable shares with configs/scripts/backups; SMB signing not required (relay target, Ch. 8); MS17-010 (EternalBlue); passwords in \\host\SYSVOL scripts.
LDAP (389/636) — the directory
On a domain controller, LDAP hands you the entire user and group list, sometimes anonymously.
# Anonymous bind — dump naming contexts, then users
ldapsearch -x -H ldap://10.10.10.10 -s base namingcontexts
ldapsearch -x -H ldap://10.10.10.10 -b "DC=corp,DC=local" "(objectClass=user)" sAMAccountName description
nxc ldap 10.10.10.10 -u user -p pass --usersQuick win: passwords in the description field (depressingly common), and service accounts you can target later.
SNMP (UDP 161) — the talking device
A default community string (public/private) turns a router, printer or server into an open book: interfaces, routes, processes, sometimes credentials.
onesixtyone -c /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt 10.10.10.10
snmpwalk -v2c -c public 10.10.10.10 # whole MIB
snmpwalk -v2c -c public 10.10.10.10 1.3.6.1.4.1.77.1.2.25 # Windows users
snmp-check 10.10.10.10 -c publicSSH (22)
nmap -p22 --script ssh2-enum-algos,ssh-auth-methods 10.10.10.10
nxc ssh 10.10.10.10 -u users.txt -p passwords.txt --continue-on-successQuick wins: weak/default creds, key-based auth with a leaked key, username enumeration on old OpenSSH, and SSH used as a pivot (Ch. 8).
FTP (21)
nmap -p21 --script ftp-anon,ftp-syst 10.10.10.10
ftp 10.10.10.10 # try anonymous:anonymousAnonymous FTP with write access can mean a web-root upload or a staging spot for tools.
SMTP (25/587)
# User enumeration via VRFY/EXPN/RCPT
smtp-user-enum -M RCPT -U users.txt -t 10.10.10.10
nmap -p25 --script smtp-commands,smtp-open-relay 10.10.10.10An open relay is a finding; VRFY/RCPT confirms valid usernames for spraying.
NFS (2049)
showmount -e 10.10.10.10 # exported shares
mkdir /mnt/nfs && mount -t nfs 10.10.10.10:/export /mnt/nfs -o nolockQuick win: world-readable exports, and no_root_squash (write a SUID binary as root → local privesc if you have a foothold).
RDP (3389)
nmap -p3389 --script rdp-ntlm-info,rdp-enum-encryption 10.10.10.10
nxc rdp 10.10.10.10 -u users.txt -p 'Winter2026!' # spray carefully — lockouts!rdp-ntlm-info leaks the hostname and domain for free.
Databases (MySQL 3306, MSSQL 1433, PostgreSQL 5432, Mongo 27017, Redis 6379)
nmap -p3306 --script mysql-empty-password,mysql-info 10.10.10.10
nxc mssql 10.10.10.10 -u sa -p '' --local-auth
redis-cli -h 10.10.10.10 # often no auth at all → config/keys
mongo --host 10.10.10.10 # often no authQuick wins: blank sa/root, Redis/Mongo with no auth, and MSSQL xp_cmdshell for command execution if you get in.
Web (80/443/8080/8443)
Full web testing is its own discipline (see our Web VAPT guide), but on a network test, triage every web port fast:
whatweb http://10.10.10.10
nuclei -u http://10.10.10.10 -severity medium,high,critical
ffuf -u http://10.10.10.10/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,301,302,401,403Quick wins: default creds on admin panels (Tomcat, Jenkins, iDRAC, printers), exposed /.git, known-CVE appliances.
The enumeration mindset
For every open port ask:
1. What exactly is it? (version)
2. Can I touch it without creds? (anon/null/default)
3. What does it leak? (users, shares, config)
4. Does this version have a known exploit?
5. Does it give creds I can reuse elsewhere?Credential reuse is the thread that ties a network together: a password from a share script often unlocks SSH, RDP and the domain.
🧪 Lab
- On Metasploitable or a lab AD box, enumerate SMB with
nxc,smbmapandenum4linux-ng. Find a readable share and something useful in it. - Find an SNMP service, guess the community string, and
snmpwalkit. - Enumerate SMTP users with
smtp-user-enum. - Check every database port for blank/default credentials.
- Build a single "creds found" note and list which other services each credential might unlock.
Checkpoint
- Why is enumeration more important than exploitation in most engagements?
- What can a null SMB session give you?
- Where do passwords hide in LDAP, and how do you find them?
- What makes a default SNMP community string dangerous?
- What is credential reuse, and why does it decide most internal tests?