โโโโฆ โฆโโ โฆ โฆโฆ โฆโโโโโฆโโโโโฆโโ
โโโโ โโ โฉโโ โโฃโ โโโโ โ โโฃ โ โฆโ
โโโโโโโโโโฉ โฉโโโโโโ โฉ โโโโฉโโ v5.0 PRO
Built for penetration testers, bug bounty hunters, and security researchers
SubHunter discovers subdomains at scale using passive intelligence & active brute-forcing,
then probes, fingerprints, and reports on every host โ all in one async pipeline.
Getting Started ยท Screenshots ยท Features ยท Documentation ยท Security
|
|
| ||||||||||||
| ||||||||||||
| ||||||||||||
|
# Clone
git clone https://github.com/mizazhaider-ceh/Sub-Hunter.git
cd Sub-Hunter
# Setup (recommended: virtual environment)
python -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
# Install
pip install -r requirements.txt
# Run
python subhunter.py -d example.com๐ธ Optional: Screenshots Setup
Playwright (Recommended):
pip install playwright
playwright install chromiumSelenium (Fallback):
pip install selenium webdriver-managerSubHunter auto-detects which engine is available.
๐ Optional: API Keys for Enhanced Results
Copy .env.example to .env and add keys for deeper passive enumeration:
cp .env.example .env| Source | Key Required | Free Tier |
|---|---|---|
| crt.sh | No | โ |
| HackerTarget | No | โ |
| AlienVault OTX | No | โ |
| urlscan.io | No | โ |
| SecurityTrails | Optional | 50/mo |
| Shodan | Optional | 100/mo |
python subhunter.pyLaunches a guided TUI โ select features, enter domain, and go.
# Basic scan (passive + brute-force + probing)
python subhunter.py -d target.com
# Full security audit โ everything enabled
python subhunter.py -d target.com --recursive --takeover --vhost --js-parse --ports --screenshots
# Passive only โ no active scanning
python subhunter.py -d target.com --no-brute --no-probe
# Custom wordlist + JSON output
python subhunter.py -d target.com -w /path/to/wordlist.txt -o results.json
# Resume an interrupted scan
python subhunter.py -d target.com --resume
# Quiet mode with high concurrency
python subhunter.py -d target.com -c 200 -q --html report.html| Option | Description | Default |
|---|---|---|
-d, --domain |
Target domain (required) | โ |
-w, --wordlist |
Custom wordlist for brute-forcing | Built-in (80 words) |
-o, --output |
Output file (.txt or .json) |
โ |
--html |
Custom HTML report path | Auto โ reports/ |
--recursive |
Enable recursive sub-subdomain discovery | Off |
--recursive-depth |
Max recursion depth | 2 |
--takeover |
Check for subdomain takeover vulnerabilities | Off |
--vhost |
Discover virtual hosts via Host header fuzzing | Off |
--js-parse |
Extract secrets & endpoints from JS files | Off |
--ports |
Enable port scanning (17 ports) | Off |
--screenshots |
Capture screenshots of alive hosts | Off |
--no-brute |
Skip DNS brute-forcing | Off |
--no-probe |
Skip HTTP probing | Off |
--no-wildcard-filter |
Disable wildcard DNS filtering | Off |
--resume |
Resume previous scan | Off |
-c, --concurrency |
Concurrent queries | 100 |
-q, --quiet |
Suppress output except results | Off |
--interactive |
Force interactive TUI mode | Off |
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ Phase 0 โโโโโถโ Phase 1 โโโโโถโ Phase 2 โโโโโถโ Phase 2.5 โ
โ Wildcard โ โ Passive โ โ Brute-force โ โ Recursive โ
โ Detection โ โ OSINT (6) โ โ DNS Wordlist โ โ Discovery โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโ
โ Phase 3 โ
โ HTTP Probe โ โโโ Tech Detection + Cloud ID + Headers
โ + Tech + โ๏ธ โ
โโโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Phase 4 โ โ Phase 5 โ โ Phase 6-7-8 โ
โ Ports โ โ Screenshots โ โ Takeover โ
โ Scanner โ โ Playwright โ โ VHost ยท JS โ
โโโโโโฌโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโ
โ Report โ
โ Generator โ โ HTML / JSON / TXT
โ (XSS-safe) โ
โโโโโโโโโโโโโโโ
๐ง Wildcard DNS Detection
SubHunter resolves 5 random subdomains (e.g., a8x9k2m1p3.target.com). If all return the same IP, wildcard DNS is detected and those IPs are filtered from all results to eliminate false positives. This prevents thousands of junk entries from polluting your data.
โ๏ธ Cloud Provider Detection (11 Providers)
Uses a priority-based detection strategy:
| Priority | Method | Reliability | Example |
|---|---|---|---|
| 1st | CNAME records | โ โ โ | *.s3.amazonaws.com โ AWS |
| 2nd | HTTP headers | โ โ โ | cf-ray header โ Cloudflare |
| 3rd | IP ranges | โ โโ | 104.16.x.x โ Cloudflare |
Supported Providers:
| Provider | CNAME | Headers | IP Range |
|---|---|---|---|
| AWS | โ | โ | โ |
| Azure | โ | โ | โ |
| GCP | โ | โ | โ |
| Cloudflare | โ | โ | โ |
| DigitalOcean | โ | โ | โ |
| Heroku | โ | โ | โ |
| Netlify | โ | โ | โ |
| Vercel | โ | โ | โ |
| Fastly | โ | โ | โ |
| Akamai | โ | โ | โ |
| GitHub Pages | โ | โ | โ |
๐ฏ Subdomain Takeover Detection (20+ Services)
SubHunter checks CNAME records against known vulnerable patterns, then verifies with HTTP response fingerprints:
| Service | CNAME Pattern | Fingerprint |
|---|---|---|
| GitHub Pages | *.github.io |
There isn't a GitHub Pages site here |
| Heroku | *.herokuapp.com |
No such app |
| AWS S3 | *.s3.amazonaws.com |
NoSuchBucket |
| Shopify | *.myshopify.com |
Sorry, this shop is currently unavailable |
| Azure | *.azurewebsites.net |
404 Web Site not found |
| Surge.sh | *.surge.sh |
project not found |
| Fastly | *.fastly.net |
Fastly error: unknown domain |
| Ghost | *.ghost.io |
The thing you were looking for is no longer here |
| Tumblr | *.tumblr.com |
There's nothing here |
| WordPress | *.wordpress.com |
Do you want to register |
| ...and 10+ more |
๐ Port Scanner
| Port | Service | Port | Service |
|---|---|---|---|
| 21 | FTP | 443 | HTTPS |
| 22 | SSH | 445 | SMB |
| 23 | Telnet | 993 | IMAPS |
| 25 | SMTP | 995 | POP3S |
| 53 | DNS | 3306 | MySQL |
| 80 | HTTP | 3389 | RDP |
| 110 | POP3 | 5432 | PostgreSQL |
| 143 | IMAP | 8080 | HTTP-Alt |
| 8443 | HTTPS-Alt |
Sub-Hunter/
โโโ subhunter.py # CLI/TUI entry point โ dual-mode launcher
โโโ core/ # Core scanning engine
โ โโโ dns.py # DNS resolution, brute-forcing, recursive discovery
โ โโโ probe.py # HTTP probing + tech detection + cloud detection
โ โโโ scanner.py # Async TCP port scanner
โ โโโ wildcard.py # Wildcard DNS detection & filtering
โ โโโ cloud.py # Cloud provider identification (11 providers)
โ โโโ takeover.py # Subdomain takeover vulnerability detection
โ โโโ vhost.py # Virtual host discovery via Host header fuzzing
โ โโโ jsparse.py # JavaScript file analysis for secrets & endpoints
โ โโโ screenshot.py # Screenshot capture (Playwright/Selenium fallback)
โ โโโ report.py # Premium HTML report generator (XSS-safe)
โโโ sources/ # Passive OSINT data collection
โ โโโ passive.py # 6 passive sources with async parallel fetching
โโโ utils/ # Shared utilities & configuration
โ โโโ config.py # Constants, wordlists, tech signatures, ports
โ โโโ display.py # Terminal colors, banner, progress formatting
โ โโโ menu.py # Interactive TUI menu system
โโโ tests/ # Test suite (49 tests)
โ โโโ test_subhunter.py # Domain validation, cloud, XSS, CLI, takeover tests
โโโ reports/ # Auto-saved HTML scan reports
โโโ assets/ # README screenshots & media
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment variable template (API keys)
โโโ SECURITY.md # Security policy & responsible disclosure
โโโ LICENSE # MIT License
# Run all 49 tests
python -m pytest tests/ -v
# Run with coverage report
python -m pytest tests/ -v --tb=short
# Run specific test class
python -m pytest tests/test_subhunter.py::TestCloudDetection -vTest Coverage:
| Test Suite | Tests | What's Tested |
|---|---|---|
TestDomainValidation |
14 | Valid/invalid domain regex patterns |
TestCloudDetection |
11 | CNAME, header, IP-based cloud identification |
TestWildcardDetection |
5 | Wildcard result parsing, filtering, random generation |
TestReportSecurity |
3 | XSS payload escaping in HTML reports |
TestConfig |
3 | Wordlists, ports, tech signatures |
TestDisplay |
3 | Version, colors, banner rendering |
TestCLI |
6 | Argument parsing (all flags including v5.0 additions) |
TestTakeoverSignatures |
2 | Signature loading, fingerprint structure |
TestStateManagement |
2 | Save/load/clear scan state |
| Area | Policy |
|---|---|
| Authorization | Only scan domains you have explicit permission to test |
| SSL Verification | Intentionally disabled for security assessment (standard pentest practice) |
| XSS Prevention | All user-controlled data is HTML-escaped in generated reports |
| Secrets Management | API keys stored in .env (git-ignored), never hardcoded |
| State Files | Plaintext JSON โ delete after scan completion |
| Rate Limiting | Use -c flag to control concurrency and avoid API abuse |
๐ See SECURITY.md for our responsible disclosure policy.
| Feature | Status | Priority |
|---|---|---|
| WAF Detection (Cloudflare, Akamai, AWS WAF) | ๐ Planned | High |
Permutation Scanning (dev-api, v1-test, stg-app) |
๐ Planned | High |
| Email Harvesting from discovered hosts | ๐ Planned | Medium |
| API Key Integrations (Shodan, SecurityTrails, Censys) | ๐ Planned | Medium |
| CI/CD Pipeline Integration (GitHub Actions) | ๐ Planned | Low |
| Docker Container | ๐ Planned | Low |
| Layer | Technology | Purpose |
|---|---|---|
| Runtime | Python 3.8+ | Core language |
| Async I/O | asyncio | High concurrency (100+ simultaneous queries) |
| HTTP | httpx | Modern async HTTP client with HTTP/2 |
| DNS | aiodns | Async DNS resolution via c-ares |
| Screenshots | Playwright / Selenium | Headless browser capture with auto-fallback |
| Reports | HTML / CSS / JS | Premium dark-themed dashboard reports |
| Testing | pytest | 49 unit & integration tests |
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Please read SECURITY.md before submitting security-related changes.
This project is licensed under the MIT License โ see the LICENSE file for details.