RECON-NG
FOR EDUCATIONAL PURPOSES ONLY
Recon-ng is a modular, open-source web reconnaissance framework written in Python. Think of it as the Metasploit of recon. It's CLI-driven, database-backed, and designed for automation of OSINT (Open Source Intelligence) gathering.
In the underground, information is leverage, and recon-ng turns passive recon into a surgical operation. While script kiddies run whois and nslookup, recon-ng gives you scalable recon with structured data you can feed into your attack pipeline.
You’re not just gathering domains — you’re profiling targets, pivoting off their infrastructure, chaining data points to build an actionable pre-exploitation picture.
Core Capabilities That Make It Dangerous
Modular System
Dozens of plug-and-play modules — use only what you need. Think recon/domains-hosts/bing_domain_web or contacts-credspills.
Workspace Management
Set up isolated recon workspaces per target. Keeps your intel clean and organized.
Database Integration
Auto-stores results in an internal database. Perfect for later correlation or feeding into phishing kits, exploit dev, or password spray tools.
API Integration
Uses public APIs (Shodan, HaveIBeenPwned, GitHub, etc.) — stealthy, passive, and completely anonymous if proxied properly.
Chained Modules
You can chain modules — i.e., enumerate subdomains → resolve to IPs → scan for exposed services, all within recon-ng.
Workflow
Setup Workspace
workspaces create targetcorpImport Target Domain
add domains targetcorp.comEnumerate Subdomains
Resolve to IPs
Discover Contacts
Pull Breached Creds
Now you’ve got:
Valid subdomains
IP ranges
Email addresses of employees
Breached creds
Feed that into:
A phishing campaign
Credential stuffing attacks
VPN brute-force
Pivot into DevOps leaks (GitHub, GitLab, S3 buckets)
Anonymity Layer Integration
Expert black hats always obfuscate intel gathering:
Route recon-ng traffic via ProxyChains + Tor + dynamic proxies
Rotate API keys using disposable accounts
Feed data into custom recon DBs to correlate with Shodan, Censys, etc.
In expert hands, it becomes the intelligence arm of your attack kill chain. It reduces time-to-pwn by front-loading contextual data, so you waste zero time on noisy scans or dead vectors.
Combine it with:
theHarvester (manual recon)
Amass (graph-based enum)
Custom Python tooling
and you’ve got a dark recon suite that maps entire digital footprints before you ever touch a target port.
Workspace Isolation + Proxies
Inside recon-ng:
You can also rotate proxies through proxychains.conf with dynamic lists (more below).
Seed Target Domain
Subdomain Enurmeration
Start with passive, low-footprint modules
Followed by resolution
Extract employees and emails
Now that you have contacts
You’ve just found valid email addresses + exposed creds from public breaches. These can be used in:
Password spraying
MFA exhaustion
Social engineering lures
Pull down public code and secrets
Check commits, emails, and leaked tokens from their developers. You’ll often find:
.envfilesAWS credentials
Slack or SMTP creds
Combine this with a GitHub dork scanner or use GitRob for deeper exploration.
Export everything for custom analysis
From here, you can:
Pipe into tools like EyeWitness for screenshots
Use Nmap on the IPs for service discovery (only if you’re going active)
Check Shodan / Censys for indexed service banners (anonymous)
Custom Automation Script
Run this before recon to rotate IPs.
Advanced Ideas to Chain
Web App
Feed subdomains into dirsearch, ffuf, or Burp for endpoint discovery
Employees
Use LinkedIn scraping tools or sherlock to find usernames on 50+ platforms
Git Leaks
GitRob, TruffleHog, or gitleaks on any public repo tied to the domain
IP Ranges
Use asnmap or ipinfo.io to find their ASN → map out owned CIDRs
Cloud Targets
Feed domains into S3Scanner, Bucket Finder, or CloudSploit for exposed AWS assets
Build the Kill Chain
Now that you have:
Emails + leaked passwords
Subdomains + IPs
Developer leaks
Exposed credentials
DNS map + live assets
You’re ready to:
Run credential stuffing on their VPN or Outlook Web App.
Clone login portals for phishing.
Drop into their CI/CD via GitHub secrets.
Find a forgotten dev/test subdomain and pivot in.
OPSEC Tips
Use tailscale or Mullvad bridge
Masks origin, drops logs
Script browser scrapers via selenium-wire over Tor
Undetectable by recon-ng logs
Never touch the target directly unless needed
Passive recon keeps you safe
Store data in local SQLite or Elastic DB for repeat analysis
Useful for multiple campaigns
Here's a full Python automation script to:
Fetch fresh elite proxies
Update
proxychains.confLaunch
recon-ngAuto-run a recon module chain via recon-ng CLI commands
Export the data for post-processing
Run this as root, and make sure recon-ng and proxychains4 are properly installed
Usage
What the script does
Grabs 20 elite proxies and overwrites
/etc/proxychains4/proxychains.confGenerates a custom
.rcfile forrecon-ngChains passive recon modules:
Subdomain + email enum
WHOIS, GitHub, breach lookups
Exports everything to
/root/recon/targetcorp.csv
Passive-Only Modules
recon-ng is OPSEC-safe only if you restrict yourself to modules that do not query the target's infrastructure directly.
These do not touch the target, only third-party sources instead
Avoid
Any module that sends requests to subdomains directly (e.g.,
http,ssl,dns,geomodules)hostnames-to-ports,hostnames-to-httptype modules
Global Anonymity with ProxyChains + Tor + SOCKS5 Bridge
Inside /etc/proxychains4/proxychains.conf:
Never use DNS outside the proxy chain. Always set proxy_dns.
Isolation with Tailscale + Ephemeral Linux Envs
Route recon-ng through a VPN → Tor → proxychains triple stack
If in a lab, use Tailscale or WireGuard as the first layer for encrypted point-to-point routing
Run recon-ng from:
Live ISO (Tails, Whonix)
Isolated Qubes VM
Disposable container (
docker run -it --rm kalilinux/kali-rolling)
Avoid Artifact Leaks: Clean Storage + Exfil Handling
Recon-ng stores output in .recon-ng/ SQLite DB. Protect or exfil that data securely:
Clean workspace post-run:
workspaces delete NAMEAvoid storing exports in
/root/or known locationsStore to mounted encrypted volume:
Exfil using scp over a hidden VPS or OnionShare
Randomization, Delays, and Noise Blending
To avoid triggering OSINT abuse alerts (like Jigsaw or WHOIS rate-limits):
You can inject delays inside your .rc script:
Or dynamically from a Python controller that:
Selects a random module order
Introduces randomized sleep intervals
Disguises automation fingerprints
Audit your OPSEC
After recon-ng is done:
Inspect your DNS leaks:
Check your public IPs:
Clean history:
Use iptables or firejail to ensure recon-ng only runs over Tor/proxy:
Conceptual Application
Prepping phishing
Enumerate valid emails → correlate breaches → verify names via OSINT
Red team recon
Export recon-ng data → import into Maltego/Neo4j for visualization
Insider attacks
Use GitHub modules to clone devs' commits → leak tokens
Dark web extortion
Correlate exposed infrastructure + emails with breached forum accounts
OPSEC-Focused Script Overview
Uses only passive recon-ng modules
Randomizes module order
Inserts artificial randomized delays
Routes all traffic via proxychains (Tor + HTTP proxies)
Clears disk artifacts and logs after execution
DNS Leak Prevention
Make sure /etc/proxychains4/proxychains.conf includes:
Full Erasure Checklist
Shell history
history -c && shred -u ~/.bash_history
recon-ng workspace
~/.recon-ng (use shred -u -z -n 5 recursively)
Logs
journalctl --rotate && journalctl --vacuum-time=1s
Temp files
/tmp, /var/tmp, /dev/shm → shred or use tmpfs
Memory
swapoff -a && swapon -a (flush swap)
Exported data
Use EXPORT_PATH to /dev/shm or encrypted FS
Real-World Use Case Flow
Connect to jump-box (VPS or burner Pi over cellular)
Boot encrypted live OS (Tails or Whonix)
Use
proxychains4with layered Tor/proxy/VPNRun
stealth_recon.pyagainst targetPipe results into temporary RAM (e.g.,
/dev/shm)Copy to external device or exfil via
scpInitiate secure wipe
Last updated