Subdomain Takeover
OWASP: WSTG-CONF-10
Theory
Practice
Enumerate
Subdomains enumerationScanning for Subdomain Takeover
# Scan a list of subdomains
subzy run --targets domains.txt
# Scan for a single subdomain
subzy run --target test.example.com
# One-liner: find subdmains + scan for domain takeover
echo 'example.com'|(subfinder -all||assetfinder -subs-only)|uniq -u > domains.txt;subzy r --targets domains.txt | sed 's/\x1b\[[0-9;]*m//g' |grep -iE -A 2 "\[ VULNERABLE"# -title: Display page title
# -wc: Display response body word count
# -sc: Display response status-code
# -cl: Display response content-length
# -ct: Display response content-type
# -location: Display response redirect location
# -web-server: Display server name
# -asn: Display host ASN information
# -o: Output
cat domains.txt | httpx -title -wc -sc -cl -ct -location -web-server -asn -o alive-subdomains.txt
# Resume Scan (-resume)
# You can resume the scan using `resume.cfg`.
cat domains.txt | httpx -title -wc -sc -cl -ct -location -web-server -asn -o alive-subdomains.txt -resume resume.cfgSubdomain Takeover
Resources
Last updated