☼
⌃
☰

Enumeration

Table of Contents

Enumeration

Description

Enumeration is a critical, methodical step in the pre-exploitation phase of a penetration test or cyberattack, immediately following reconnaissance. While reconnaissance focuses on passive information gathering (e.g., searching public sources), enumeration is active, involving direct, non-intrusive queries to the target system.

Purpose and Goal

The primary goal of enumeration is to build a detailed and accurate map of the target's internal landscape by interacting directly with the running services. The gathered data provides the foundation for launching an informed exploitation attack.

Information typically sought during enumeration includes:

  • Network: DNS records, network topology, firewall rules.
  • Users and Groups: Valid usernames, group membership, and associated security identifiers (SIDs).
  • Services: Which services are running (e.g., FTP, SMB, SMTP), their versions, and their configuration.
  • Shares: Accessible network file shares and their permissions.
  • System Details: Operating system type, installed patches, and running processes.

Key Characteristics

  • Active Interaction: Enumeration techniques involve sending packets and requests to the target, meaning they can potentially be detected by intrusion detection systems (IDS) or logging mechanisms.
  • Protocol Abuse: Attackers often abuse standard, legitimate protocols (like DNS, LDAP, SMB, and SNMP) designed for network management to extract data that the service provides by default.
  • Escalation: After initial exploitation, a second phase of internal enumeration is performed on the compromised host to plan Lateral movement and Privilege Escalation.

Examples

Enumeration utilizes common network tools and built-in operating system utilities.

. External Enumeration (Targeting the Network Perimeter)

Protocol / Tool Command Example Information Gathered
DNS (nslookup, dig) dig axfr @ns1.target.com target.com Attempts a Zone Transfer to dump all DNS records, revealing internal hostnames.
SMB (enum4linux) enum4linux -U 192.168.1.10 Uses the Server Message Block protocol to retrieve user lists, group lists, and shared folder names on a Windows server.
Nmap nmap --script smb-os-discovery 192.168.1.10 Uses the Nmap Scripting Engine to discover the OS, domain name, and system time via SMB.
SNMP (snmp-check) snmp-check 192.168.1.10 Tries to extract device information (interface names, running processes, device type) via the Simple Network Management Protocol.

2. Internal Enumeration (After Initial Access)

Tool / Technique Command Example (Windows/PowerShell) Information Gathered
User/Group Listing net user / net localgroup administrators Lists local users and members of the local administrators group.
System Info systeminfo Detailed OS configuration, uptime, and installed hotfixes (useful for finding unpatched vulnerabilities).
Network Configuration ipconfig /all / arp -a Network interface details, DHCP server, DNS server, and MAC addresses of other hosts on the local network.
Persistence Checks Get-ChildItem -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" Lists programs configured to run automatically at startup, potential persistence mechanisms.