Security Resources

โŒ˜K
  1. Home
  2. Security Resources
  3. Penetration Testing Trick...
  4. One-Liners for Bug Bounty

One-Liners for Bug Bounty

High-Velocity Bug Bounty Terminal One-Liners
Curated, production-grade CLI one-liners for asset discovery, live host validation, parameter mining, secret hunting, and vulnerability triage.

1. Subdomain Discovery and Live Host Filtering

# Passive recon across multiple sources piped directly into live HTTP validation
subfinder -d target.com -silent | assetfinder -subs-only | sort -u | httpx -silent -status-code -title -tech-detect -o live-targets.txt

# Extract subdomains from Certificate Transparency logs via crt.sh
curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u | httpx -silent -mc 200,301,302

2. Endpoint & Historical URL Mining

# Mine historical endpoints and filter for parameters
gau target.com --threads 5 | waybackurls | sort -u | grep "=" | uro | tee params.txt

# Extract JavaScript files from live targets for endpoint analysis
cat live-targets.txt | katana -silent -jc | grep -E "\.js$" | sort -u | tee js-files.txt

3. Open Redirect & SSRF Fuzzing

# Filter parameters for open redirect testing and replace with collaborator payload
cat params.txt | gf redirect | qsreplace "https://attacker.com" | httpx -silent -status-code -location -mr "attacker.com"

# Fuzz for SSRF against cloud metadata Link-Local IP
cat params.txt | gf ssrf | qsreplace "http://169.254.169.254/latest/meta-data/" | httpx -silent -status-code -content-length -mr "ami-id"

4. CORS Misconfiguration Detection

# Test for Origin reflection and Access-Control-Allow-Credentials: true
cat live-targets.txt | while read url; do curl -s -I -H "Origin: https://evil.com" -H "Access-Control-Request-Method: GET" "$url" | grep -i "access-control-allow-origin: https://evil.com" && echo "[VULNERABLE CORS] $url"; done

5. Secret Hunting in JavaScript Bundles

# Download JS files and scan for AWS keys, API tokens, and JWTs using Nuclei
cat js-files.txt | nuclei -t http/exposures/tokens/ -silent -o exposed-tokens.txt

# Grep for sensitive keywords and API endpoints in downloaded JS bundles
cat js-files.txt | xargs -n 1 -P 10 curl -s | grep -E -o "(https?://[^/]+/[a-zA-Z0-9_.-]+|api_key[ =:'\"]+[a-zA-Z0-9_.-]+)" | sort -u