Module 04 — Enumeration
Extracting detailed information from discovered services, systems, users, and network resources.
Info
Module 04 — Enumeration. Extracting detailed information from discovered services, systems, users, and network resources.
What is Enumeration?
Enumeration is the process of extracting detailed information from a target after identifying live hosts, open ports, and services during the scanning phase.
Unlike scanning, which tells us what is available, enumeration tells us what information we can gather from those services.
Why Do We Perform Enumeration?
Purpose:
- Identify users and groups
- Discover shared resources
- Find software versions
- Retrieve banners
- Collect domain information
- Enumerate DNS records
- Identify databases
- Discover hidden web content
- Find misconfigurations
- Prepare for exploitation
Scanning vs Enumeration
| Scanning | Enumeration |
|---|---|
| Finds live hosts | Extracts information from hosts |
| Finds open ports | Retrieves detailed service information |
| Detects services | Enumerates users, shares, directories, databases, etc. |
| Fast | More targeted |
| First phase | Second phase |
Enumeration Workflow
Scanning
|
v
Enumeration
|
v
Information Gathering
|
v
Attack Planning
- Scanning — discover live hosts, open ports and running services.
- Enumeration — query each discovered service for detailed information.
- Information Gathering — consolidate users, shares, versions, records and misconfigurations.
- Attack Planning — select the most appropriate and efficient attack path.
Windows Enumeration
1. Nmap
Purpose
General enumeration of services, versions, OS, and NSE scripts.
Why use it?
- Detect service versions
- Enumerate SMB
- Enumerate FTP
- Enumerate HTTP
- Enumerate SNMP
- Run NSE scripts
Example:
nmap -sV -A <IP>
Official Download: Nmap Downloads
2. enum4linux-ng
Purpose
Enumerate Windows SMB and Samba services.
Why use it?
- Users
- Groups
- Shares
- Password policy
- Domain information
- NetBIOS names
Example:
enum4linux-ng <IP>
Official Download: enum4linux-ng GitHub
3. CrackMapExec / NetExec
Purpose
SMB, WinRM, MSSQL, LDAP, and Active Directory enumeration.
Why use it?
- Check credentials
- Enumerate shares
- Domain information
- Logged-in users
- Sessions
- AD information
Example:
netexec smb <IP>
Official Download: NetExec GitHub
4. rpcclient
Purpose
Enumerate Windows RPC services.
Why use it?
- Users
- Groups
- Domain SID
- Password policy
Example:
rpcclient -U "" -N <IP>
Official Download: Included with the Samba Project
5. smbclient
Purpose
Access SMB shares.
Why use it?
- List shares
- Browse files
- Download files
Example:
smbclient -L //<IP>
Official Download: Included with the Samba Project
Linux Enumeration
1. Nmap
Purpose
Service and version enumeration using NSE scripts.
Example:
nmap -sV -A <IP>
Official Download: Nmap Downloads
2. Nikto
Purpose
Enumerate web servers.
Why use it?
- Dangerous files
- Default pages
- Outdated software
- Security misconfigurations
Example:
nikto -h http://<IP>
Official Download: Nikto GitHub
3. Gobuster
Purpose
Directory and file enumeration.
Why use it?
- Hidden directories
- Backup files
- Admin panels
- API endpoints
Example:
gobuster dir -u http://<IP> -w wordlist.txt
Official Download: Gobuster GitHub
4. FFUF
Purpose
Fast web content discovery.
Why use it?
- Hidden directories
- Virtual hosts
- Parameters
- API endpoints
Example:
ffuf -u http://<IP>/FUZZ -w wordlist.txt
Official Download: FFUF GitHub
5. SNMPwalk
Purpose
SNMP enumeration.
Why use it?
- System information
- Network interfaces
- Running processes
- Hostname
- Installed software
Example:
snmpwalk -v2c -c public <IP>
Official Download: Included with Net-SNMP
6. LDAPSearch
Purpose
LDAP enumeration.
Why use it?
- Users
- Groups
- Organizational Units
- Domain information
Example:
ldapsearch -x -H ldap://<IP>
Official Download: Included with OpenLDAP
7. Dig
Purpose
DNS enumeration.
Why use it?
- DNS records
- Name servers
- MX records
- Zone transfers (if misconfigured)
Example:
dig any example.com
Official Download: Included with ISC BIND 9
Most Used Enumeration Tools
Windows
| Tool | Purpose |
|---|---|
| Nmap | General service enumeration |
| enum4linux-ng | SMB/Samba enumeration |
| NetExec (CrackMapExec) | Active Directory & SMB enumeration |
| rpcclient | RPC enumeration |
| smbclient | SMB share enumeration |
Linux
| Tool | Purpose |
|---|---|
| Nmap | Service enumeration |
| Nikto | Web server enumeration |
| Gobuster | Directory enumeration |
| FFUF | Web fuzzing and endpoint discovery |
| SNMPwalk | SNMP enumeration |
| ldapsearch | LDAP enumeration |
| Dig | DNS enumeration |
Windows Enumeration Tools — Official Downloads
| Tool | Purpose | Official Download |
|---|---|---|
| Nmap | General network, service, version, and OS enumeration using NSE scripts | Nmap Downloads |
| enum4linux-ng | Enumerate SMB/Samba users, shares, groups, and domain information | enum4linux-ng GitHub |
| NetExec (CrackMapExec successor) | Enumerate SMB, WinRM, LDAP, MSSQL, and Active Directory | NetExec GitHub |
| rpcclient | Enumerate Windows RPC services, users, groups, and password policies | Included with the Samba Project |
| smbclient | Access and enumerate SMB shares and files | Included with the Samba Project |
Linux Enumeration Tools — Official Downloads
| Tool | Purpose | Official Download |
|---|---|---|
| Nmap | Service, version, OS, and NSE-based enumeration | Nmap Downloads |
| Nikto | Enumerate web servers for dangerous files and misconfigurations | Nikto GitHub |
| Gobuster | Discover hidden directories, files, DNS subdomains, and virtual hosts | Gobuster GitHub |
| FFUF | High-speed web fuzzing and content discovery | FFUF GitHub |
| SNMPwalk | Enumerate SNMP devices, interfaces, users, and system information | Included with Net-SNMP |
| ldapsearch | Enumerate LDAP users, groups, and directory information | Included with OpenLDAP |
| Dig | Enumerate DNS records and test for zone transfers | Included with ISC BIND 9 |
Enumeration Techniques
SMB Enumeration
Extracting information from SMB shares, including users, shared folders, password policies, domain information and accessible files.
enum4linux-ng <IP>
smbclient -L //<IP>
netexec smb <IP>
DNS Enumeration
Collecting DNS information such as A, AAAA, MX, NS, TXT and CNAME records, plus zone transfers if allowed.
dig any example.com
SNMP Enumeration
Retrieving information from network devices using SNMP: hostname, interfaces, running processes, installed software, routing tables and network configuration.
snmpwalk -v2c -c public <IP>
LDAP Enumeration
Retrieving directory information: users, groups, Organizational Units (OUs), domain structure and computer objects.
ldapsearch -x -H ldap://<IP>
Web Enumeration
Discovering hidden directories, hidden files, backup files, admin panels, API endpoints, virtual hosts and server technologies.
nikto -h http://<IP>
gobuster dir -u http://<IP> -w wordlist.txt
ffuf -u http://<IP>/FUZZ -w wordlist.txt
FTP Enumeration
Checking anonymous login, then listing files and directories and looking for backups, credentials, configuration files, source code or upload permissions.
nmap -sV -p 21 <IP>
SSH Enumeration
Identifying SSH version, supported authentication methods, supported algorithms, banner information and weak configurations.
nmap -sV -p 22 <IP>
SMTP Enumeration
Checking supported SMTP commands, testing for user enumeration (where supported) and reviewing security settings such as open relay protections.
nmap -sV -p 25 <IP>
RDP Enumeration
Identifying RDP service version, Network Level Authentication (NLA) status, TLS configuration and domain/workgroup information (when available).
nmap -sV -p 3389 <IP>
Active Directory Enumeration
Gathering information about an AD environment: users, groups, computers, Domain Controllers, trust relationships, group memberships and privileges.
netexec smb <IP>
ldapsearch -x -H ldap://<IP>
Anonymous Enumeration
Occurs when a service allows information to be retrieved without authentication, such as anonymous FTP access, SMB null sessions, public SNMP community strings (public) and open LDAP queries.
rpcclient -U "" -N <IP>
Service Enumeration
Identifies the running service, software version, configuration, available features and potential vulnerabilities.
nmap -sV <IP>
Banner Grabbing
Collecting information that a service provides when a connection is established: software name, version, operating system and service type.
SSH-2.0-OpenSSH_9.6
Common Enumeration Ports
| Protocol | Default Port | Purpose | Enumeration Tool |
|---|---|---|---|
| FTP | 21 | File transfer | Nmap, ftp client |
| SSH | 22 | Remote shell access | Nmap, ssh client |
| SMTP | 25 | Mail transfer | Nmap, smtp-user-enum |
| DNS | 53 | Name resolution | Dig, Nmap |
| HTTP | 80 | Web service | Nikto, Gobuster, FFUF |
| RPC | 135 | Windows RPC endpoint mapper | rpcclient, Nmap |
| HTTPS | 443 | Encrypted web service | Nikto, Gobuster, FFUF |
| SMB | 445 | File and printer sharing | enum4linux-ng, smbclient, NetExec |
| LDAP | 389 | Directory services | ldapsearch, NetExec |
| SNMP | 161 (UDP) | Network device management | SNMPwalk |
| MSSQL | 1433 | Microsoft SQL Server | NetExec, Nmap |
| NFS | 2049 | Network file system | Nmap, showmount |
| MySQL | 3306 | MySQL database | Nmap, mysql client |
| RDP | 3389 | Remote desktop | Nmap |
Quick Revision
| Concept | Short Answer |
|---|---|
| What is Enumeration? | Extracting detailed information from discovered services |
| Why Enumeration? | To gather information for exploitation |
| Scanning vs Enumeration | Discovery vs detailed information gathering |
| SMB Enumeration | Users, shares, groups, password policy |
| DNS Enumeration | DNS records and zone transfers |
| SNMP Enumeration | Device and network information |
| LDAP Enumeration | Users, groups, domain structure |
| Web Enumeration | Hidden directories, files, APIs |
| Banner Grabbing | Retrieve service and version information |
| Goal of Enumeration | Collect actionable information for the next phase |
Service-wise Enumeration Cheat Sheet
SMB
Default Port: 445 (also 139)
Common Commands
nmap -sV -p 445 --script smb-enum-shares,smb-enum-users <IP>
enum4linux-ng <IP>
smbclient -L //<IP>
rpcclient -U "" -N <IP>
netexec smb <IP>
Useful Tools: Nmap, enum4linux-ng, smbclient, rpcclient, NetExec (CrackMapExec)
Information Retrieved: Users, groups, shared folders, password policy, computer name, domain name, NetBIOS information, active sessions
DNS
Default Port: 53
Common Commands
dig any example.com
dig axfr @<IP> example.com
nmap -sV -p 53 <IP>
Useful Tools: Dig, Nmap
Information Retrieved: A, AAAA, MX, NS, TXT and CNAME records, name servers, mail servers, subdomains, zone transfers (if misconfigured)
SNMP
Default Port: 161 (UDP)
Common Commands
snmpwalk -v2c -c public <IP>
Useful Tools: SNMPwalk (Net-SNMP), Nmap
Information Retrieved: Hostname, network interfaces, running processes, installed software, routing tables, network configuration, users
LDAP
Default Port: 389 (636 for LDAPS)
Common Commands
ldapsearch -x -H ldap://<IP>
netexec ldap <IP>
Useful Tools: ldapsearch (OpenLDAP), NetExec, Nmap
Information Retrieved: Users, groups, Organizational Units (OUs), domain structure, computer objects, service accounts
FTP
Default Port: 21
Common Commands
nmap -sV -p 21 <IP>
ftp <IP>
Useful Tools: Nmap, ftp client
Information Retrieved: FTP banner and version, anonymous login access, files and directories, backups, credentials, configuration files, source code, upload permissions
SSH
Default Port: 22
Common Commands
nmap -sV -p 22 <IP>
ssh -v <IP>
Useful Tools: Nmap, ssh client
Information Retrieved: SSH version, supported authentication methods, supported algorithms, banner information, weak configurations
HTTP
Default Port: 80 (443 for HTTPS)
Common Commands
nikto -h http://<IP>
gobuster dir -u http://<IP> -w wordlist.txt
ffuf -u http://<IP>/FUZZ -w wordlist.txt
curl -I http://<IP>
Useful Tools: Nikto, Gobuster, FFUF, Nmap, curl
Information Retrieved: Hidden directories and files, backup files, admin panels, API endpoints, virtual hosts, server technologies, dangerous files, default pages, outdated software, misconfigurations
SMTP
Default Port: 25
Common Commands
nmap -sV -p 25 --script smtp-commands,smtp-enum-users <IP>
Useful Tools: Nmap, smtp-user-enum
Information Retrieved: Supported SMTP commands, valid users (where supported), banner and software version, open relay protections
MySQL
Default Port: 3306
Common Commands
nmap -sV -p 3306 <IP>
mysql -h <IP> -u root -p
Useful Tools: Nmap, mysql client
Information Retrieved: MySQL version, authentication requirements, databases (if authorized), user accounts, configuration details
RDP
Default Port: 3389
Common Commands
nmap -sV -p 3389 <IP>
Useful Tools: Nmap
Information Retrieved: RDP service version, Network Level Authentication (NLA) status, TLS configuration, domain/workgroup information (when available)
Tip
Exam Tip: Remember the phase order — scanning discovers, enumeration extracts. Ports 445 (SMB), 389 (LDAP), 161 (SNMP) and 53 (DNS) are the highest-value enumeration targets in exam scenarios.
Warning
Only enumerate systems you are explicitly authorised to test. Anonymous access, null sessions and zone transfers are still unauthorised access when performed outside an approved scope.