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.
Knowledge Check
Frequently Asked Questions
Continue Learning
Attack Surface Mapping: Complete External Reconnaissance Guide
Learn to map external attack surfaces using OSINT tools. Master subdomain discovery, service enumeration, and asset inventory for penetration testing and bug bounty hunting.
OSINT · IntermediateSubdomain Enumeration: Finding Hidden Attack Surface
Master subdomain enumeration techniques using passive and active methods to discover hidden subdomains and expand attack surface mapping.
OSINT · AdvancedOSINT for Bug Bounty Hunters: Reconnaissance Mastery Guide
Complete OSINT guide for bug bounty hunters. Master reconnaissance workflows, subdomain discovery, email enumeration, and attack surface mapping for successful bug bounty submissions.
OSINT · IntermediateEmail Enumeration Techniques: Corporate Email Discovery for OSINT
Master email enumeration techniques using theHarvester, search engines, and certificate transparency logs. Learn corporate email pattern discovery, employee identification, and attack surface mapping.
Related Security Tools
Amass
OWASP Amass is the industry-standard in-depth network mapping and attack surface discovery tool. It uses active and passive techniques, scraping 20+ public data feeds, DNS enumeration, and certificate transparency logs to discover subdomains, IP addresses, and ASN data — making it essential for penetration testing, bug bounty hunting, and enterprise security assessments.
Information GatheringSubfinder
Learn how to use Subfinder in this beginner tutorial, from installing ProjectDiscovery's passive subdomain tool to running and reading your first authorised scan. Add API keys for wider coverage, save clean results, and chain Subfinder into httpx to validate live web hosts before further testing.
Information GatheringDNSenum
DNSenum is a multithreaded Perl script for DNS enumeration that discovers DNS records, attempts zone transfers, brute-forces subdomains, and performs reverse lookups. It is a foundational reconnaissance tool in Kali Linux for mapping a target domain's DNS infrastructure.
Information GatheringSpiderFoot
SpiderFoot is an open-source intelligence (OSINT) automation tool that integrates with over 200 public data sources to gather comprehensive intelligence on IP addresses, domain names, email addresses, and names. Created by Steve Micallef in 2012 and released under the MIT license, SpiderFoot automates the entire OSINT collection process with a powerful correlation engine that links findings across multiple data sources. It provides both a web-based UI (SpiderFoot HX) with interactive visualizations and a CLI for automation, making it one of the most popular OSINT frameworks for penetration testers, threat intelligence analysts, and security researchers. SpiderFoot is intended exclusively for authorized security testing, educational purposes, and defensive research.