Automated subdomain takeover scanner for AWS S3, GitHub Pages, and Azure
Project description
๐ Subdomain Takeover Scanner
A Python tool that discovers subdomains and checks them for takeover vulnerabilities against AWS S3, GitHub Pages, and Azure.
โ ๏ธ For authorized use only. Always obtain written permission before scanning.
๐ง How It Works
- Passive recon โ Queries crt.sh (Certificate Transparency logs) for known subdomains
- Active brute-force โ Resolves subdomains from a wordlist via multi-threaded DNS
- CNAME matching โ Checks CNAME records against known vulnerable cloud service patterns
- HTTP fingerprinting โ Fetches each subdomain and looks for "unclaimed" error pages
- Reporting โ Outputs terminal table, HTML dashboard, and PDF report
โ๏ธ Setup
1. Clone the repository
git clone https://github.com/adarshvardhansingh12/subdomain-takeover-scanner.git
cd subdomain-takeover-scanner
2. Create virtual environment
python3 -m venv venv
3. Activate virtual environment
Linux / Kali / macOS
source venv/bin/activate
Windows
venv\Scripts\activate
4. Install dependencies
pip install -r requirements.txt
5. Verify installation (optional)
python3 main.py -h
๐ Usage
# Basic scan (passive + brute-force)
python3 main.py -d example.com
# Passive only (no brute-force)
python3 main.py -d example.com --no-bruteforce
# Custom wordlist + output name
python3 main.py -d example.com -w wordlists/subdomains.txt -o results/example_scan
# More threads for faster scanning
python3 main.py -d example.com -t 50
๐ Output
Each run produces:
- ๐ฅ๏ธ Terminal โ color-coded findings table with severity and confidence
- ๐ HTML report โ executive summary cards + full findings + all subdomains table
- ๐ PDF report โ professional pentest-style report with remediation steps
โ๏ธ Supported Takeover Services
| Service | Severity | Detection Method |
|---|---|---|
| AWS S3 | Critical | CNAME + NoSuchBucket response |
| GitHub Pages | High | CNAME + There isn't a GitHub Pages site here |
| Azure | Critical | CNAME + 404 Web Site not found |
๐ Project Structure
subdomain-takeover-scanner/
โโโ main.py
โโโ scanner/
โ โโโ enumerator.py
โ โโโ detector.py
โ โโโ fingerprints.py
โโโ reports/
โ โโโ html_report.py
โ โโโ pdf_report.py
โ โโโ terminal_report.py
โโโ wordlists/
โโโ requirements.txt
โโโ README.md
โโโ .gitignore
โ ๏ธ Limitations
- Depends on external APIs (may fail or rate-limit)
- Possible false positives
- Limited fingerprint database
- No rate limiting (yet)
๐ Roadmap
- crt.sh passive enumeration
- Multi-threaded DNS brute-force
- AWS S3 / GitHub Pages / Azure detection
- HTML + PDF + terminal reports
- Heroku / Netlify / Fastly fingerprints
- Slack/email alerting
- CI/CD integration mode
๐ผ Resume Line
Built a subdomain takeover scanner that combines passive CT log enumeration (crt.sh) with active DNS brute-forcing and HTTP fingerprinting to detect unclaimed AWS S3, GitHub Pages, and Azure resources. Generates PDF/HTML pentest reports with remediation guidance.
๐ค Contributors
- Adarshvardhan Singh
- Lincy Pandit
โญ Support
If you found this useful:
- โญ Star the repo
- ๐ด Fork it
- ๐ ๏ธ Contribute improvements
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subdomain_takeover_scanner-1.0.0.tar.gz.
File metadata
- Download URL: subdomain_takeover_scanner-1.0.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfdf13d1f4f4d7969b09a7e347131e1acd5f4c869b7006e7574ee7dbaecc637f
|
|
| MD5 |
f804e78da5ba6d9b06b9f85730fd3db7
|
|
| BLAKE2b-256 |
f7b18d14ccc45427e5ef58a39a0e321f5c00a0a0edcb115c68b448879aa499e4
|
File details
Details for the file subdomain_takeover_scanner-1.0.0-py3-none-any.whl.
File metadata
- Download URL: subdomain_takeover_scanner-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e70a7e735c3daabe1501c981b576879edc76710c85b2ce32429a6ed4513f618a
|
|
| MD5 |
571109e07ff6dd0a87e03c8af0f4229b
|
|
| BLAKE2b-256 |
738acfc148feb7bc3b39cd28bdb00e2edc6162b058e8ae61781ea998a4c8f8fe
|