A comprehensive, modular external reconnaissance framework for penetration testing engagements.
This suite provides a structured approach to external reconnaissance with the following features:
- Modular Task Architecture: Easy to extend with new reconnaissance tasks
- Configurable Profiles: Default, Quick, and Aggressive scanning profiles
- Comprehensive Tooling: Integration with industry-standard tools
- Detailed Logging: All outputs logged and timestamped
- Flexible Execution: Run all tasks or specific individual tasks
run_external_recon_suite.sh # Main orchestrator
├── tasks/
│ ├── 00-validate.sh # Input validation and CIDR expansion
│ ├── 01-osint.sh # OSINT reconnaissance
│ ├── 02-nmap.sh # Network mapping and port scanning
│ ├── 03-http-scan.sh # HTTP/HTTPS reconnaissance
│ └── 04-testssl.sh # SSL/TLS security testing
├── config/
│ ├── default.conf # Default configuration
│ ├── quick.conf # Fast scanning profile
│ └── aggressive.conf # Comprehensive scanning profile
└── README_RECON_SUITE.md # This file
bash(4.0+)curljqnmap
- OSINT:
subfinder,dnsx,asnmap,cdncheck - HTTP:
httpx,nuclei,gowitness,whatweb - SSL/TLS:
testssl.sh
# Install Go (required for many tools)
# macOS
brew install go
# Linux
sudo apt install golang-go
# Install ProjectDiscovery tools
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
go install -v github.com/projectdiscovery/asnmap/cmd/asnmap@latest
go install -v github.com/projectdiscovery/cdncheck/cmd/cdncheck@latest
# Install other tools
go install github.com/sensepost/gowitness@latest
# Install testssl.sh
git clone --depth 1 https://github.com/drwetter/testssl.sh.git ~/tools/testssl.sh
sudo ln -s ~/tools/testssl.sh/testssl.sh /usr/local/bin/testssl.sh
# Update nuclei templates
nuclei -update-templates# Create engagement directory
export ENGAGEMENT_DIR="/path/to/your/engagement"
mkdir -p "${ENGAGEMENT_DIR}"
# Create targets file (IPs, CIDRs, FQDNs)
cat > "${ENGAGEMENT_DIR}/targets.txt" << EOF
192.168.1.0/24
10.0.0.5
example.com
EOF
# Create domains file (for OSINT)
cat > "${ENGAGEMENT_DIR}/domains.txt" << EOF
example.com
example.net
EOFexport ENGAGEMENT_DIR="/path/to/your/engagement"
export TARGETS_FILE="${ENGAGEMENT_DIR}/targets.txt"
export DOMAINS_FILE="${ENGAGEMENT_DIR}/domains.txt"# Run with default configuration
./run_external_recon_suite.sh
# Run with quick scan profile
./run_external_recon_suite.sh --config config/quick.conf
# Run with aggressive scan profile
./run_external_recon_suite.sh --config config/aggressive.conf# Run only OSINT
./run_external_recon_suite.sh --task 01-osint
# Run only Nmap scanning
./run_external_recon_suite.sh --task 02-nmap
# Run only HTTP scanning
./run_external_recon_suite.sh --task 03-http-scan# Skip SSL/TLS testing
./run_external_recon_suite.sh --skip 04-testssl
# Skip multiple tasks
./run_external_recon_suite.sh --skip 01-osint --skip 04-testssl# See what would be executed without running
./run_external_recon_suite.sh --dry-run./run_external_recon_suite.sh --listPurpose: Validate input files and expand CIDR ranges
What it does:
- Validates existence of required files and directories
- Expands CIDR notation to individual IPs
- Validates required and optional tools
- Creates expanded target list for subsequent tasks
Outputs:
RECON/targets_expanded_*.txt
Purpose: Open-Source Intelligence gathering
What it does:
- Subdomain enumeration (subfinder)
- DNS resolution and record retrieval (dnsx)
- ASN mapping (asnmap)
- CDN detection (cdncheck)
- Microsoft 365/Azure AD reconnaissance
- Certificate transparency log queries
Outputs:
RECON/osint_*/subfinder.jsonRECON/osint_*/dnsx.jsonRECON/osint_*/asnmap.jsonRECON/osint_*/cdncheck.jsonlRECON/osint_*/crtsh.json
Purpose: Network mapping and port scanning
What it does:
- Host discovery scan
- Top 1000 ports scan with service version detection
- Optional: Full TCP port scan (1-65535)
- Optional: UDP port scan on common ports
- Optional: NSE vulnerability scanning
- Service and OS detection
Outputs:
RECON/nmap_*/01_discovery.*RECON/nmap_*/02_top_ports.*RECON/nmap_*/live_hosts.txtRECON/nmap_*/web_services.txt
Purpose: HTTP/HTTPS service reconnaissance and vulnerability scanning
What it does:
- HTTP/HTTPS service probing (httpx)
- Technology detection
- Vulnerability scanning with Nuclei templates:
- CVEs
- Known vulnerabilities
- Exposures
- Misconfigurations
- Default credentials
- Exposed panels
- Screenshot capture (gowitness)
- Technology fingerprinting (whatweb)
Outputs:
RECON/http_scan_*/httpx.jsonRECON/http_scan_*/live_urls.txtRECON/http_scan_*/nuclei_*.txtRECON/http_scan_*/nuclei_all_findings.jsonRECON/http_scan_*/screenshots/
Purpose: SSL/TLS security testing
What it does:
- Comprehensive SSL/TLS testing
- Cipher suite analysis
- Protocol vulnerability detection
- Certificate validation
- Weak configuration identification
Outputs:
RECON/testssl_*/results/*.txtRECON/testssl_*/results/*.jsonRECON/testssl_*/results/*.htmlRECON/testssl_*/aggregate_summary.txtRECON/testssl_*/vulnerable_hosts.txt
After running the suite, your engagement directory will contain:
/path/to/engagement/
├── targets.txt # Your input targets
├── domains.txt # Your input domains
├── RECON/ # All reconnaissance outputs
│ ├── targets_expanded_*.txt # Expanded targets
│ ├── osint_*/ # OSINT results
│ ├── nmap_*/ # Nmap results
│ ├── http_scan_*/ # HTTP scan results
│ └── testssl_*/ # SSL/TLS test results
├── OUTPUT/
│ └── TEE/ # Command output logs
└── LOGS/ # Suite logs
ENGAGEMENT_DIR- Base directory for engagement outputsTARGETS_FILE- Path to targets file
DOMAINS_FILE- Path to domains fileRECON_VERBOSE- Enable verbose output (true/false)RECON_DRY_RUN- Dry run mode (true/false)
Configuration files allow you to customize scanning behavior:
# Use custom configuration
./run_external_recon_suite.sh --config /path/to/custom.confSee config/default.conf for all available options.
To add a new reconnaissance task:
- Create a new task file in
tasks/(e.g.,05-custom.sh) - Implement the task function:
#!/usr/bin/env bash
set -uo pipefail
IFS=$'\n\t'
run_task_05_custom() {
LOG info "Starting custom task"
# Your task implementation here
LOG pass "Custom task completed"
return 0
}- Update the main orchestrator to include your task:
# In run_external_recon_suite.sh
TASK_ENABLED[05-custom]=true
TASK_REQUIRED[05-custom]=false
TASK_ORDER+=("05-custom")- Always use a dedicated engagement directory to keep results organized
- Start with quick.conf to get a feel for the suite
- Review logs in
OUTPUT/TEE/for detailed command outputs - Use --dry-run first when testing new configurations
- Keep tools updated regularly (especially nuclei templates)
- Respect rate limits when scanning production systems
- Always have authorization before running reconnaissance
Install missing tools using the prerequisites section above.
Ensure you have write permissions to the engagement directory.
Some Nmap scans (SYN scan, OS detection) require root:
sudo -E ./run_external_recon_suite.sh- Use
config/quick.conffor faster scans - Disable full TCP scans:
NMAP_FULL_TCP_SCAN=false - Reduce thread counts in configuration
- Skip TestSSL for large target lists
- Reduce
HTTPX_THREADSandNUCLEI_BULK_SIZE - Process targets in smaller batches
- Disable parallel mode
This suite integrates with your existing reconnaissance scripts:
m365_recon_NG.sh- Automatically used in OSINT taskdns_email_recon.sh- Can be added as custom task- Common utilities from
common_utils.sh- Automatically sourced
This tool is for authorized security testing only. Always obtain proper authorization before scanning.
For issues or questions:
- Check the logs in
ENGAGEMENT_DIR/LOGS/ - Review command outputs in
ENGAGEMENT_DIR/OUTPUT/TEE/ - Run with
RECON_VERBOSE=truefor detailed output
- Initial release
- Modular task architecture
- Support for OSINT, Nmap, HTTP scanning, and SSL/TLS testing
- Three scanning profiles (default, quick, aggressive)
- Comprehensive logging and reporting