What Is Enumeration in Cyber Security? Types, Commands and Defence

Enumeration is the stage of a security assessment where the tester connects to services already discovered and extracts detailed information from them: user and group names, shared folders, software versions, DNS records, network devices and configuration. Scanning tells you a door exists; enumeration tells you what is behind it.

Oct 11, 2026 - 07:29
Updated: 
102.5k

Ethical Hacking in Cybersecurity & Ethical Hacking · Explainer

What Is Enumeration in Cyber Security?

Quick answer: Enumeration is the stage of a security assessment where the tester connects to services already discovered and extracts detailed information from them: user and group names, shared folders, software versions, DNS records, network devices and configuration. Scanning tells you a door exists; enumeration tells you what is behind it. Attackers use the same techniques, which MITRE ATT&CK groups under its Discovery tactic, so defenders should know exactly what their services give away to anyone who asks.

Key takeaways

  • Enumeration follows scanning and turns open ports into usable detail.
  • The richest sources are usually SMB, LDAP and Active Directory, DNS, SNMP and NFS.
  • Default and anonymous access settings leak far more than most administrators expect.
  • It is legal only on systems you own or are authorised to test.
  • Defenders can detect it: bursts of directory queries and failed anonymous binds stand out in logs.

Table of Contents

What Is Enumeration in Cyber Security?

It is active, structured information gathering against specific services. The tester asks each service questions its protocol allows, such as which shares exist, which users belong to which groups, which records a DNS server holds, and records the answers. The output is a map of accounts, systems and weak points that shapes everything that follows in the test.

In MITRE ATT&CK, these behaviours fall under the Discovery tactic, with techniques such as T1087 Account Discovery, network share discovery and system service discovery.

How Is Enumeration Different From Scanning?

Scanning finds live hosts and open ports, and often guesses service versions. Enumeration connects to those services properly and pulls structured information from them. A scan reports port 445 open; enumeration lists the shares on it, the users who can read them and the domain the machine belongs to.

What Are the Main Types of Enumeration?

ProtocolPortWhat it can reveal
NetBIOS and SMB137 to 139, 445Shares, users, groups, password policy, domain name
LDAP and Active Directory389, 636Users, groups, computers, organisational structure
DNS53Hostnames, mail servers, sometimes the whole zone
SNMP161 UDPDevice details, interfaces, running processes, routes
NFS2049Exported directories and which hosts may mount them
SMTP25Valid mailbox names, via VRFY or RCPT responses
Web services80, 443Directories, technologies, API endpoints

Which Commands Are Used, Protocol by Protocol?

Run these only against a lab or systems you are authorised to test. Start with versions and default scripts from the Nmap reference guide:

nmap -sC -sV -p 53,139,389,445,2049 192.168.56.110
nmap -sU -p 161 --script snmp-info 192.168.56.120

SMB: shares, users and domain information. enum4linux-ng wraps several tools into one report:

enum4linux-ng -A 192.168.56.110
smbclient -L //192.168.56.110 -N          # list shares with a null session
nmap --script smb-enum-shares,smb-enum-users -p 445 192.168.56.110

LDAP: read the naming context, then query users if anonymous or authorised access allows:

ldapsearch -x -H ldap://192.168.56.110 -s base namingcontexts
ldapsearch -x -H ldap://192.168.56.110 -b 'DC=lab,DC=local' '(objectClass=user)' sAMAccountName

DNS: records, and a zone transfer attempt, which a correctly configured server refuses:

dig +short NS lab.example
dig axfr lab.example @ns1.lab.example

SNMP: walk the device information tree with a community string, often a default such as public on badly configured devices:

snmpwalk -v2c -c public 192.168.56.120 1.3.6.1.2.1.1

NFS: list exported directories and who may mount them:

showmount -e 192.168.56.130

The Nmap Scripting Engine documentation lists many more scripts by protocol. Our dedicated guides cover NetBIOS enumeration and SNMP and LDAP enumeration in depth.

How Does Enumeration Fit Into an Assessment?

It sits after reconnaissance and scanning, and before vulnerability analysis and exploitation. Good enumeration often makes exploitation unnecessary: an exposed share containing a configuration file with a password, or a user list combined with a weak password policy, is already a finding. In Active Directory tests, enumeration of groups and permissions maps the paths from an ordinary account to domain administrator. See common penetration testing techniques for the full sequence.

Only on systems you own or have written permission to test. Querying someone else's directory, shares or devices without authorisation is unauthorised access under the Information Technology Act, 2000, even if the service answered without a password. Practise in a lab, or under a signed scope. Our article on ethical hacking laws explains authorisation.

How Can Defenders Reduce Exposure?

  • Disable anonymous and null-session access to SMB, and anonymous LDAP binds.
  • Restrict DNS zone transfers to authorised secondary servers only.
  • Replace default SNMP community strings, or move to SNMPv3 with authentication and encryption.
  • Limit NFS exports to specific hosts, never to everyone.
  • Block these services at the network edge; they rarely need to be reachable from the internet.
  • Run the same commands against your own network regularly, and fix what answers.

How Do Defenders Detect Enumeration?

Enumeration is noisy. Signs to alert on include a single host making many LDAP queries for users and groups in a short time, many SMB share or session listing requests across different servers, failed anonymous or null-session attempts, refused zone transfer requests in DNS logs, and SNMP requests with wrong community strings. On Windows domain controllers, directory service access auditing and endpoint detection tools capture much of this. Our guide to Active Directory attack methods covers detection for each path.

Talk to a WebAsha training advisor about ethical hacking courses, batches and current fees.

References

Frequently Asked Questions

Connecting to discovered services and extracting detailed information such as user names, groups, shares, versions and DNS records, to map a target before testing it further.

Scanning finds live hosts and open ports. Enumeration connects to those services and pulls structured information from them, such as the shares on an SMB server.

NetBIOS and SMB, LDAP and Active Directory, DNS, SNMP, NFS, SMTP and web enumeration, each revealing different information.

An unauthenticated SMB connection. On misconfigured Windows systems it can list shares and users, which is why it should be disabled.

A request to copy all records of a DNS zone. Servers should allow it only to authorised secondary servers; if any client can do it, internal hostnames leak.

Devices left with default community strings such as public can reveal interfaces, routes and processes. SNMPv3 with authentication and encryption prevents it.

Nmap and its scripts, enum4linux-ng and smbclient for SMB, ldapsearch for LDAP, dig for DNS, snmpwalk for SNMP and showmount for NFS.

Only on systems you own or are authorised to test. Querying others’ services without permission is unauthorised access under the Information Technology Act, 2000, even if no password was needed.

Disable anonymous SMB and LDAP access, restrict zone transfers, replace default SNMP strings, limit NFS exports and block these services at the network edge.

By alerting on bursts of LDAP and SMB queries from one host, failed anonymous access, refused zone transfers and SNMP requests with wrong community strings.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Anjali

I am passionate about technology, invention and big challenging tasks on my to- do list. In terms of the work I am doing also at Bunnyshell, I am most passionate about the technologies that we are using., I'm devoted to delivering content that not only informs but also inspires. Whether you need in- depth analysis pieces, educational attendants, or study- provoking opinion pieces, I draft content that resonates with tech suckers and professionals likewise.