Overview
Therecon_ng_remote.bat script automates OSINT (Open Source Intelligence) reconnaissance using the Recon-ng framework. It performs comprehensive domain enumeration, subdomain discovery, and host information gathering on remote Linux systems.
Prerequisites
- Remote Linux system with SSH access
- Recon-ng installed on remote system
- PuTTY tools (plink.exe, pscp.exe) on Windows
- Valid API keys for various services (optional but recommended)
Usage
Parameters
| Parameter | Description |
|---|---|
Proyecto | Project name (workspace name in Recon-ng) |
Domains | Comma-separated list of domains to scan (e.g., “example.com,test.com”) |
Documentacion | Output directory path for reports |
Timestamp | Timestamp identifier for report files |
Server | Remote server IP or hostname |
Username | SSH username |
Password | SSH password |
Example
API Keys Configuration
The script supports multiple API keys for enhanced reconnaissance. Edit the script to configure:Recon-ng Modules Used
Domain-to-Hosts Modules
- netcraft - Netcraft domain reconnaissance
- bing_domain_api - Bing domain API search
- bing_domain_web - Bing web domain search
- builtwith - BuiltWith technology profiler
- brute_hosts - DNS brute force enumeration
- ssl_san - SSL certificate SAN extraction
- vpnhunter - VPN endpoint discovery
- certificate_transparency - Certificate transparency logs
- google_site_web - Google site search
- hackertarget - HackerTarget API queries
- mx_spf_ip - MX and SPF record analysis
- shodan_hostname - Shodan hostname lookup
- threatcrowd - ThreatCrowd domain intelligence
Netblocks-to-Hosts Modules
- reverse_resolve - Reverse DNS resolution
- shodan_net - Shodan network search
Hosts-to-Hosts Modules
- reverse_resolve - Reverse DNS on discovered hosts
- resolve - Forward DNS resolution
- bing_ip - Bing IP address search
- freegeoip - IP geolocation data
- ipinfodb - IP information database
- ssltools - SSL certificate analysis
Reporting Module
- reporting/html - HTML report generation
Generated Reports
The script generates four output files:-
HTML Report -
recon-ngReport - [Timestamp].html- Comprehensive HTML report with all findings
- Includes domains, hosts, IP addresses, and metadata
-
Networks Report -
recon-ngReport-Networks - [Timestamp].txt- List of discovered netblocks
-
Subdomains Report -
recon-ngReport-Subdomains - [Timestamp].txt- List of discovered subdomains with IP addresses
-
IP Addresses Report -
recon-ngReport-IP - [Timestamp].txt- Unique IP addresses discovered
Workflow
- Workspace Creation - Creates a dedicated Recon-ng workspace for the project
- Domain Addition - Adds target domains to the workspace
- API Key Configuration - Loads API keys for enhanced reconnaissance
- Module Execution - Runs reconnaissance modules sequentially:
- Domain enumeration
- Subdomain discovery
- Host resolution
- IP geolocation
- SSL certificate analysis
- Data Export - Extracts data using SQL queries
- Report Generation - Creates HTML and text reports
- File Transfer - Downloads reports to local documentation directory
- Cleanup - Removes temporary files from remote system
Installation
Remote System Setup
Install Recon-ng on the remote Linux system:Additional Modules
For extended functionality, install additional Recon-ng modules:Script Execution Details
Output Example
References
Notes
- The script uses PuTTY’s plink.exe for SSH communication
- All temporary files are created in
/tmp/on the remote system - Files are converted to DOS format using
unix2dosbefore transfer - The script automatically detects Recon-ng installation path
- Execution requires proper SSH credentials and network connectivity