CYS405 · Chapter 4

Digging Deeper:
Enumeration

Turning a scanned target into a map of usernames, shares, services, and settings — the step that tells an attacker exactly where to strike next.

NetBIOS SNMP LDAP NTP DNS Zone Transfers NULL Sessions rpcclient
scroll ↓
01 — Foundations

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.

📘 Example

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

OS Details
The operating system running on the target machine.
Network Infrastructure
Details about how the network is laid out and connected.
Usernames
Valid user accounts on the target system.
Machine Names
Names identifying hosts on the network.
Share Names
Shared folders/resources exposed by a host.
Directory Names
File system paths and structures on the target.
Printer Names
Networked printers, another possible foothold.
Web Server Details
Software/version info about web servers in play.
02 — Why It Matters

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

1

Dig deeper

Go beyond the surface-level scan and dig deeper into the target system.

2

Uncover specifics

Uncover specific information about the system — not just "a server exists" but which one, doing what.

3

Determine services & settings

Determine what services and settings are actually present and running.

4

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.

03 — Classification

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.

1. NetBIOS
Windows LAN resource names, domains, shares. Port 139.
2. SNMP
Router/hub/switch management. UDP 161.
3. LDAP
Active Directory objects. Port 389.
4. NTP
Time-sync servers reveal hosts. UDP 123.
5. DNS
Zone transfers expose the whole domain map.
6. UNIX/Linux
Command-line enumeration tools (rpcclient, etc.).
🧠

Mnemonic

"Never Send Lazy Notes, Dummy — Unify!"NetBIOS, SNMP, LDAP, NTP, DNS, UNIX/Linux — the six enumeration types in slide order.

04 — Type 1

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
📘 What Attackers Obtain

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.

Attack Path A — Read/Write

The attacker reads or writes to a remote computer's shares, depending on what shares are available and how they're permissioned.

Attack Path B — Denial of Service

Instead of abusing shares, the attacker uses the exposed NetBIOS surface to launch a denial-of-service attack against the host.

05 — Type 2

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.

SNMP Agent

Software located on the networking device itself (router, switch, etc.) that responds to queries about its state and configuration.

SNMP Management Station

The system that communicates with the agent to monitor and configure devices across the network — the centralized reporting point.

The Two SNMP Community Strings

Read Community String

Lets you view the configuration of the device or system. These strings are conventionally public.

Read/Write Community String

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.

06 — Type 3

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.

📘 Attack Path

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.

07 — Type 4

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.

Client sends Mode 4 request
Server replies with Mode 3 response
📘 Attack Path

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.

08 — Type 5

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.

09 — Reference

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").

10 — NULL Sessions

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

Users & Groups
A list of user and group accounts on the target.
Computers & Devices
A list of computers and devices on the network.
Shares
A list of shared resources exposed by the target.
Users & Host SIDs
Security Identifiers for users and the host itself.
📘 Real Example — Kali Linux → Metasploitable

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:

rpcclient -U "" 10.10.10.100

Once connected, running the srvinfo command returns the target's operating system type:

rpcclient $> srvinfo

For the full listing of query commands available inside an rpcclient session, use:

rpcclient --help
🧠

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.

11 — Type 6

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.

rpcclient
Connects to a remote RPC/SMB service, often with a NULL session (-U ""), to pull server info, users, and shares (e.g. via srvinfo, enumdomusers).
enum4linux
A wrapper script that automates NetBIOS/SMB enumeration on Linux — users, groups, shares, password policy, OS info — against Windows or Samba targets.
showmount
Queries an NFS server to list exported directories/shares available to clients.
finger
Queries a remote host for information about logged-in users — full name, login time, idle time.
rusers
Lists users currently logged in on remote hosts across a network (via the RPC-based rusersd service).
rpcinfo
Lists RPC services registered and running on a remote host, useful for spotting NFS, NIS, and other RPC-based services.
💡

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.

12 — Exam Prep

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).

13 — Cheat Sheet

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.