Skip to content

About

Automation script

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

Repository files navigation

Bash Script Automation - Complete Security Toolkit

A comprehensive collection of Bash-based automation scripts for security reconnaissance, infrastructure analysis, web application testing, and Android APK inspection.

Purpose: Streamline bug bounty workflows, penetration testing, and authorized security assessments through automated reconnaissance and vulnerability discovery.

⚠️ Legal Notice: These scripts are intended for authorized security testing, bug bounty research, and educational learning only. Do not use against systems you do not own or are not authorized to assess. Users are solely responsible for compliance with local laws and organizational policies.


πŸ“ Repository Structure

Bash-Script-Automation/
β”œβ”€β”€ setup_tools.sh          # Tool installer & dependency checker
β”œβ”€β”€ recon.sh                # Main bug bounty recon automation
β”œβ”€β”€ infra_automator.sh      # Infrastructure & network reconnaissance
β”œβ”€β”€ pt_automator.sh         # Full pentesting automation (web + APK)
β”œβ”€β”€ bugbountyx.sh           # Smart bug bounty hunter
β”œβ”€β”€ Recon.sh                # Generic APK/app content recon
β”œβ”€β”€ APKRecon.sh             # Specialized Android APK analysis
β”œβ”€β”€ reports/                # Auto-generated output directory
└── README.md

πŸš€ Quick Start Guide

Step 1: Install Dependencies

chmod +x setup_tools.sh
./setup_tools.sh

This installs all required tools: subfinder, httpx, nuclei, ffuf, apktool, jadx, and more.

Step 2: Run Reconnaissance

chmod +x recon.sh
./recon.sh -d example.com

Step 3: Review Reports

cat reports/web_example.com_*/FINAL_REPORT.md

πŸ“‹ Script Descriptions

1️⃣ setup_tools.sh β€” Tool Installer & Checker

Purpose: Ensures all dependencies are installed and configured.

Features:

  • βœ… Checks for Go, Python3, git, curl, jq
  • πŸ“¦ Installs 30+ security tools via apt, pip, and Go
  • πŸ”§ Configures paths and wordlists
  • πŸ“Š Displays summary of installation status

Usage:

./setup_tools.sh              # Auto-install missing tools
./setup_tools.sh --check-only # Only check what's missing
./setup_tools.sh --force      # Reinstall all tools
./setup_tools.sh --quiet      # Suppress output

Installs:

  • Subdomain Enumeration: subfinder, assetfinder, amass, findomain
  • Live Host Probing: httpx, httprobe, naabu, aquatone
  • DNS & Infrastructure: dnsx, massdns, asnmap, whois
  • Endpoint Discovery: gau, waybackurls, katana, hakrawler, subjs
  • Vulnerability Scanning: nuclei, dalfox, ffuf, arjun, sqlmap
  • Subdomain Takeover: subzy, subjack
  • Python Tools: SecretFinder, Corsy, LinkFinder
  • Wordlists: SecLists (~1GB), Nuclei templates, gf patterns, DNS resolvers

2️⃣ recon.sh β€” Main Bug Bounty Automation

Purpose: Complete web reconnaissance and vulnerability discovery workflow.

Features:

  • πŸ” 7-phase automated workflow
  • πŸ“Š Structured output with markdown reports
  • 🎯 Supports passive and active scanning modes
  • πŸ”” Discord webhook notifications
  • ⚑ Configurable threading and rate limiting

Phases:

  1. Subdomain Enumeration β€” subfinder, assetfinder, amass, crt.sh, Wayback
  2. Live Host Probing β€” httpx fingerprinting + technology detection
  3. DNS & Infrastructure β€” dnsx, whois, ASN mapping, Shodan
  4. Endpoint & JS Recon β€” gau, waybackurls, katana, hakrawler, SecretFinder
  5. Vulnerability Scanning β€” nuclei, dalfox (XSS), directory fuzzing
  6. Subdomain Takeover β€” subzy, subjack, nuclei takeover templates
  7. Report Generation β€” Markdown summary with all findings

Usage:

./recon.sh -d example.com                                    # Full recon
./recon.sh -d example.com --quick                           # Fast tools only
./recon.sh -d example.com --passive                         # No active scanning
./recon.sh -d example.com -w https://discord.com/api/...    # With webhook
./recon.sh -d example.com --skip-vuln --skip-screens        # Skip slow phases

Output Structure:

results/example.com/
β”œβ”€β”€ subdomains/          (all.txt, subfinder.txt, crtsh.txt, wayback_subs.txt)
β”œβ”€β”€ live/                (live_urls.txt, httpx.json)
β”œβ”€β”€ dns/                 (resolved.txt, cnames.txt, whois.txt)
β”œβ”€β”€ endpoints/           (all.txt, gau.txt, katana.txt, wayback.txt)
β”œβ”€β”€ js/                  (jsfiles.txt, secrets.txt)
β”œβ”€β”€ vulns/               (nuclei.txt, xss_params.txt, nuclei.json)
β”œβ”€β”€ screenshots/         (aquatone screenshots)
└── reports/             (FINAL_REPORT.md)

3️⃣ infra_automator.sh β€” Infrastructure Reconnaissance

Purpose: Network-level reconnaissance and infrastructure mapping.

Features:

  • 🌐 DNS footprinting (WHOIS, dig, dnsrecon, zone transfers)
  • πŸ”Œ Full port scanning (nmap all 65535 ports)
  • πŸ”Ž Service version detection
  • πŸ›‘οΈ Protocol deep-dives (SMB, RPC, SSL/TLS)
  • πŸ“‹ Interactive menu system

Workflow:

Dependencies Check β†’ DNS WHOIS β†’ Zone Transfer Attempts β†’ 
Nmap All Ports β†’ Service Detection β†’ Vulnerability Scanning β†’ 
SMB/RPC/SSL Analysis β†’ Report Generation

Usage:

./infra_automator.sh
# Then choose from menu:
# 1) Run Dependency Check
# 2) Network Footprinting & DNS
# 3) Nmap Full Assault (all 65535 ports)
# 4) Protocol Deep Dive (SMB, RPC, SSL)
# 5) Exit Console

Output:

reports/infra_example.com_TIMESTAMP/
β”œβ”€β”€ whois.txt
β”œβ”€β”€ dig_any.txt
β”œβ”€β”€ zone_transfer_attempt.txt
β”œβ”€β”€ dnsrecon.txt
β”œβ”€β”€ nmap_all_ports.txt
β”œβ”€β”€ nmap_services.txt
β”œβ”€β”€ nmap_vulns.txt
β”œβ”€β”€ smb_enum.txt
β”œβ”€β”€ ssl_tls_scan.txt
└── rpc_info.txt

4️⃣ pt_automator.sh β€” Full Pentesting Automation

Purpose: Comprehensive pentesting framework for web + Android targets.

Features:

  • 🎯 8-step automated web exploitation
  • πŸ“± Android APK reverse engineering
  • πŸ”— Subdomain discovery + takeover checks
  • 🌐 Fuzzing, crawling, parameter extraction
  • πŸš€ Parallel vulnerability scanning (Nuclei, Dalfox, SQLMap)
  • πŸ“Š Raw findings markdown reports

Web Scanning Pipeline:

  1. Subdomain enumeration (subfinder, assetfinder, crt.sh)
  2. Subdomain takeover checks (subjack)
  3. Live host resolution (httpx)
  4. Directory & API fuzzing (ffuf)
  5. Deep web crawling (katana)
  6. Wayback Machine endpoint discovery
  7. XSS/SQLi-focused parameter testing
  8. Port scanning + JavaScript secret extraction
  9. Nuclei vulnerability scanning
  10. Report generation with findings categorized by severity

Android Scanning Pipeline:

  1. APK unpacking (apktool)
  2. Java decompilation (jadx)
  3. Regex-based secret extraction (API keys, JWTs, credentials)
  4. Exported components & deep links mapping
  5. Summary report generation

Usage:

./pt_automator.sh
# Menu options:
# 1) Bootstrap: Install Dependencies & Wordlists
# 2) Web App Autopilot (Full web scanning)
# 3) Android APK Autopilot (APK reverse engineering)
# 4) Exit Console

Output:

reports/web_example.com_TIMESTAMP/FINAL_REPORT.md        # Web findings
reports/android_app.apk_TIMESTAMP/FINAL_REPORT.md         # APK findings

5️⃣ bugbountyx.sh β€” Smart Bug Bounty Hunter

Purpose: Streamlined bug bounty workflow with intelligent prioritization.

Features:

  • 🎯 4-phase optimized workflow
  • πŸ’° Severity-based prioritization (Critical β†’ Medium/Low)
  • ⚑ Parallel vulnerability scanning
  • πŸ” Smart parameter filtering (SSRF/LFI vs XSS)
  • πŸ“Š Single ranked bounty report

Phases:

  1. Omnidirectional Recon β€” Subdomains, live hosts, endpoints
  2. Smart Filtering β€” Separate critical (SSRF/LFI) from high (XSS) parameters
  3. Multi-Threaded Scanning β€” Subjack, Dalfox, SQLMap, Nuclei in parallel
  4. Report Generation β€” Findings ranked by potential bounty value

Usage:

./bugbountyx.sh example.com
# or
./bugbountyx.sh
# then enter domain when prompted

Report Sections:

  • πŸ”΄ CRITICAL FINDINGS ($1000+ potential) β€” SQLi, RCE, SSRF, CVEs
  • 🟠 HIGH FINDINGS ($500+ potential) β€” CVEs, takeovers, XSS
  • 🟑 MEDIUM/LOW FINDINGS β€” Info disclosures, misconfigs
  • 🎯 TOP TARGETS β€” Admin, login, API endpoints for manual testing

6️⃣ Recon.sh β€” Generic Content Reconnaissance

Purpose: Static analysis of any APK or app archive for sensitive data.

Features:

  • πŸ“¦ Unzips and processes all files (text + binary)
  • πŸ” Extracts URLs, API endpoints, secrets, JWTs, private keys
  • 🌐 Firebase, cloud storage, and credential detection
  • 🎯 MIME-type aware processing (avoids binary noise)
  • πŸ“‹ Categorized output files

Detections:

  • URLs (https://...)
  • API endpoints (/api/, /v1/, /auth/, etc.)
  • API keys (Google, AWS, Stripe)
  • Firebase references
  • Cloud storage buckets
  • JWT-like tokens
  • Private key markers
  • Secrets keywords

Usage:

./Recon.sh app.apk

Output:

app_recon/
β”œβ”€β”€ urls.txt
β”œβ”€β”€ api_endpoints.txt
β”œβ”€β”€ keys_secrets.txt
β”œβ”€β”€ firebase_matches.txt
β”œβ”€β”€ cloud_storage.txt
β”œβ”€β”€ jwts.txt
β”œβ”€β”€ private_keys_markers.txt
β”œβ”€β”€ smali_references.txt
β”œβ”€β”€ strings_all_extracted.txt
└── summary.txt

7️⃣ APKRecon.sh β€” Android APK Deep Analysis

Purpose: Specialized reconnaissance for Android applications.

Features:

  • πŸ“± APK unpacking and manifest extraction
  • πŸ”§ Smali bytecode analysis
  • πŸ”‘ Hardcoded secrets detection
  • πŸ”— Exported components mapping
  • 🌐 Deep link discovery
  • πŸ”“ Permission analysis

Detections:

  • Google API keys
  • AWS credentials (AKIA keys)
  • Firebase endpoints
  • JWT tokens
  • Private keys
  • Cloud service references
  • Exported Android components
  • Deep link schemes

Usage:

./APKRecon.sh com.example.app.apk

Output:

com.example.app_recon/
β”œβ”€β”€ apk_unzipped/          (full APK extraction)
β”œβ”€β”€ urls.txt               (extracted URLs)
β”œβ”€β”€ api_endpoints.txt      (API routes)
β”œβ”€β”€ critical_secrets.txt   (API keys, JWTs, tokens)
β”œβ”€β”€ firebase_matches.txt   (Firebase references)
β”œβ”€β”€ deeplinks.txt          (deep link schemes)
β”œβ”€β”€ exported_components.txt (exported activities/services)
└── summary.txt            (analysis summary)

πŸ› οΈ Tools Ecosystem

Subdomain Enumeration (6 tools)

  • subfinder β€” Multi-source passive enumeration (ProjectDiscovery)
  • assetfinder β€” Certificate transparency & common sources
  • amass β€” OWASP comprehensive network mapping
  • findomain β€” Fast alternative with good coverage
  • crt.sh β€” Certificate transparency queries
  • Wayback Machine β€” Historical subdomain extraction

Live Host Probing (4 tools)

  • httpx β€” Probe & fingerprint with tech detection
  • httprobe β€” Simple HTTP probe verification
  • naabu β€” Fast port scanner (top 1000 ports)
  • aquatone β€” Screenshot capture & visualization

DNS & Infrastructure (5 tools)

  • dnsx β€” DNS resolution + CNAME extraction
  • massdns β€” Subdomain resolution at scale
  • asnmap β€” ASN range mapping
  • whois β€” WHOIS lookups
  • Shodan β€” Shodan API queries

Endpoint Discovery (6 tools)

  • gau β€” Wayback + CommonCrawl + OTX URLs
  • waybackurls β€” Wayback Machine endpoints
  • katana β€” Active web crawling (depth control)
  • hakrawler β€” Recursive crawling
  • subjs β€” JavaScript file discovery
  • gf β€” Grep patterns for parameters

Vulnerability Scanning (5 tools)

  • nuclei β€” Template-based vulnerability scanner
  • dalfox β€” XSS detection & verification
  • ffuf β€” Directory & parameter fuzzing
  • arjun β€” Hidden parameter discovery
  • sqlmap β€” SQL injection detection

Subdomain Takeover (2 tools)

  • subzy β€” Fast takeover detection
  • subjack β€” Cross-platform takeover scanner

Reverse Engineering (3 tools)

  • apktool β€” APK unpacking & repackaging
  • jadx β€” Java decompiler for APKs
  • strings β€” Extract readable strings from binaries

Python Utilities (3 tools)

  • SecretFinder β€” JavaScript secret extraction
  • Corsy β€” CORS misconfiguration scanning
  • LinkFinder β€” JavaScript endpoint discovery

πŸ“Š Recommended Workflow

For Bug Bounty Hunters:

1. ./setup_tools.sh           # One-time setup
2. ./bugbountyx.sh example.com # Fast prioritized scan
3. Review CRITICAL findings    # Focus on high bounty items
4. Manual validation           # Confirm & exploit

For Penetration Testers:

1. ./setup_tools.sh              # One-time setup
2. ./infra_automator.sh          # Network reconnaissance
3. ./recon.sh -d target.com      # Deep web assessment
4. ./pt_automator.sh             # Full exploitation automation
5. Review reports in ./reports/  # Consolidated findings

For Security Researchers:

1. ./setup_tools.sh              # Tool installation
2. ./Recon.sh app.apk            # Generic content analysis
3. ./APKRecon.sh app.apk         # Specialized APK analysis
4. Manual code review            # Deep-dive into findings

βš™οΈ Configuration & Customization

Environment Variables

export DISCORD_WEBHOOK="https://discord.com/api/webhooks/..."  # Real-time notifications
export SHODAN_API_KEY="your_key_here"                          # Shodan queries
export WORDLIST_DIR="$HOME/wordlists"                          # Custom wordlist path
export NUCLEI_TEMPLATES="$HOME/nuclei-templates"               # Template path

Script-Specific Options

./recon.sh -d example.com -o ./custom_output/  # Custom output dir
./recon.sh -d example.com -t 100               # Custom threads
./recon.sh -d example.com --passive            # Passive mode only
./recon.sh -d example.com --quick              # Fast tools only

πŸ“ˆ Output & Reports

Report Locations

./reports/
β”œβ”€β”€ web_example.com_20260101_120000/
β”‚   β”œβ”€β”€ FINAL_REPORT.md
β”‚   β”œβ”€β”€ subdomains/
β”‚   β”œβ”€β”€ live/
β”‚   β”œβ”€β”€ endpoints/
β”‚   β”œβ”€β”€ vulns/
β”‚   └── js/
β”œβ”€β”€ infra_192.168.1.1_20260101_120000/
β”‚   β”œβ”€β”€ nmap_all_ports.txt
β”‚   β”œβ”€β”€ nmap_services.txt
β”‚   β”œβ”€β”€ nmap_vulns.txt
β”‚   └── ...
└── android_app.apk_20260101_120000/
    β”œβ”€β”€ FINAL_REPORT.md
    └── ...

Report Contents

  • Findings Summary β€” Counts by category
  • Critical Vulnerabilities β€” High-priority issues
  • Endpoints & Parameters β€” Attack surface mapping
  • Technology Stack β€” Fingerprinted technologies
  • Subdomains & IPs β€” Infrastructure mapping
  • Secrets & Keys β€” Extracted credentials (sanitized for review)

πŸ”’ Security & Legal Disclaimers

Authorization Required:

  • Only use these scripts against systems you own or have explicit written permission to test
  • Unauthorized access to computer systems is illegal in most jurisdictions

Compliance:

  • Comply with local laws (CFAA in US, CMA 2000 in UK, etc.)
  • Follow organizational security policies and bug bounty program rules
  • Respect rate limits and avoid DoS-level activity
  • Keep findings confidential until disclosure window

Responsible Disclosure:

  • Report critical findings through official bug bounty channels
  • Allow vendors reasonable time to patch (30-90 days typical)
  • Document all steps for reproducibility

πŸ“ Examples

Scan Public Company (Authorized)

./recon.sh -d company.com -w "$DISCORD_WEBHOOK"
# Wait for completion
cat reports/web_company.com_*/FINAL_REPORT.md

Analyze Android App (Authorized)

./APKRecon.sh ~/Downloads/app.apk
cat app_recon/critical_secrets.txt

Quick Infrastructure Assessment

./infra_automator.sh
# Choose option 3 for full Nmap assault
# Results in reports/infra_*/ directory

🀝 Contributing

To extend this repository:

  • Keep scripts POSIX-compatible where possible
  • Avoid hardcoded paths; use environment variables
  • Add comprehensive logging and error handling
  • Maintain organized output directory structures
  • Update this README for new features
  • Include usage examples for new scripts

πŸ“„ License

This project does not currently declare a license. Before redistributing or sharing these tools, confirm legal permissions and ensure compliance with open-source licenses of included tools.


πŸ“ž Support & Troubleshooting

Common Issues:

  1. Tools not found after install:

    export PATH="$PATH:$HOME/go/bin"
    echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.bashrc
  2. Permission denied on scripts:

    chmod +x *.sh
  3. Too many requests (rate limiting):

    • Reduce THREADS and RATE_LIMIT variables
    • Add delays between scans
  4. Out of memory:

    • Use --quick mode
    • Reduce thread count with -t

🎯 Summary

This toolkit combines 8 specialized Bash automation scripts providing:

  • Complete Web Reconnaissance (recon.sh)
  • Infrastructure Mapping (infra_automator.sh)
  • Full Pentesting Automation (pt_automator.sh)
  • Bug Bounty Optimization (bugbountyx.sh)
  • Android Analysis (APKRecon.sh, Recon.sh)
  • Dependency Management (setup_tools.sh)

Together, they streamline authorized security assessments from reconnaissance through exploitation.


Last Updated: October 2026
Maintained by: Decentralized3
GitHub: https://github.com/Decentralized3/Bash-Script-Automation

About

Automation script

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages