Amass Guide: Open Source Attack Surface Mapping
Learn to use Amass for comprehensive attack surface mapping including DNS enumeration, subdomain discovery, integration with APIs, and visualizations.
Attack Surface Mapping at Scale
Amass is an open-source intelligence-gathering framework for systematic attack surface mapping. Developed by the OWASP community, Amass aggregates data from over 50 passive sources combined with active enumeration to discover subdomains, DNS records, and network infrastructure. Its methodology mirrors the intelligence cycle — collect, process, analyze — at a scale impossible with manual reconnaissance.
Prerequisites
Before studying Amass, you should understand:
Installation
# In GO KALI, Amass is pre-installed
amass --help
# Manual installation
sudo apt install amass
# Or from GitHub releases
wget https://github.com/OWASP/Amass/releases/latest/download/amass_linux_amd64.zip
unzip amass_linux_amd64.zip
sudo mv amass /usr/local/bin/
Amass Data Sources
Amass pulls data from over 50 sources including:
Configuring API Keys
# Edit config file
nano ~/.config/amass/config.ini
# Add API keys for better results
[data_sources]
[data_sources.SecurityTrails]
apikey = YOUR_SECURITYTRAILS_KEY
[data_sources.VirusTotal]
apikey = YOUR_VIRUSTOTAL_KEY
[data_sources.Shodan]
apikey = YOUR_SHODAN_KEY
[data_sources.Censys]
apikey = YOUR_CENSYS_ID:YOUR_CENSYS_SECRET
Basic Usage
Subdomain Enumeration
# Basic passive enumeration
amass enum -d target.com
# With active techniques (DNS brute forcing)
amass enum -active -d target.com
# Save results to file
amass enum -d target.com -o results.txt
# JSON output for processing
amass enum -d target.com -o results.json -json
# Multiple domains
amass enum -d target.com -d target.org -d target.net
Intext Mode
# Extract domains from text files
amass intel -whois -d target.com
# Find related domains via reverse WHOIS
amass intel -org "Target Organization"
Advanced Enumeration
Brute Forcing Configuration
# Use custom wordlist
amass enum -active -d target.com -brute -w /path/to/wordlist.txt
# Include subdomains from known sources
amass enum -active -d target.com -brute -w /usr/share/amass/wordlists/jhaddix_all.txt
Multiple Techniques Combined
amass enum -active -d target.com -brute -w /usr/share/wordlists/dns/subdomains-top1million-50000.txt -o results.txt -json results.json -config ~/.config/amass/config.ini
Subdomain Resolving
# Verify subdomains resolve to IPs
amass enum -d target.com -resolve
# With custom resolvers
amass enum -d target.com -r 8.8.8.8,1.1.1.1
Visualizing Results
Graph Generation
# Create HTML visualization
amass viz -d target.com -o visualization/
# DOT format for Graphviz
amass viz -d target.com -dot -o amass.dot
dot -Tpng amass.dot -o amass_graph.png
# D3.js visualization
amass viz -d target.com -d3 -o d3_vis/
Example: Full Enumeration Pipeline
#!/bin/bash
DOMAIN=$1
echo "[*] Starting Amass enumeration for $DOMAIN"
# Phase 1: Passive enumeration
echo "[*] Passive enumeration..."
amass enum -passive -d "$DOMAIN" -o "passive_$DOMAIN.txt"
# Phase 2: Active enumeration with brute forcing
echo "[*] Active enumeration..."
amass enum -active -d "$DOMAIN" -brute -o "active_$DOMAIN.txt"
# Phase 3: Combine and deduplicate
echo "[*] Combining results..."
cat "passive_$DOMAIN.txt" "active_$DOMAIN.txt" | sort -u > "all_$DOMAIN.txt"
# Phase 4: Generate visualization
echo "[*] Generating visualization..."
amass viz -d "$DOMAIN" -dot -o "$DOMAIN.dot"
dot -Tpng "$DOMAIN.dot" -o "$DOMAIN.png"
echo "[*] Done! Found $(wc -l < "all_$DOMAIN.txt") unique subdomains"
Integration with Other Tools
With Nmap
# Pipe Amass results to Nmap
amass enum -d target.com | sort -u | xargs -I{} nmap -sV -p 80,443,8080 {} -oN nmap_scan.txt
With httprobe
# Find live HTTP servers from Amass output
amass enum -d target.com | sort -u | httprobe > live_servers.txt
# Check for HTTPS
amass enum -d target.com | sort -u | httprobe -c 50 -t 3000
With Aquatone
# Screenshot discovered web servers
amass enum -d target.com | sort -u | aquatone -out screenshots/
Real-World Use Cases
Merger and Acquisition Due Diligence
# Map all external assets of target company
amass intel -org "Target Company Name"
amass enum -d target-company.com -active
Bug Bounty Reconnaissance
# Comprehensive subdomain discovery
amass enum -active -d target.com -brute -o subs.txt
# Visualize attack surface
amass viz -d target.com -d3 -o bounty_report/
# Find related domains and IPs
amass intel -whois -d target.com
Common Mistakes
Not configuring API keys: Default Amass has limited data sources. Configure keys for maximum coverage.
Using passive mode only: Active brute forcing discovers subdomains that passive sources miss.
Not verifying results: Resolve found subdomains to confirm they are valid.
Running too aggressively: Respect DNS rate limits to avoid IP blocks.
Best Practices
Related Tools
Related Articles
Summary
Amass is a powerful attack surface mapping tool that combines 50+ passive data sources with active enumeration techniques. Proper configuration of API keys, combining passive and active modes, and integrating with other tools maximizes its effectiveness for reconnaissance.