Overview Types Phases Techniques Tools Passive Recon Active Recon Best Practices Legal

Reconnaissance Guide

What is Reconnaissance?

Reconnaissance, or "recon," is the systematic process of gathering information about a target system, network, or organization. It is the critical first phase of penetration testing, security assessments, red team operations, and ethical hacking—setting the foundation for all subsequent activities. Proper reconnaissance directly determines the success rate of any security assessment.

Key Insight: The success of any security assessment depends heavily on the quality of reconnaissance. Well-executed recon can reveal 70-80% of potential vulnerabilities and attack vectors before any active testing begins, saving significant time and reducing detection risk.

Reconnaissance serves multiple purposes in professional security assessments:

Types of Reconnaissance

TypeDescriptionDetection RiskAuthorization RequiredExample Techniques
Passive Reconnaissance Collecting information without directly interacting with the target. Uses publicly available sources, third-party services, and cached data. Leaves no traces in target logs. None / Undetectable Usually none (public data only) WHOIS queries, DNS record lookups, social media OSINT, search engine dorks, certificate transparency logs, data breach databases
Active Reconnaissance Directly interacting with the target systems to extract information. May trigger IDS/IPS alerts, generate log entries, and potentially disrupt services. Medium to High Written authorization required Port scanning (Nmap), service fingerprinting, vulnerability scanning, network mapping (traceroute), banner grabbing, SNMP enumeration

Professional Best Practice: Always start with exhaustive passive reconnaissance to minimize detection risk and legal exposure. Only move to active techniques after gathering maximum passive intelligence and obtaining explicit, written authorization from the target organization that defines scope, methods, and time windows.

The Reconnaissance Lifecycle

Professional reconnaissance follows a structured, repeatable methodology across distinct phases. Each phase builds upon information discovered in previous phases:

1
Footprinting
Initial passive data collection: domains, IP ranges, employees, technologies
2
Scanning
Active discovery of live hosts, open ports, and running services
3
Enumeration
Extracting detailed information from discovered services (users, shares, DNS records)
4
Mapping
Creating network topology diagrams, trust relationships, and attack surface visualization
5
Vulnerability Identification
Correlating findings with known vulnerabilities and potential attack paths

Reconnaissance Techniques & Methodologies

Modern reconnaissance combines multiple complementary techniques for comprehensive intelligence gathering. Professional testers use overlapping methods to ensure complete coverage:

DNS Enumeration

Querying DNS records (A, AAAA, MX, TXT, NS, SOA, CNAME, SRV) to discover subdomains, mail servers, SPF records, infrastructure details, and potential zone transfer vulnerabilities. Tools: dnsrecon, dig, fierce, sublist3r, Amass.

Port Scanning

Identifying open TCP/UDP ports, listening services, and firewall rules on target hosts. Different scan types (SYN, connect, FIN, NULL) bypass different detection mechanisms. Tools: Nmap, Masscan (high-speed), Zmap, Unicornscan.

Network Topology Mapping

Creating visual representations of network infrastructure including routers, firewalls, load balancers, internal hosts, and network segmentation. Uses traceroute, ICMP probes, and BGP looking glasses.

WHOIS & RWhois Lookup

Extracting domain registration details including registrant name, organization, email, address, registrar, creation/expiration dates, DNS servers, and net ranges via ARIN/RIPE/APNIC/LACNIC/AFRINIC.

Social Engineering & Phishing (Authorized)

Gathering information through human interaction with proper authorization, including pretexting calls, phishing simulations, USB drop attacks, and physical security assessments.

Advanced OSINT Collection

Harvesting publicly available data from social media (Twitter, LinkedIn, Facebook), forums (Reddit, 4chan), code repositories (GitHub, GitLab), paste sites (Pastebin), and public databases (OpenCorporates, SEC EDGAR).

Google Dorking / Search Engine Hacking

Using advanced search operators across Google, Bing, Baidu, and Shodan to find exposed documents (PDF, XLS, DOC), vulnerable systems (intitle:index.of), login portals, error messages containing path disclosures, and sensitive information.

Metadata Extraction & Analysis

Extracting hidden information from documents (Word, Excel, PDF, PowerPoint), images (JPEG, PNG), and files using ExifTool, Metagoofil, and FOCA. Reveals usernames, software versions, printer names, GPS coordinates, and internal paths.

SSL/TLS Certificate Analysis

Examining SSL certificates for subdomains (Subject Alternative Names), expiration dates, issuer information, certificate transparency logs (crt.sh, CertSpotter), and weak cryptographic algorithms.

Subdomain & Asset Discovery

Discovering subdomains, virtual hosts, and cloud assets through brute force, certificate transparency logs, DNS records (AXFR), search engines, and services like SecurityTrails, Censys, and Shodan.

Cloud Infrastructure Discovery

Identifying AWS S3 buckets, Azure Blob storage, Google Cloud Storage, cloud IP ranges, and serverless functions. Tools: S3Scanner, CloudEnum, BucketStream.

Code Repository Mining

Searching GitHub, GitLab, Bitbucket for exposed API keys, passwords, internal URLs, configuration files (.env, config.yml), hardcoded secrets, and employee information using grep, truffleHog, and gitrob.

Passive Reconnaissance Techniques (Undetectable)

Passive recon leaves no footprint in target logs, is completely undetectable, and requires no authorization for publicly available data (though ethical considerations still apply):

// Passive reconnaissance command examples # WHOIS lookup (public data) whois example.com # DNS MX record lookup (public) dig +short MX example.com # Certificate Transparency subdomain discovery (passive) curl -s "https://crt.sh/?q=%.example.com&output=json" | jq -r '.[].name_value' | sort -u # Wayback Machine URL discovery (passive) curl -s "http://web.archive.org/cdx/search/cdx?url=*.example.com/*&output=json&collapse=urlkey" | jq -r '.[] | .[2]' | sort -u # GitHub code search (public API) curl -s "https://api.github.com/search/code?q=example.com+extension:env"

Active Reconnaissance Techniques (Requires Authorization)

Active techniques directly interact with the target and require explicit, written authorization. These methods can trigger security alerts and may impact production systems:

// Active reconnaissance examples (authorized use only) # SYN port scan with service detection nmap -sS -sV -p 1-10000 -T4 192.168.1.0/24 # UDP port scan nmap -sU -p 53,123,161,500,4500 192.168.1.0/24 # Traceroute to map network path traceroute -I example.com # Banner grab with netcat echo "HEAD / HTTP/1.0\r\n\r\n" | nc -w 3 example.com 80 # SNMP enumeration snmpwalk -v 2c -c public 192.168.1.1

Critical Legal Notice: Active reconnaissance can trigger intrusion detection systems (IDS), set off SIEM alerts, generate incident response tickets, and may be illegal without explicit written authorization. Scanning systems you do not own or have explicit permission to test violates computer crime laws in most jurisdictions (CFAA, Computer Misuse Act 1990). Always obtain written authorization that defines scope, methods, and time windows before performing any active reconnaissance.

Essential Reconnaissance Tools

Professional reconnaissance requires mastery of both passive and active tools. Each tool serves specific use cases in the intelligence gathering process:

Nmap (Network Mapper)

The industry standard for network discovery, port scanning, OS fingerprinting, service version detection, and scriptable enumeration (NSE - Nmap Scripting Engine). Supports dozens of scan types and hundreds of scripts.

Recon-ng

Full-featured reconnaissance framework with modules for DNS enumeration, OSINT collection, social media intelligence, username discovery, and breach database correlation.

theHarvester

Gathers emails, subdomains, employee names, PGP keys, and hosts from search engines (Google, Bing, Baidu, Yahoo), LinkedIn, and public sources. Essential for footprinting organizations.

Shodan

Search engine for internet-connected devices, servers, webcams, ICS/SCADA systems, and exposed services. Reveals banners, geolocation, open ports, and vulnerability information.

Maltego

Graph-based intelligence platform for mapping relationships between people, companies, domains, DNS names, IP addresses, social media profiles, and online identities using transforms.

Masscan

High-speed port scanner capable of scanning the entire IPv4 internet in under 6 minutes. Useful for large-scale infrastructure discovery with proper authorization.

Whois / jwhois

Command-line and web-based domain registration information lookup for registrar, registrant, name servers, creation/expiration dates, and net ranges.

Metagoofil & FOCA

Extracts metadata from public documents (PDF, DOC, XLS, PPT) to gather usernames, software versions, server paths, and email addresses. FOCA adds fingerprinting capabilities.

dnsrecon / Amass

Comprehensive DNS enumeration tools for subdomain discovery, zone transfers, brute force, reverse lookups, and certificate transparency log queries. Amass is OWASP's asset discovery tool.

Nikto / Nuclei

Web server scanners that check for outdated software, dangerous files, misconfigurations, CGI vulnerabilities, and known CVEs. Nuclei is faster and template-based.

Amass (OWASP)

OWASP project for subdomain discovery through passive (DNS, certificates, search engines) and active (DNS brute force, zone transfers) techniques. Generates attack surface maps.

Censys / ZoomEye

Internet-wide scanning platforms similar to Shodan. Censys focuses on certificate analysis; ZoomEye specializes in device and service discovery across global networks.

Sublist3r / Assetfinder

Fast subdomain enumeration tools using OSINT sources including Google, Yahoo, Bing, Baidu, Netcraft, VirusTotal, DNSdumpster, and certificate transparency logs.

GoBuster / FFuF

Directory and file brute-forcing tools for web application reconnaissance. Discover hidden directories, admin panels, backup files, and API endpoints using wordlists.

Reconnaissance Best Practices & Operational Security

Conduct reconnaissance professionally, effectively, and safely with these operational security guidelines:

Professional Tip: The best recon specialists document their methodology meticulously for each engagement. Create a master template that includes tools used (with versions), commands executed, outputs organized by category (domains, IPs, users, services), attack surface diagrams, and vulnerability correlations. This enables repeatable, auditable assessments and serves as evidence for client reports.

← Back to Knowledge Base