Skip to main content

vamp-subdomain-takeover

Subdomain Takeover Vulnerability Scanner — VampSecure Labs


Overview

vamp-subdomain-takeover detects subdomain takeover vulnerabilities by performing full CNAME chain resolution and comparing dangling DNS records against a fingerprint database of 30+ cloud services and hosting platforms.

A subdomain takeover occurs when a subdomain's DNS CNAME points to a cloud resource (GitHub Pages, AWS S3, Heroku, Netlify, etc.) that no longer exists, allowing an attacker to register that resource and serve content under the victim's domain. This vulnerability class directly enables phishing, session hijacking, and content injection.

The scanner classifies each result into three states: VULNERABLE (fingerprint confirmed in HTTP response body), POTENTIAL (orphaned CNAME detected, HTTP confirmation not possible), or SAFE.


Features

  • Asynchronous CNAME chain resolution via dns.asyncresolver — handles multi-hop delegation
  • 30+ service fingerprint signatures covering major cloud platforms
  • Dual-stage validation: DNS orphan detection followed by HTTP body fingerprint confirmation
  • CVSS scores embedded per service (GitHub Pages 8.1, AWS S3 9.3, Heroku 8.8, Netlify 8.8, Vercel 8.8, Azure 8.5, and more)
  • Scope-aware: scan all subdomains for a domain, or supply a custom subdomain list
  • Filter output to vulnerable hosts only with --only-vulnerable
  • Configurable concurrency for large-scale scans

Requirements

Python 3.11+
aiohttp >= 3.9.0
dnspython >= 2.4.0
rich >= 13.7.0

Install dependencies:

pip install -r requirements.txt

Installation

pip install vamp-subdomain-takeover
# o con Homebrew:
brew install vampsecure-labs/labs/vamp-subdomain-takeover
git clone https://github.com/belky-me/vamp-subdomain-takeover.git
cd vamp-subdomain-takeover
pip install -r requirements.txt

Usage

python vamp_subdomain_takeover.py -d DOMAIN [OPTIONS]

Required:
  -d, --domain DOMAIN            Apex domain to check (drives auto-enumeration if no list given)

Input:
  -f, --from-file FILE           File with subdomains to check (one per line)
      --subdomains SUB1,SUB2     Comma-separated subdomain list

Output:
  -o, --output FILE              Write findings to JSON
      --html FILE                Generate standalone HTML report
      --only-vulnerable          Output only VULNERABLE results (suppress POTENTIAL/SAFE)

Performance:
      --concurrency N            Concurrent DNS + HTTP workers (default: 30)
      --http-timeout N           HTTP response timeout in seconds (default: 12)

Examples

Check all subdomains of a target domain discovered via passive recon:

python vamp_subdomain_takeover.py -d example.com -f subdomains.txt

Check a domain and write only confirmed vulnerable findings to JSON:

python vamp_subdomain_takeover.py -d example.com -f subdomains.txt \
  --only-vulnerable -o takeover_findings.json

Generate an HTML report for client delivery:

python vamp_subdomain_takeover.py -d example.com -f subdomains.txt --html report.html

Check specific subdomains with reduced concurrency for rate-limited resolvers:

python vamp_subdomain_takeover.py -d example.com \
  --subdomains staging,dev,old,mail,legacy \
  --concurrency 10 -o findings.json

Output Formats

Format How to enable Description
Console Default Rich table with subdomain, CNAME chain, service, status, and CVSS
JSON -o FILE Full structured output: DNS chain, service, status, evidence
HTML --html FILE Standalone dark-theme report for client delivery or archival

Exit Codes

Code Meaning CI/CD usage
0 All subdomains safe — no takeover risk detected Pass gate
1 POTENTIAL findings — orphaned CNAMEs without HTTP confirmation Review recommended
2 VULNERABLE — confirmed takeover opportunity detected Fail gate — remediate immediately

Status Levels

Status Meaning
VULNERABLE Fingerprint string found in HTTP response body — takeover confirmed
POTENTIAL CNAME points to unclaimed resource but HTTP probe inconclusive
SAFE CNAME target is registered and responds normally
ERROR DNS resolution failed or host unreachable

Part of VampSecure Labs Toolkit

vamp-subdomain-takeover is part of the VampSecure Labs Security Research Toolkit — a collection of professional-grade, self-hosted security assessment tools.

Tool Purpose
vamp-forticheck Multi-vendor edge device CVE scanner
vamp-cve-oracle CVE intelligence and RBVM engine
vamp-passive-recon Passive recon and attack surface mapping
vamp-subdomain-takeover Subdomain takeover vulnerability scanner
vamp-cloud-enum Cloud storage bucket enumerator
vamp-orchestrator Multi-tool assessment orchestrator

© VampSecure Studios — VampSecure Labs Security Research Division
For authorized security assessments only. Unauthorized use is prohibited.


Versión

v1.1 — VampSecure Labs Security Research Division

Release files for vamp-subdomain-takeover 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vamp-subdomain-takeover 1.3
File Size Uploaded
vamp_subdomain_takeover-1.3.tar.gz 30.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vamp-subdomain-takeover 1.3
File Interpreter ABI Platform
vamp_subdomain_takeover-1.3-py3-none-any.whl Python 3 none any Details

Total release size: 61.6 kB

Release files / vamp_subdomain_takeover-1.3.tar.gz

Download URL vamp_subdomain_takeover-1.3.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1809271bc4b556bd3fe93406f87e305b348a5348cb2b78ce1560316d95ff9326
BLAKE2b-256 checksum
How to use checksums
d05f23ea5ad2ee0fd2c2866777921295f957700418b6792d71c156eed7738a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vamp_subdomain_takeover-1.3-py3-none-any.whl

Download URL vamp_subdomain_takeover-1.3-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e95fc070b90493f7cdd3928a7d2e959db2d1837377f1ce123c23740b734f25
BLAKE2b-256 checksum
How to use checksums
743e6a502038d921ce9528d21c1cb6f64c1c00c718740c84fb99d9be305c9065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.3 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page