Principle:0xSteph Pentest ai agents Reconnaissance
| Knowledge Sources | |
|---|---|
| Domains | Security, Reconnaissance, OSINT |
| Last Updated | 2026-10-22 12:00 GMT |
Overview
Systematic process of discovering and mapping an authorized target's attack surface through passive intelligence gathering and active network scanning.
Description
Reconnaissance is the information-gathering phase of penetration testing. It bridges the gap between an abstract scope declaration and a concrete attack surface map. The principle addresses two complementary approaches: passive reconnaissance (OSINT, certificate transparency, DNS records from third parties — the target cannot detect the activity) and active reconnaissance (network scanning, service enumeration, banner grabbing — the target can detect the activity).
The key challenge in reconnaissance is prioritization: a typical scan produces hundreds of data points, but only a fraction represent exploitable attack surface. Effective reconnaissance categorizes findings by exploitability × impact × probability of success, identifies high-value targets (domain controllers, management interfaces, outdated services), and maps service versions to known CVEs.
Usage
Use this principle when:
- Mapping a network's attack surface for the first time
- Enumerating hosts, services, and versions within an authorized scope
- Performing OSINT collection against a target organization
- Prioritizing which discovered services to investigate first
Theoretical Basis
Reconnaissance follows a funnel model — starting broad and narrowing:
Pseudo-code Logic:
# Abstract reconnaissance algorithm (NOT real implementation)
# Phase 1: Host discovery
hosts = discover_hosts(scope) # -sn for large ranges first
# Phase 2: Service enumeration
for host in hosts:
services = scan_ports(host, safe_defaults) # -sT -sV
for service in services:
service.version = fingerprint(service)
service.cves = map_to_cve(service.version)
# Phase 3: Prioritization
targets = rank_by(exploitability, impact, probability)
high_value = filter_high_value(targets) # DCs, mgmt interfaces, old versions
Practical Guide
- Declare scope: Verify all targets are within authorized scope before scanning.
- Host discovery first: For large ranges, do host discovery (`-sn`) before port scanning.
- Safe defaults: Use TCP connect (`-sT`) over SYN (`-sS`), include rate limiting and timeouts.
- Passive before active: Start with DNS lookups, WHOIS, certificate transparency before active scanning.
- Service versioning: Always include `-sV` for service version detection to enable CVE mapping.
- Prioritize: Rank discovered services by exploitability × impact × probability.
- Identify high-value targets: DCs, database servers, management interfaces, development/staging systems.
- Persist findings: Record all discovered hosts and services to the findings database.
Related Pages
Implemented By
- Implementation:0xSteph_Pentest_ai_agents_Recon_Advisor_Agent
- Implementation:0xSteph_Pentest_ai_agents_OSINT_Collector_Agent
- Implementation:0xSteph_Pentest_ai_agents_Web_Hunter_Agent
- Implementation:0xSteph_Pentest_ai_agents_Findings_CLI
- Implementation:0xSteph_Pentest_ai_agents_Scope_Guard