Concepts & Architecture
This guide explains the fundamental concepts behind reconFTW, its architecture, and how it orchestrates reconnaissance workflows.
What is reconFTW?
reconFTW is a modular reconnaissance automation framework that integrates 80+ security tools into a unified workflow. Rather than running tools individually and correlating results manually, reconFTW:
Orchestrates tools in the optimal order
Manages input/output between tools automatically
Deduplicates and normalizes results
Resumes interrupted scans from checkpoints
Scales across distributed infrastructure (via Axiom)
Philosophy
reconFTW follows these design principles:
Thorough over fast: Cover all attack surface, don't miss findings
Modular: Enable/disable any component without breaking others
Resumable: Never lose progress on long-running scans
Configurable: Every behavior can be customized
Fail-soft: Continue scanning even if individual tools fail
Reconnaissance Methodology
reconFTW implements a structured reconnaissance methodology following industry best practices:

Phase 1: OSINT (Open Source Intelligence)
Gather publicly available information about the target:
Google Dorks
Find exposed files/pages
dorks_hunter
GitHub Dorks
Find leaked credentials
gitdorks_go
Metadata
Extract document metadata
metagoofil, exiftool
Email Harvesting
Discover email addresses
emailfinder
API Leaks
Find exposed APIs
porch-pirate, SwaggerSpy
Domain Info
WHOIS, registrant data
whois, msftrecon
Phase 2: Subdomain Enumeration
Discover all subdomains associated with the target:
Passive
Non-intrusive
Query APIs, CT logs, archives
Active/Bruteforce
Intrusive
DNS queries with wordlists
Permutations
Intrusive
Generate variations
Recursive
Both
Enumerate subdomains of subdomains
Scraping
Semi-passive
Extract from web pages
Phase 3: Web Analysis
Analyze discovered web assets:
HTTP probing (find live servers)
Screenshot capture
URL extraction (passive + crawling)
JavaScript analysis (secrets, endpoints)
Directory fuzzing
CMS detection
Parameter discovery
Phase 4: Vulnerability Scanning
Test for security issues:
CVE scanning with Nuclei
Injection testing (XSS, SQLi, SSTI, LFI)
Server-side vulnerabilities (SSRF, command injection)
Misconfigurations (CORS, open redirect)
SSL/TLS issues
Subdomain takeovers
Architecture Overview
reconFTW uses a modular architecture where components are separated by responsibility:
Module Loading Order
Modules are loaded in a specific order to ensure dependencies are satisfied:
Key Functions
Lifecycle Functions (core.sh)
Every scan function follows this pattern:
Utility Functions (utils.sh)
sanitize_domain()
Clean and validate domain input
sanitize_ip()
Clean and validate IP/CIDR input
deleteOutScoped()
Remove out-of-scope entries
run_command()
Execute with logging (respects DRY_RUN)
should_run_deep()
Check if DEEP mode should activate
retry_with_backoff()
Retry failed operations
check_disk_space()
Verify available storage
Common Library Functions (lib/common.sh)
ensure_dirs()
Create multiple directories safely
safe_backup()
Backup file with timestamp
skip_notification()
Log skipped function notification
count_lines()
Count lines in file safely
safe_count()
Count with fallback to 0
dedupe_append()
Append and deduplicate file
run_tool()
Execute tool with timeout and error handling
process_results()
Process and dedupe results
should_run_function()
Check if function should run (checkpoint aware)
Parallelization Functions (lib/parallel.sh)
parallel_run()
Run commands in parallel with job limit
parallel_funcs()
Run bash functions in parallel
parallel_batch()
Run commands with rate limiting
parallel_passive_enum()
Parallel passive subdomain enumeration
parallel_active_enum()
Parallel active DNS enumeration
parallel_postactive_enum()
Parallel post-resolution (TLS, analytics)
parallel_brute_enum()
Parallel brute force (resource limited)
parallel_web_vulns()
Parallel web vulnerability scanning
parallel_subdomains_full()
Orchestrate full parallelized subdomain enum
Data Flow
Understanding how data flows through reconFTW helps interpret results:
Data Dependencies
OSINT
Target domain
osint/*.txt
Subdomains
Target domain
subdomains/subdomains.txt
Hosts
subdomains.txt
hosts/ips.txt, hosts/portscan*
Web Probing
subdomains.txt
webs/webs.txt
URL Collection
webs.txt
webs/url_extract.txt
JS Analysis
webs.txt
js/js_secrets.txt
Vulns
webs.txt, urls
vulns/, nuclei_output/
Scan Phases
When you run ./reconftw.sh -d target.com -r, the following phases execute:
1. Initialization (start())
2. OSINT Phase
3. Subdomain Phase
4. Host Analysis
5. Web Analysis
6. Vulnerability Phase (if -a flag)
7. Finalization (end())
Checkpoint System
reconFTW uses a checkpoint system to track completed functions and enable scan resumption.
How It Works
Each function creates a marker file when completed:
Resume Behavior
When you re-run a scan:
reconFTW checks for existing
.called_fnmarkersFunctions with markers are skipped
Functions without markers are executed
Force Re-execution
To re-run a specific function:
DIFF Mode
The -r flag with DIFF=true in config enables differential scanning:
In DIFF mode:
All functions execute regardless of markers
Only new findings are highlighted
Previous results are preserved
Understanding DEEP Mode
DEEP mode enables thorough scanning for high-value targets:
Standard vs DEEP
Wordlists
Small (~10k)
Large (~100k+)
Permutations
Basic
Extensive
Recursive depth
Limited
Full
Fuzzing
Common paths
Extended
Time
1-4 hours
4-24+ hours
Activation
Auto-DEEP
reconFTW can auto-enable DEEP based on result counts:
If subdomains < DEEP_LIMIT, additional enumeration runs automatically.
Error Handling
reconFTW uses a "fail-soft" approach:
Error Codes
0
Success
1
General error
2
Missing dependency
3
Invalid input
4
Network error
5
Disk space error
6
Permission error
7
Timeout
8
Configuration error
Error Trapping
Errors are logged but don't stop the scan:
Circuit Breaker
For unreliable tools, reconFTW implements a circuit breaker:
Global Variables
Key variables used throughout reconFTW:
Required Variables
$SCRIPTPATH
Path to reconFTW installation
$domain
Current target domain
$dir
Output directory for current scan
$called_fn_dir
Directory for checkpoint markers
$LOGFILE
Current log file path
Configuration Flags
$DEEP
false
Enable thorough scanning
$DIFF
false
Differential mode
$AXIOM
false
Distributed scanning
$DRY_RUN
false
Preview without executing
Visual: Architecture Diagram
Module Interaction Flow
OPSEC and Legal
Authorization Requirements
NEVER scan without explicit written authorization. This includes:
Bug Bounty Programs: Read rules carefully, some exclude certain asset types
Penetration Tests: Written statement of work (SOW) with defined scope
Internal Testing: Formal approval from asset owners
Personal Projects: Only test assets you own
Pre-Scan Checklist
OPSEC Best Practices
IP Attribution
Use VPS or cloud instances, not personal IP
Rate Limiting
Start conservative, increase gradually
Noise Reduction
Begin with passive mode (-p)
Data Security
Encrypt sensitive findings, secure secrets.cfg
Logging
Keep records of authorization and scan times
Communication
Notify target of critical findings immediately
Reducing Detection Risk
Legal Risks by Region
USA
CFAA
Unauthorized access is federal crime
EU
Computer Misuse Acts (varies)
Strict consent requirements
UK
Computer Misuse Act 1990
Even attempting unauthorized access is illegal
Global
Various
Always research local laws
What to Do If Something Goes Wrong
Stop scanning immediately
Document what happened (timestamps, commands run)
Contact the target via emergency channels
Preserve evidence of authorization
Consult legal counsel if needed
Recommended Workflows
Bug Bounty - Standard Recon
Best for: Regular bug bounty hunting on established programs.
Bug Bounty - New Program
Best for: New programs where you want full coverage quickly.
Large Scope / Multiple Targets
Best for: Programs with many root domains or large scope.
Red Team / Pentest
Best for: Authorized penetration tests with defined scope.
Automated Weekly Monitoring
Best for: Continuous monitoring of assets.
Quick Assessment
Best for: Rapid initial assessment before deeper testing.
CI/CD Integration
Best for: Automated security checks in pipelines.
Next Steps
Now that you understand how reconFTW works:
Learn the command line options - Master all flags
Configure your setup - Customize behavior
Explore modules in depth - Understand each capability
Last updated