The Complete Production SOP: How to Deploy and Run OWASP Amass In-Depth Network Attack Surface Mapping in Autonomous AI Agents
Step-by-step SOP to install and run OWASP Amass attack surface mapping in Codex, Claude Code, and Cursor. Includes verified prompts, configs, and fixes.
Technical Overview & Architectural Context
Without structured procedural guardrails, autonomous coding agents tasked with attack surface discovery frequently generate hallucinated subdomains, mix up passive OSINT with invasive active DNS brute-forcing, or run unthrottled queries that trigger rate limits and IPS blocks. Furthermore, agents often miss the crucial step of tracking differential changes across enumeration runs, failing to identify newly exposed cloud assets or dangling DNS pointers that leave organizations vulnerable to subdomain takeover. The OWASP Amass In-Depth Network Attack Surface Mapping skill enforces deterministic execution sequencing. It constrains the AI agent to follow a strict reconnaissance lifecycle: starting with purely passive intelligence collection (certificate transparency logs, search engines, WHOIS databases), escalating systematically to active DNS brute forcing and ASN sweeps only when explicitly permitted, and validating state transitions using Amass track. By binding workspace file access and strictly defining boundary rules, this skill prevents uncoordinated network probing and ensures output reproducibility.
Prerequisites & Environment Requirements
Verified Search Intents & Long-Tail Queries Solved
This operational tutorial is engineered to provide deterministic solutions for these developer search queries:
Step-by-Step Execution Playbook
Local Environment Setup & SKILL.md Mounting
Create the local skill manifest directory and inject verified procedural rules into agent runtime path.
Agent runtimes such as Claude Code and Cursor scan predefined project locations (e.g., .agents/skills/ or .claude/skills/) to discover context directives. By writing the canonical SKILL.md file to the workspace, the agent parses frontmatter triggers like 'map attack surface amass' and automatically adopts the execution SOP when domain discovery tasks are detected.
mkdir -p .agents/skills/amass-in-depth-network-mapping && curl -fsSL https://askills.dev/api/skills/amass-in-depth-network-mapping/raw -o .agents/skills/amass-in-depth-network-mapping/SKILL.md---
name: "amass-in-depth-network-mapping"
description: "Map organizational attack surfaces using active and passive OSINT techniques."
metadata:
author: "OWASP"
version: "1.0.0"
runtime_compatibility:
- "codex"
- "claude-code"
- "cursor"
- "windsurf"
triggers:
- "map attack surface amass"
- "run amass enum"
- "track network assets owasp amass"
permissions:
fs_read: true
fs_write: "workspace"
shell_exec: false
net_access: false
---Keep the SKILL.md instructions concise. Restricting Amass execution parameters inside the frontmatter rules saves up to 450 prompt tokens per conversation turn.
The skill defaults shell_exec and net_access to false in the manifest metadata. The agent must orchestrate Amass commands via approved local scripts or request explicit user confirmation before initiating outbound sweeps.
Configuring Datasources and Resolvers
Inject verified Amass configuration and custom DNS resolvers to avoid poisoned or rate-limited responses.
Amass relies on a structured config.yaml to query passive threat-intelligence feeds (e.g., Shodan, Censys, VirusTotal) and active resolvers. To ensure deterministic results and avoid agent hallucinations during lookup failures, provide a curated config template in the project directory that isolates API keys in a local untracked file.
mkdir -p config && cp config/datasources.yaml.example config/datasources.yaml && echo 'resolvers:
- 1.1.1.1
- 8.8.8.8' >> config/amass-config.yamlConfigure reliable public DNS resolvers explicitly in amass-config.yaml to avoid agent timeouts caused by faulty local ISP recursive resolvers.
Never allow the agent to commit datasources.yaml containing production API keys. Always add config/datasources.yaml to your .gitignore before running enumeration.
Intent Matching & Trigger Invocation
Verify deterministic activation using tested natural language prompts.
Test that the agent runtime matches the intent against the frontmatter triggers. By prompting with standard phrases such as 'run amass enum' or 'map attack surface amass', the agent enters the SOP workflow, adhering strictly to passive-first discovery before attempting active DNS permutation.
Instruct the agent to output results in JSON Lines format (-json) to enable automated programmatic parsing and linting in subsequent steps.
Verification, Diffing & Dangling CNAME Remediation
Execute automated self-healing checks and diff tracking before accepting agent deliverables.
A complete attack surface enumeration must verify output integrity. The agent must run 'amass track' to identify state deviations between the current run and previous scans, flagging stale DNS entries or CNAME records pointing to unclaimed S3 buckets or Azure endpoints for immediate remediation.
amass db -dir .amass -names -d example.com > ./reports/discovered_assets.txt && amass track -dir .amass -d example.com > ./reports/diff_report.txtReview the generated diff_report.txt directly using git diff to quickly identify newly provisioned microservices or unmonitored shadow IT assets.
Real-World Scenario: Autonomous Attack Surface Mapping and Dangling CNAME Audit for 'corp.example.com'
“Run amass enum to map the attack surface of corp.example.com using passive OSINT, check for dangling CNAME records, and document newly discovered assets in markdown.”
Runtime Troubleshooting & Failure Modes
Root Cause: The agent generated an invalid config.yaml with misaligned indentation under the 'resolvers' or 'datasources' YAML block when configuring Amass.
yamllint config/amass-config.yaml && sed -i 's/ / /g' config/amass-config.yamlRoot Cause: Unthrottled concurrent requests by the agent across passive API endpoints triggered vendor rate limiting, causing empty enumeration results.
amass enum -passive -d corp.example.com -config config/amass-config.yaml -max-dns-queries 50Frequently Asked Questions (OWASP Amass In-Depth Network Attack Surface Mapping SOP)
Q:Can I use OWASP Amass In-Depth Network Attack Surface Mapping across Codex, Claude Code, and Cursor simultaneously?
Yes. The skill conforms to the universal SKILL.md specification. Runtimes including Claude Code, Codex Desktop, Cursor, and Windsurf parse the YAML metadata and markdown rules identically to steer model execution.
Q:How does OWASP Amass In-Depth Network Attack Surface Mapping prevent context window overflow during long agent sessions?
The skill instructs the agent to persist raw enumeration telemetry into local JSONL files and workspace databases (.amass/) rather than printing hundreds of raw DNS lines to standard output. This limits the context window load to summary statistics and actionable findings.
Q:Does this skill require escalated root or container permissions?
No. The skill is audited with a security score of 98/100. Standard passive and active DNS enumeration with OWASP Amass runs unprivileged in user-space, requiring only read/write access to the local project workspace.
Ready to equip your autonomous agent with OWASP Amass In-Depth Network Attack Surface Mapping?
Copy the complete audited SKILL.md specification or download the 1-click zip bundle directly from our verified registry.