4 Passive reconnaissance agents
This chapter covers:
- Explaining why reconnaissance pipelines outperform one-off scripts.
- Writing a single-file Python pipeline to gather passive evidence safely.
- Recording each step as a structured JSONL artifact and reading it as a story.
- Embedding scope, time windows, and approval gates for accountable automation.
- Identifying where AI fits naturally and setting you up for the intrusive enumeration and scoring work in Chapter 5.
In offensive security, reconnaissance is where every operation begins, and often where it’s won or lost. Before you exploit a target or even craft a payload, you need to map the terrain. In traditional reconnaissance engagements, this mapping involves a scattered mix of performing manual lookups of various IP addresses and domains, using command-line tools to navigate IT systems, and creating one-off scripts to accomplish specific tasks. Each manual run leaves a trail of ad-hoc notes and screenshots, which makes it difficult to trace your previous steps. Without established and automated IT systems that can comprehensively monitor your IT systems and leave artifacts for review, when someone asks, “Where did this host come from?”, there isn’t a clear answer.