Network Service Enumeration
After scanning (see Nmap in Depth) you know which ports are open; enumeration digs into each service to extract everything useful: exact versions, users, shares, configurations, default credentials and known vulnerabilities. It is the phase that decides the attack vector: an open port is a question, enumeration is the detailed answer.
Why it matters
Section titled “Why it matters”Most internal compromises start not with a 0-day but with a misconfigured service that enumeration brings to light: a world-readable SMB share, an SNMP with the public community, a passwordless database. Enumeration turns a list of ports into a prioritized list of vectors. Doing it well saves hours of blind exploitation.
flowchart LR
P[Open port] --> B[Banner: software + version]
B --> A[Anonymous/default access?]
A --> E[Protocol enumeration]
E --> C["Version -> CVE"]
C --> V[Prioritized attack vector]
Per-service methodology
Section titled “Per-service methodology”For each open port the process is systematic:
- Banner grabbing: identify the exact software and version (
nc,nmap -sV). - Anonymous or default access: does it allow anything without credentials?
- Protocol-specific enumeration: users, shares, databases, configuration.
- Default or weak credentials.
- Version → CVE: cross-reference with
searchsploitandnuclei.
Manual banner grabbing
Section titled “Manual banner grabbing”nc -nv 10.0.0.5 21 # connect and read the banner (FTP, SMTP, etc.)curl -sI http://10.0.0.5 # HTTP headersopenssl s_client -connect 10.0.0.5:443 # TLS servicesnmap -sV --script=banner 10.0.0.5Key services and where to go first
Section titled “Key services and where to go first”Each open port suggests a specific enumeration line:
- 21 FTP — anonymous access? vulnerable version?
- 22 SSH — version, authentication methods, valid users.
- 25 SMTP —
VRFY/EXPNto enumerate users; open relay. - 53 DNS — zone transfer (see DNS Attacks).
- 110/143 POP3/IMAP — mail, sometimes without TLS.
- 111 RPC / 2049 NFS — accessible exports.
- 139/445 SMB — shares, users, null session (the juiciest on Windows).
- 161 SNMP — community strings (
public/private) → MIB dump. - 389 LDAP — directory enumeration (AD, see Active Directory Enumeration).
- 1433/3306/5432 — MSSQL / MySQL / PostgreSQL.
- 3389 RDP — users, NLA, patching (BlueKeep).
- 5985 WinRM — remote execution with credentials.
Per-service enumeration tools
Section titled “Per-service enumeration tools”# all-in-onenxc smb 10.0.0.5 # NetExec: smb/ldap/ssh/mssql/winrm/ftp
# SMB (the richest)enum4linux-ng -A 10.0.0.5smbclient -L //10.0.0.5 -Nsmbmap -H 10.0.0.5nxc smb 10.0.0.5 -u '' -p '' --shares --users
# SNMPsnmpwalk -v2c -c public 10.0.0.5onesixtyone -c communities.txt 10.0.0.5
# SMTPsmtp-user-enum -M VRFY -U users.txt -t 10.0.0.5
# NFSshowmount -e 10.0.0.5SMB: the star service
Section titled “SMB: the star service”On Windows networks, SMB (445) is usually the gold mine: null sessions, readable shares, enumerable users and the door to the domain.
nxc smb 10.0.0.0/24 # sweep: OS, name, signing, SMBv1nxc smb 10.0.0.5 -u '' -p '' --shares # null sessionenum4linux-ng -A 10.0.0.5 # users, groups, shares, policyFrom version to exploit
Section titled “From version to exploit”searchsploit vsftpd 2.3.4nmap --script=smb-vuln* -p445 targetnuclei -t http/cves/ -u http://targetBlue Team
Section titled “Blue Team”Reducing enumerability is the defensive goal:
- Do not expose unnecessary services; each disabled service is one fewer vector.
- Disable anonymous access (FTP, SMB null sessions, SNMP
public). - Change default credentials and enforce strong authentication.
- Hide or normalize version banners where possible.
- Enforce SMB signing and disable SMBv1.
- Segment so not everything is reachable from any host.
- Monitor enumeration patterns: many queries to one service from a single source.
Checklist
Section titled “Checklist”- Banner grabbing of each open port
- Anonymous/default access tested (FTP, SMB, SNMP)
- SMB: shares, users, null session, signing (nxc/enum4linux-ng)
- SNMP: community strings and MIB walk
- SMTP: user enumeration (VRFY) and relay
- NFS: accessible exports (showmount)
- Databases: access with default credentials
- Versions cross-referenced with CVE (searchsploit/nuclei)