Active Reconnaissance
Active recon is the kind that does touch the target’s infrastructure: you scan its ports, interrogate its services, identify versions, and map its network. Unlike passive reconnaissance, this leaves traces in its logs and can trigger alerts, so it’s done with permission (scope) and judgment. It’s the bridge between “I know what exists” (passive) and “I know what’s exposed and exploitable” (enumeration).
From passive recon you already have a list of domains, IPs, and ranges. Active recon interrogates them directly to answer four cascading questions: which hosts are alive, which ports/services are open, which versions run, and which operating system they use. That produces the list of services to enumerate in depth.
flowchart LR
A[IPs / ranges from passive] --> B[Live host discovery]
B --> C[Port scanning]
C --> D[Service and version detection]
D --> E[NSE / web fingerprint]
E --> F[List of services to enumerate]
Host discovery
Section titled “Host discovery”Before scanning ports it’s worth knowing what’s alive in the range:
nmap -sn 10.0.0.0/24 # ping sweep (ICMP + ARP on LAN)fping -a -g 10.0.0.0/24 2>/dev/null # list of responding hostsIf ICMP is blocked, discover via common TCP ports instead of ping:
nmap -sn -PS22,80,443 10.0.0.0/24 # TCP SYN discoveryPort scanning with nmap
Section titled “Port scanning with nmap”nmap is the central tool. The usual flow is a fast sweep first and a full scan afterward:
nmap -sV -sC -oA scan target.com # top ports + version + default scriptsnmap -p- -T4 target.com # all 65535 TCP ports (slow but complete)nmap -sU --top-ports 20 target.com # UDP (slow; key ports only)Scan types worth knowing:
-sS— SYN scan, stealthy, doesn’t complete the connection (needs privileges).-sT— TCP connect, completes the handshake (no privileges).-sV— service version detection.-O— operating system detection.-sC— default NSE scripts (safe enumeration).
Fast scanning of large ranges
Section titled “Fast scanning of large ranges”For wide ranges, masscan or rustscan find open ports at high speed; then you run nmap -sV only against those ports:
rustscan -a target.com -- -sV -sCmasscan -p1-65535 10.0.0.0/24 --rate 10000Identify services and versions
Section titled “Identify services and versions”Every open port is a question: what’s running and which version? The version leads to the CVEs (see Technology Fingerprinting).
nmap -sV target # service versionsnmap --script=banner target # bannersnmap --script smb-enum-shares,smb-os-discovery -p445 targetnmap --script http-enum -p80,443 targetWeb fingerprinting
Section titled “Web fingerprinting”For HTTP services, identify technology and status before enumerating deeply:
whatweb https://targethttpx -l hosts.txt -title -tech-detect -status-code -servernikto -h https://target # known issues (noisy)OPSEC: noise and evasion
Section titled “OPSEC: noise and evasion”Active recon is detectable by design. A -T5 -p- is spotted by any IDS; a slow, segmented scan stays more under the radar:
nmap -T2 --max-rate 50 -f --source-port 53 -D decoy1,decoy2 target-T2/-T1— slower timing, less detectable.--max-rate— caps packets per second.-D— decoys to obfuscate the source.-f— fragments packets.--source-port 53— source from a “trusted” port.
Common mistakes
Section titled “Common mistakes”- Launching
-p-against the whole organization from the start: slow, noisy, and gets you blocked. - Scanning only TCP and forgetting UDP (DNS, SNMP, IKE often live there).
- Not verifying IP ownership: scanning something out of scope can be illegal (see ASN and IP Ranges).
- Trusting only the banner: many services fake or hide it.
Defensive note
Section titled “Defensive note”Detection: spikes of connections to many ports from a single source (scan signature), SYN without completing the handshake, known NSE script patterns. Mitigation: network segmentation, a firewall that limits exposure, IDS/IPS (Suricata, Snort), rate-limiting, and the basic rule of not exposing unnecessary services to the Internet.
Testing checklist
Section titled “Testing checklist”- Discover live hosts in the range (ping sweep / SYN discovery).
- TCP port scan (top then
-p-). - Key UDP ports (DNS, SNMP, etc.).
- Version and OS detection (
-sV -O). - NSE per service (smb, http, etc.).
- Web fingerprinting (whatweb / httpx).
- List of services to enumerate in depth.
- Apply evasion/timing if stealth matters.