Network Enumeration

Phase 1: Host Discovery (Finding Live Targets)

Strategy: Identify live hosts without triggering alerts. Start with methods that are less likely to be logged, like ARP on a local network, before moving to ICMP or TCP/UDP-based discovery.

  • LAN Discovery (Fast & Reliable):

    • Use Case: You are on the local network. This is the most effective method.

    • Tools:

# Nmap (Recommended)
# -PR: ARP Scan | -sn: "Ping Scan" (disables port scan)
sudo nmap -sn -PR 192.168.1.0/24 -oA discovery_arp
        
# arp-scan (Very Fast)
sudo arp-scan -l
  • Standard Network Discovery:

    • Use Case: Scanning external networks or internal subnets where ARP is not possible.

    • Tools:

# Nmap (Recommended for flexibility)
# -PS: TCP SYN to common ports | -PA: TCP ACK | -PU: UDP
# This combination bypasses many simple firewall rules that block only ICMP.
sudo nmap -sn -PS80,443 -PA22 -PU53 10.10.10.0/24 -oA discovery_standard
  • Assume All Hosts Are Up (When Blocked):

    • Use Case: A restrictive firewall is dropping your discovery probes. This is slow but necessary.

    • Method:

Phase 2: Port Scanning (Mapping the Attack Surface)

Strategy: Employ a multi-step approach. Use ultra-fast scanners like masscan to find open ports, then feed those results into nmap for deep analysis. This is far more efficient than running a full nmap scan from the start.

  • Step 1: Fast Initial Port Scan:

    • Purpose: Quickly identify open ports across large IP ranges.

    • Tools:

  • Step 2: Detailed Service & Script Scan (On Discovered Ports):

    • Purpose: This is the main enumeration scan. It runs version detection, default scripts, and OS detection on the specific ports you found open.

    • Tool:

  • Step 3: UDP Scan (As Needed):

    • Purpose: UDP is slow to scan. Only run this if you suspect key UDP services are in use (e.g., DNS, SNMP, Kerberos).

    • Tool:

Phase 3: Service-Specific Enumeration (Deep Dive)

Strategy: Now that you have a list of open ports and versions, attack each service with specialised tools and scripts. Always check for anonymous/guest access and known misconfigurations first.

Authentication & Directory Services

  • LDAP (389, 636):

    • Tools: nmap, ldapsearch

  • Kerberos (88):

    • Tools: nmap, kerbrute, impacket-GetNPUsers

  • SMB (139, 445):

    • Tools: crackmapexec, enum4linux-ng, smbclient, smbmap

Remote Access & Management

  • SSH (22):

    • Tools: nmap, ssh-audit

  • RDP (3389):

    • Tools: nmap, xfreerdp

  • VNC (5900):

    • Tools: nmap

File Transfer & Sharing

  • FTP (21):

    • Tools: nmap, ftp (client)

  • NFS (2049):

    • Tools: nmap, showmount

  • RSync (873):

    • Tools: nmap, rsync

Web & Application Services (Expanded)

Strategy: Web enumeration is a deep discipline. Start with fingerprinting to understand the technology stack. Then, aggressively search for hidden content. Finally, scan for common vulnerabilities based on your findings.

  • Step 1: Initial Recon & Fingerprinting:

    • Purpose: Identify web server software, frameworks, and technologies. Manually inspect headers and source code.

    • Tools:

  • Step 2: Content Discovery (Directory & Subdomain Fuzzing):

    • Purpose: Find hidden pages, directories, API endpoints, and virtual hosts.

    • Tools:

  • Step 3: CMS & Framework Specific Scanning:

    • Purpose: Use specialised tools if a specific CMS like WordPress is identified.

    • Tools:

  • Step 4: Automated Vulnerability Scanning:

    • Purpose: Scan for common vulnerabilities like SQLi, XSS, and misconfigurations.

    • Tools:

  • Step 5: Manual Interaction & Data Transfer:

    • Purpose: Download files for offline analysis or interact with the server manually.

    • Tools:

Databases

  • MySQL (3306), MSSQL (1433), PostgreSQL (5432):

    • Tools: nmap, native clients (mysql, sqlcmd, psql)

  • Redis (6379) & Elasticsearch (9200):

    • Tools: nmap

Core Network Services

  • DNS (53):

    • Tools: nmap, dig, dnsrecon

  • SNMP (UDP 161):

    • Tools: nmap, snmpwalk, snmp-check

  • SMTP (25, 465, 587):

    • Tools: nmap, netcat

Phase 4: Strategic Scans & Workflows

Strategy: Combine the phases into repeatable workflows for different scenarios.

  • External Pentest Workflow (Stealthy -> Detailed):

  • Internal Pentest Workflow (Fast & Comprehensive):

Last updated