Implementation:0xSteph Pentest ai agents Recon Advisor Agent
| Knowledge Sources | |
|---|---|
| Domains | Security, Reconnaissance, OPSEC |
| Last Updated | 2026-10-22 12:00 GMT |
Overview
Concrete agent definition for reconnaissance analysis and command execution provided by the pentest-ai-agents toolkit.
Description
The recon-advisor agent is a Tier 2 (Bash-capable) Claude Code subagent that operates in two modes: advisory mode (analyzing pasted scan output without scope) and execution mode (composing and running recon commands with user approval). It embeds the full scope-guard safety framework, provides safe command defaults for nmap, dig, curl, and netcat, and integrates with the findings database to persist discovered hosts and services.
This is a Pattern Doc: the agent is a system prompt defining reconnaissance methodology, tool defaults, an analysis framework, and findings database integration patterns.
Usage
- Advisory mode: Paste Nmap, masscan, or Nikto output for analysis and prioritization.
- Execution mode: Ask the agent to scan authorized targets directly — it composes safe commands, tags OPSEC level, and executes via Bash with user approval.
- Findings persistence: The agent automatically logs discovered hosts and services to `findings.sh`.
Code Reference
Source Location
- Repository: pentest-ai-agents
- File: agents/recon-advisor.md
Signature
---
name: recon-advisor
description: >
Delegates to this agent when the user pastes scan output (Nmap, Nessus,
Nikto, masscan, etc.), asks about reconnaissance techniques, needs help
with enumeration, wants to analyze an attack surface, or wants to run
recon tools against authorized targets.
tools:
- Bash
- Read
- Write
- Edit
- Grep
- Glob
model: sonnet
---
Import
# Loaded by Claude Code from .claude/agents/ when installed via install.sh
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Scan output | text | No (advisory) | Pasted tool output for analysis |
| Target | text | No (execution) | IP/domain within declared scope |
| Scope declaration | text | Yes (execution) | Authorized IP ranges, domains |
Outputs
| Name | Type | Description |
|---|---|---|
| Prioritized summary table | Markdown | Priority, target, service, finding, next step |
| High-value target list | Markdown | Systems likely to yield access/pivoting |
| CVE mappings | table │ Service versions mapped to known CVEs | |
| Evidence files | filesystem | Timestamped tool output files |
| DB records | SQLite | Hosts and services in findings database |
Usage Examples
Analyze Pasted Nmap Output (Advisory Mode)
User: [pastes Nmap scan output]
# Agent produces:
# 1. Prioritized Summary Table (Critical → Low priority targets)
# 2. High-Value Targets (DCs, management interfaces, outdated services)
# 3. Attack Vector Prioritization (exploitability × impact × probability)
# 4. CVE Mapping (service versions → known CVEs)
# 5. Recommended Next Steps (exact follow-up commands)
# 6. MITRE ATT&CK Mapping (T1595, T1046, T1087, etc.)
Execute a Recon Scan (Execution Mode)
# After scope is declared, agent composes safe commands:
nmap -sT -sV --min-rate 100 --max-rate 1000 --host-timeout 300s \
-oN nmap_10.10.1.0_20261022_140000.txt 10.10.1.0/24
# Agent tags: [MODERATE] TCP connect scan with service detection
# Claude Code prompts user for approval
# After execution, agent parses output and persists to findings DB:
findings.sh add host 10.10.1.50 --hostname "dc01.acme.local" --os "Windows Server 2019" --role "DC" --agent "recon-advisor"
findings.sh add service 10.10.1.50 445 --service "SMB" --version "Samba 4.10"
findings.sh log "recon-advisor" "nmap-scan" "Full TCP scan of 10.10.1.0/24"
Related Pages
Implements Principles
- Principle:0xSteph_Pentest_ai_agents_Reconnaissance
- Principle:0xSteph_Pentest_ai_agents_Scope_Enforcement_and_Safety
Uses Heuristics
- Heuristic:0xSteph_Pentest_ai_agents_OPSEC_Tagging
- Heuristic:0xSteph_Pentest_ai_agents_Least_Aggressive_First
Related Implementations
- Implementation:0xSteph_Pentest_ai_agents_Scope_Guard provides the embedded safety framework
- Implementation:0xSteph_Pentest_ai_agents_Findings_CLI receives host and service records from this agent