Skip to content

keusuanl-sec/ScopeHunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ScopeHunter

A modular reconnaissance framework for bug bounty hunters and penetration testers. Built for efficiency, organization, and scalability.

License: MIT Platform PRs Welcome


Philosophy

"Your bugs are only as good as your recon."

ScopeHunter is designed around how professional bug bounty hunters actually work:

  • One workspace per program β€” Not per domain. Programs have multiple root domains.
  • Scope-first β€” Never accidentally test out-of-scope assets.
  • Incremental discovery β€” Add new root domains anytime, recon only what's new.
  • Merged attack surface β€” See your complete target landscape in one place.

Features

Feature Description
Preflight Check Validates your entire environment before running
Scope Enforcement Won't execute against out-of-scope domains
Modular Phases Run all phases or just the one you need
Multi-Root Support One program, unlimited root domains
Auto-Merge Combines all results into unified attack surface
Dry Run Mode Preview commands without executing
Clean Output Organized, deduplicated, ready for testing

What's Included

ScopeHunter/
β”œβ”€β”€ recon-preflight.sh    # Environment validator
β”œβ”€β”€ recon-init.sh         # Workspace initializer
β”œβ”€β”€ recon-run.sh          # Recon execution engine
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
└── .gitignore

Quick Start

1. Clone the Repository

git clone https://github.com/keusuanl-sec/ScopeHunter.git
cd ScopeHunter
chmod +x *.sh

2. Run Preflight Check

./recon-preflight.sh --fix

This checks for required tools and downloads missing wordlists/resolvers. image image

3. Initialize a Program Workspace

./recon-init.sh hackerone-acme --tag "hackerone"
image

4. Add Target to Scope

echo "target.com" >> ~/recon/hackerone-acme/scope.in.txt
echo "target.com" >> ~/recon/hackerone-acme/roots/known-roots.txt

5. Run Recon

./recon-run.sh hackerone-acme --root target.com
image image image

6. View Results

tree ~/recon/hackerone-acme/recon/
cat ~/recon/hackerone-acme/recon/target.com/httpx-output.txt
image

πŸ“– Usage

Initialize Workspace

./recon-init.sh <program-name> [--tag "platform-tag"]

# Examples
./recon-init.sh bugcrowd-tesla --tag "bugcrowd"
./recon-init.sh htb-machine --tag "hackthebox"
./recon-init.sh personal-research

Run Recon

# Single root domain
./recon-run.sh <program> --root <domain>

# All known roots
./recon-run.sh <program> --all

# Specific phase only
./recon-run.sh <program> --root <domain> --phase passive

# Merge all results
./recon-run.sh <program> --merge

# Preview without running
./recon-run.sh <program> --root <domain> --dry-run

Available Phases

Phase Description
passive Subfinder passive enumeration
resolve DNS resolution (filter dead domains)
active Brute-force + permutation discovery
probe HTTP probing with httpx
ports Port scanning with nmap
all Run all phases (default)

πŸ“‚ Workspace Structure

When you initialize a program, ScopeHunter creates:

~/recon/<program-name>/
β”œβ”€β”€ config.env              # Workspace configuration
β”œβ”€β”€ scope.in.txt            # In-scope root domains
β”œβ”€β”€ scope.out.txt           # Out-of-scope exclusions
β”œβ”€β”€ NOTES.md                # Your findings and observations
β”œβ”€β”€ roots/
β”‚   β”œβ”€β”€ known-roots.txt     # All discovered root domains
β”‚   β”œβ”€β”€ pending-roots.txt   # Roots to process later
β”‚   └── discovery-log.md    # How/when you found each root
β”œβ”€β”€ recon/                  # Per-root recon outputs
β”‚   └── <domain>/
β”‚       β”œβ”€β”€ passive-subs.txt
β”‚       β”œβ”€β”€ resolved.txt
β”‚       β”œβ”€β”€ all-subs.txt
β”‚       β”œβ”€β”€ httpx-output.txt
β”‚       └── live-hosts.txt
β”œβ”€β”€ merged/                 # Combined attack surface
β”‚   β”œβ”€β”€ all-subs.txt
β”‚   β”œβ”€β”€ all-live.txt
β”‚   └── all-httpx.txt
└── reports/                # Curated findings

πŸ”§ Requirements

Tools (installed via recon-preflight.sh --fix)

Tool Purpose
subfinder Passive subdomain enumeration
puredns DNS resolution + brute-forcing
alterx Subdomain permutation generation
httpx HTTP probing + tech detection
anew Deduplication utility
massdns Fast DNS resolution backend
nmap Port scanning
jq JSON parsing

Files

File Purpose
resolvers.txt Public DNS servers for puredns
subdomains-5k.txt Quick brute-force wordlist
subdomains-100k.txt Thorough brute-force wordlist

All files are automatically downloaded by recon-preflight.sh --fix.


πŸ”„ Workflow Example

# Day 1: Start a new program
./recon-init.sh hackerone-acme
echo "acme.com" >> ~/recon/hackerone-acme/scope.in.txt
echo "acme.com" >> ~/recon/hackerone-acme/roots/known-roots.txt
./recon-run.sh hackerone-acme --root acme.com

# Day 3: Discover acquired company via Crunchbase
echo "acquired-startup.io" >> ~/recon/hackerone-acme/scope.in.txt
echo "acquired-startup.io" >> ~/recon/hackerone-acme/roots/known-roots.txt
./recon-run.sh hackerone-acme --root acquired-startup.io

# Day 5: Find another domain via reverse WHOIS
echo "acme-internal.net" >> ~/recon/hackerone-acme/scope.in.txt
echo "acme-internal.net" >> ~/recon/hackerone-acme/roots/known-roots.txt
./recon-run.sh hackerone-acme --root acme-internal.net

# Merge everything for complete attack surface
./recon-run.sh hackerone-acme --merge

# View unified results
cat ~/recon/hackerone-acme/merged/all-live.txt

βš™οΈ Configuration

Edit config.env in your workspace to customize:

# Tool settings
THREADS=50
HTTPX_RATE=150
PUREDNS_RATE=500

# Workflow options
SKIP_BRUTEFORCE=0       # Set to 1 to skip
SKIP_PERMUTATIONS=0     # Set to 1 to skip
SKIP_PORTSCAN=0         # Set to 1 to skip
WORDLIST_SIZE="small"   # "small" or "medium"

# Safety
DRY_RUN=0               # Set to 1 to preview only

πŸ›‘οΈ Scope Safety

ScopeHunter enforces scope at every step:

  1. Before execution β€” Validates domain is in scope.in.txt
  2. During merge β€” Filters results against scope.out.txt
  3. Won't run β€” If domain isn't explicitly in scope

This protects you from accidentally testing out-of-scope assets.


🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

keusuanl-sec (@keusuanl-sec)


πŸ™ Acknowledgments

  • Built with assistance from Claude AI by Anthropic
  • Inspired by the wiz Bugbounty-Masterclass Course, Hackthebox, bug bounty community and hunters sharing their methodologies
  • Tools by ProjectDiscovery, tomnomnom, and others

⚠️ Disclaimer

This tool is intended for authorized security testing only. Always ensure you have written permission before testing any target. The author is not responsible for misuse of this tool.


Happy Hunting! 🎯

About

A modular reconnaissance framework for bug bounty hunters & Practicing CTF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages