What Is Enumeration?
Enumeration is the process of extracting a system's valid usernames, machine names, share names, directory names, and other identifying information. It is a key component of ethical hacking and penetration testing because it hands attackers a wealth of concrete information that can be used to exploit vulnerabilities.
Enumeration can be used both offensively (by attackers preparing an intrusion) and defensively (by security teams auditing their own exposure). It is considered one of the most important steps in ethical hacking because it gives hackers the specific information needed to actually launch an attack — scanning tells you a door exists; enumeration tells you whose name is on the door.
Hackers who want to crack passwords first need to know the usernames of valid users on the target system. Enumerating the target extracts exactly this information — without a username, there is nothing to crack a password against.
Information Enumeration Can Gather
Why Is Enumeration Important?
Enumeration lets you understand what devices are on a network, where they are located, and what services they offer. Put simply, it is how you find security vulnerabilities within systems and networks before someone else does.
What an Enumeration Scan Reveals
- What ports are open on devices
- Which services are reachable and accessible
- What type of information is being transmitted
- Weaknesses that can then be exploited to gain unauthorized access
Carrying out an enumeration scan requires both time and patience. It's a crucial, unglamorous step in the hacking process because it's how intelligence about the target is actually gathered. Enumeration can be performed manually or with automated tools — either way, thoroughness matters, since the goal is to maximize the amount of usable information collected.
The Core Idea, in Four Moves
Dig deeper
Go beyond the surface-level scan and dig deeper into the target system.
Uncover specifics
Uncover specific information about the system — not just "a server exists" but which one, doing what.
Determine services & settings
Determine what services and settings are actually present and running.
Modify the attack
Use everything gathered to modify the attack and make the activity more productive.
Mnemonic
D.U.D.M. — Dig deeper → Uncover info → Determine services/settings → Modify the attack. Think of it as "Dude, Understand, Decide, Move" — the natural progression from recon to an actionable plan.
Enumeration Classification
Enumeration is not one single technique — it's a family of protocol-specific methods. The slides classify enumeration into six categories, each targeting a different service that leaks information by design.
Mnemonic
"Never Send Lazy Notes, Dummy — Unify!" → NetBIOS, SNMP, LDAP, NTP, DNS, UNIX/Linux — the six enumeration types in slide order.
NetBIOS Enumeration
NetBIOS (Network Basic Input Output System) was developed by IBM in association with Sytek as an Application Programming Interface (API), originally to let client software access LAN resources. Enumerating a NetBIOS API is typically the first step in enumerating a Windows machine.
The NetBIOS Name
A NetBIOS name is a unique 16-character ASCII string used to identify network devices over TCP/IP:
- 15 characters — the device (host) name
- 1 character (the 16th) — reserved for the service or record type suffix
Attackers use NetBIOS enumeration to obtain the list of computers that belong to a domain and the shares of the individual hosts on the network, as well as policies and passwords.
If an attacker finds a Windows OS with port 139 open, that's a strong signal — they'll immediately want to check what resources they can access or view on the remote system. However, to actually enumerate NetBIOS names this way, the remote system must have file and printer sharing enabled.
The attacker reads or writes to a remote computer's shares, depending on what shares are available and how they're permissioned.
Instead of abusing shares, the attacker uses the exposed NetBIOS surface to launch a denial-of-service attack against the host.
SNMP Enumeration
SNMP (Simple Network Management Protocol) is an application-layer protocol that runs on UDP, used to maintain and manage routers, hubs, and switches on an IP network. SNMP agents run on both Windows and UNIX networking devices. SNMP enumeration is the process of enumerating user accounts and devices on a target using this protocol.
Software located on the networking device itself (router, switch, etc.) that responds to queries about its state and configuration.
The system that communicates with the agent to monitor and configure devices across the network — the centralized reporting point.
The Two SNMP Community Strings
Lets you view the configuration of the device or system. These strings are conventionally public.
Lets you change or edit the device's configuration. These strings are conventionally private.
Default Community Strings = Major Vulnerability
When community strings are left at their default values, attackers exploit the loophole and use the default password to view or change device configuration. This is one of the most common real-world SNMP misconfigurations.
Attackers enumerate SNMP to extract information about network resources — hosts, routers, devices, shares — plus network-level information such as ARP tables, routing tables, device-specific information, and traffic statistics. SNMP clients gather this performance intel and report it back to a centralized reporting point.
Mnemonic
"Public Reads, Private Writes" — the Read (public) string only lets you look; the Read/Write (private) string lets you touch. Public = Peek, Private = Poke.
LDAP Enumeration
LDAP (Lightweight Directory Access Protocol) enables applications to access directory listings from directory services such as Active Directory. LDAP is usually integrated into the Domain Name System (DNS) for quicker query resolution and an expedited lookup process.
An attacker can exploit a directory scanner to query the LDAP service through port 389 anonymously. This gives the attacker access to a host of information that can be misused to orchestrate social engineering or brute-force attacks.
Information uncovered by LDAP enumeration attacks generally includes: Active Directory objects, access lists, usernames, groups, trusts, and sessions.
NTP Enumeration
NTP (Network Time Protocol) synchronizes the system clocks of networked computers. NTP agents connect to time servers globally to sync systems across different time zones.
Attackers query the NTP agent via UDP port 123, which returns information related to: the machines communicating with the NTP server, system names, client OSs, detailed interface info, and IP addresses.
DNS Enumeration
The DNS service enables consistency across servers using zone transfers — copying DNS information from one server to another. Critically, the zone transfer service requires no authentication by default, which is a major and common misconfiguration.
Why This Is Dangerous
Because zone transfers need no authentication, malicious actors can obtain a copy of the entire DNS zone from any misconfigured DNS server. This exposes the configuration of all hosts within the domain, opening up security gaps within the network's topology.
Ports and Services to Know
Every enumeration technique above has a signature port. Memorizing this table is one of the highest-yield things you can do for this chapter.
| Service | Port | Protocol | Notes |
|---|---|---|---|
| DNS | 53 | TCP/UDP | Most DNS traffic on the network uses this port. |
| SMTP | 25 | TCP | Simple Mail Transfer Protocol. |
| Microsoft RPC endpoints | 135 | TCP | Remote Procedure Call endpoint mapper. |
| Global Catalog service | 3268 | TCP | Stripped-down Active Directory lookup service. (Slide text shows "3286" — the correct, real-world port is 3268.) |
| NetBIOS naming service | 137 | TCP + UDP | Resolves computer name to IP address. |
| LDAP | 389 | TCP/UDP | Used by Active Directory, Open Directory, and other directory services. |
| SMB (over NetBIOS) | 139 | TCP | Creates shared resources/folders. |
| SNMP | 161 | UDP | Router/switch/hub management. |
| SMB (direct, no NetBIOS) | 445 | TCP | Modern SMB without the NetBIOS layer. |
Mnemonic
"25-53-135-137-139-161-389-445-3268" climbs mostly upward except for the AD Global Catalog outlier at 3268. Anchor points: 139 & 445 = SMB twins (old vs new), 137 = NetBIOS name, 389 = LDAP, 161 = SNMP (think "1-6-1 sensors").
NULL Session
In a null session, an attacker logs in to a target using a null account — an account that doesn't actually exist. This is possible because some systems are vulnerable to allowing anonymous login. Once a user can log in anonymously, that null user can retrieve sensitive information stored on the target — no valid credentials required.
What an Attacker Can Extract via NULL Session
A null session enumeration can be attempted from a Kali Linux machine (the attacker) against a target such as
Metasploitable, using rpcclient with an empty username:
Once connected, running the srvinfo command returns the target's operating system type:
For the full listing of query commands available inside an rpcclient session, use:
Mnemonic
"U.C.S.S." — Users/groups, Computers/devices, Shares, SIDs — the four things a NULL session hands over, for free, to nobody in particular.
UNIX/Linux Enumeration Commands
Beyond Windows-centric NetBIOS/LDAP techniques, UNIX and Linux systems have their own native command-line tools for enumeration — many of these are run directly from an attacker's Kali box against a Linux/UNIX target, and several tie directly back into the NULL session and SMB concepts above.
-U ""), to
pull server info, users, and shares (e.g. via srvinfo, enumdomusers).Why UNIX/Linux Tools Matter
Even though NetBIOS and LDAP enumeration are framed around Windows/Active Directory, many real environments
are mixed. Tools like rpcclient and enum4linux let an attacker (or defender doing
an internal audit) enumerate Samba-based Linux file servers exactly the way they'd enumerate a Windows box.
Exam Tips & Tricks
Port 139 = NetBIOS Red Flag
An open port 139 on a Windows host is the classic sign an attacker checks first for accessible shares/resources.
Read = Public, Read/Write = Private
SNMP's two community strings differ by permission level, not by protocol — read-only views config, read/write edits it.
DNS Zone Transfers Need No Auth
This is the single most exam-relevant DNS enumeration fact — it's the default misconfiguration that exposes an entire domain.
LDAP Rides on Port 389
Anonymous LDAP queries through port 389 expose AD objects, usernames, groups, trusts, and sessions.
NTP Uses Mode 4 / Mode 3
Client requests are Mode 4; server responses are Mode 3. Queried over UDP port 123.
NULL Session = No Real Account
A NULL session logs in with an account that doesn't exist, exploiting anonymous-login vulnerabilities — not a stolen credential.
rpcclient -U "" <IP> Is THE Command
Memorize this exact syntax — it's the textbook example of establishing a NULL session against Metasploitable from Kali.
SMB Has Two Ports
139 = SMB over NetBIOS (legacy); 445 = SMB direct (modern, no NetBIOS layer needed).
Quick Reference — Everything at a Glance
| Topic | Key Point |
|---|---|
| Enumeration (definition) | Extracting valid usernames, machine names, share names, directory names, and other info from a target. |
| Purpose | Gives attackers the specific info needed to launch an attack; can be offensive or defensive. |
| Info gathered | OS details, network infrastructure, usernames, machine names, share/directory/printer names, web server details. |
| Why important | Reveals open ports, accessible services, and data in transit; requires time & patience; manual or automated. |
| Core process | Dig deeper → Uncover info → Determine services/settings → Modify the attack. |
| 6 enumeration types | NetBIOS, SNMP, LDAP, NTP, DNS, UNIX/Linux commands. |
| NetBIOS | IBM/Sytek API for LAN access; 16-char name (15 name + 1 suffix); port 139; needs file/printer sharing enabled. |
| NetBIOS attacks | Read/write to shares, or denial-of-service. |
| SNMP | Application-layer, runs on UDP; manages routers/hubs/switches; agent (on device) vs management station (queries agent). |
| SNMP community strings | Read (public, view-only) vs Read/Write (private, can edit config); default strings = major vulnerability. |
| SNMP extracts | ARP tables, routing tables, device info, traffic statistics. |
| LDAP | Accesses directory listings (e.g. Active Directory); integrated into DNS; port 389; anonymous queries expose AD data. |
| LDAP exposes | AD objects, access lists, usernames, groups, trusts, sessions — usable for social engineering/brute force. |
| NTP | Synchronizes clocks; Mode 4 request / Mode 3 response; queried via UDP port 123. |
| NTP reveals | Machines talking to the NTP server, system names, client OSs, interface info, IP addresses. |
| DNS enumeration | Zone transfers copy DNS data across servers with NO authentication by default — exposes the whole zone/domain topology. |
| Port: DNS | 53 |
| Port: SMTP | 25 |
| Port: MS RPC endpoints | 135 (TCP) |
| Port: Global Catalog | 3268 (correct value; slide typo shows 3286) |
| Port: NetBIOS naming service | 137 (TCP + UDP) |
| Port: LDAP | 389 (TCP/UDP) |
| Port: SMB over NetBIOS | 139 (TCP) |
| Port: SNMP | 161 (UDP) |
| Port: SMB direct | 445 (TCP) |
| NULL session (definition) | Attacker logs in with a null/nonexistent account, exploiting anonymous-login vulnerabilities. |
| NULL session yields | Users/groups list, computers/devices list, shares list, users and host SIDs. |
| NULL session example | rpcclient -U "" 10.10.10.100 from Kali against Metasploitable; srvinfo
returns target OS type; rpcclient --help lists all commands. |
| UNIX/Linux enumeration tools | rpcclient, enum4linux, showmount (NFS), finger, rusers, rpcinfo. |