Blog · Domain and IP recon
How to use recon-ng: commands, modules and a first run
recon-ng is an open-source framework for reconnaissance with open sources. You work in a console that looks like Metasploit's: you create a workspace for each engagement, install modules from a marketplace, give them a domain, a company or a list of contacts, and everything they find goes into a database that you can query, chain into the next module and export as a report. Its README defines it as an environment "to conduct open source web-based reconnaissance quickly and thoroughly", and adds that if you want to exploit, you should use Metasploit.
This guide follows the project's README and wiki, the code of its latest tag (v5.1.2), its module marketplace and the package page on Kali Linux, as we read them on 20 November 2026. It covers how to install it, a first run from start to finish, the commands you will use every day and which modules are passive. At the end we cover which part of that work Pandora, the tool we build, does in the browser.
The short answer
- What it is. A reconnaissance framework written in Python, licensed under GPL-3.0, with a console, per-engagement workspaces and a SQLite database.
- How you install it. On Kali,
sudo apt install recon-ng. Elsewhere, you clone the repository and install its dependencies with pip, or build its Docker image. - How you use it.
workspaces create,marketplace install,modules load,options set SOURCE,runandshow. That is the whole loop. - Passive or active. Depends on the module. The recon branch is mostly passive; discovery sends traffic to the target.
- Its state. The latest tag is v5.1.2, the same version Kali packages. The code has barely changed since November 2024, and the most recently updated module in the marketplace is from December 2023.
Before you start: three things worth knowing
The project is quiet. The last change on the master branch, on 5 October 2026, was a README update, and the one before it is from 1 November 2024. The marketplace, which lives in a separate repository, has 109 modules, and the most recent update to any of them is from 30 December 2023. recon-ng still installs and runs, but if a source changes its API, nobody guarantees the module will follow. When a module returns nothing, check whether the source still answers before you conclude there is nothing to find.
It may send usage data, depending on how you install it. In a source or Docker install, every time you load a module, recon-ng sends a request to Google Analytics with its name, its version and the name of the module, along with a random identifier that it stores in ~/.recon-ng/.cid; you turn it off with --no-analytics. The Kali package ships with analytics and the version check already switched off: its help says both are "Already disabled by default in Debian", and its recon-cli adds an --analytics option to turn analytics on. According to its help, --stealth switches off its three background requests at once: the version check, the analytics and the marketplace.
Not every module is passive. The wiki organises the modules by methodology. Recon modules use open sources, "commonly referred to as passive reconnaissance"; discovery modules are "active reconnaissance", where packets are sent to the target. Of the 109 modules in the marketplace, 93 are recon, 8 reporting, 4 import, 2 discovery and 2 exploitation. This guide stays with recon and reporting. Even so, some recon modules resolve names or brute force DNS (recon/hosts-hosts/resolve or recon/domains-hosts/brute_hosts, for example), which already means querying the target's name servers. Read each module's info before running it, and keep anything that touches the target for your own infrastructure or an engagement with written permission.
How to install recon-ng
On Kali Linux. The package is called recon-ng, it is at version 5.1.2 and installs with sudo apt install recon-ng. It brings three commands: recon-ng (the interactive console), recon-cli (modules from the shell, for scripts) and recon-web (a web interface). Note that the usage example on Kali's page still shows the banner of an older version, v4.9.4; what you install is 5.1.2.
From the repository. The wiki asks for Python 3.6 or later and pip, and recommends a virtual environment:
git clone https://github.com/lanmaster53/recon-ng.git
cd recon-ng
pip install -r REQUIREMENTS
./recon-ng
REQUIREMENTS only installs the core of the framework. Modules can have their own dependencies, which the framework does not install for you: the wiki says to note their names in the marketplace, exit, install them with pip and start again. It also warns that the Recon-API, the programmatic side of recon-web, is not fully functional from a source install.
With Docker. The repository includes a Dockerfile. According to the wiki, you create ~/.recon-ng on the host, build the image with docker build --rm -t recon-ng . and run it with docker run --rm -it -p 5000:5000 -v $(pwd):/recon-ng -v ~/.recon-ng:/root/.recon-ng --entrypoint "./recon-ng" recon-ng. Running tasks through the API needs Redis, which the image does not include; for that, the wiki uses docker-compose up -d --build. The wiki has no Windows-specific instructions; its Docker route starts with installing Docker Desktop.
Upgrading from version 4. If you have an old copy, git pull will not work: version 5 moved to a new repository. The wiki explains how to point your copy at it or clone it again. API keys are kept in ~/.recon-ng/keys.db, so a new install on the same machine finds them.
Your first run, step by step
This example looks for the subdomains of a domain in Certificate Transparency logs, with a module that only queries crt.sh. Use a domain you are entitled to look at, such as your own organisation's.
recon-ng --no-analytics
workspaces create example
marketplace search domains-hosts
marketplace install recon/domains-hosts/certificate_transparency
modules load recon/domains-hosts/certificate_transparency
info
options set SOURCE example.com
run
show hosts
back
dashboard
What each line does:
- The workspace.
workspaces create examplecreates and loads a workspace, a folder of its own under~/.recon-ng/workspaces/with its own database. One per engagement keeps cases separate.workspaces listshows them andrecon-ng -w examplestarts directly in one. - The marketplace.
marketplace searchlists the modules that match what you type. Watch theDandKcolumns: an asterisk means the module has dependencies or needs an API key.marketplace info <path>shows its description andmarketplace install <path>installs it. - The module.
modules loadloads it, and from then on you are in its context.infoshows what it does, its options and its input: this one, according to its description, "Searches certificate transparency data from crt.sh, adding newly identified hosts to the hosts table." - The input. Each module reads its input from the
SOURCEoption. Withdefault, it uses its own database query (here, every domain in thedomainstable). You can also give it a single value, a path to a file with one value per line, orquery <sql>for a custom query.inputshows what it will run on. - The run.
runexecutes it and ends with a summary in the form "N total (M new) hosts found". - The results.
show hostslists thehoststable.backleaves the module anddashboardsummarises the workspace: which modules have run and how many rows each table holds.
The trick of recon-ng is the chain. The modules are named after what they read and what they write: domains-hosts reads domains and writes hosts, hosts-hosts reads hosts and writes hosts. So the output of one module is the default input of the next, and the database grows with each run. The workspace has tables for domains, companies, netblocks, locations, vulnerabilities, ports, hosts, contacts, credentials, leaks, pushpins, profiles and repositories.
recon-ng commands: a cheat sheet
| Command | What it does |
|---|---|
workspaces create / load / list / remove <name> | Manages per-engagement workspaces |
marketplace search [<text>] | Searches the module index |
marketplace info / install / remove <path> | Shows, installs or removes a module (install all installs everything) |
marketplace refresh | Refreshes the module index |
modules search [<text>] | Searches the modules you have installed |
modules load <path> | Loads a module; a unique keyword is enough |
modules reload | Reloads the installed modules |
info / input | In a module: its details / the inputs it will use |
options list / set / unset | Shows or changes the options of the current context |
run | Runs the loaded module |
back | Leaves the current context |
keys list / add / remove | Manages API keys (keys add <name> <value>) |
show <table> | Lists a database table, such as show hosts or show contacts |
db query <sql> | Queries the database with SQL |
db insert / delete / notes <table> | Adds, deletes or annotates rows |
db schema | Displays the database schema |
dashboard | Summarises activity and results |
snapshots take / list / load / remove | Saves and restores copies of the database |
script record / stop / status / execute <file> | Records commands and replays them |
spool start / stop / status <file> | Copies the session output to a file |
shell <command> or ! <command> | Runs a system command |
help <command> | Help for a command and its subcommands |
Global options, which you see with options list outside a module, include TIMEOUT (10 seconds by default), THREADS (10), NAMESERVER (8.8.8.8), PROXY, USER-AGENT and VERBOSITY. If a large domain times out in the crt.sh module, its own notes suggest raising the global timeout. If it is crt.sh itself that fails, we cover what to use instead in crt.sh alternatives.
API keys
Many modules depend on third-party services. The ones that need a key list it in the marketplace (the K column) and in info: the Shodan hostname module, for example, needs shodan_api. You add it with keys add shodan_api <your key> and check it with keys list. Without a key, the module loads with a warning and will probably fail when you run it. A module with missing dependencies goes further: it stays disabled until you install them.
recon-cli and recon-web
recon-cli runs the same thing without entering the console, which is handy for scripts. Its options are -w (workspace), -m (module), -o NAME=value (module option, repeatable), -g NAME=value (global option), -c and -C (commands in the module or global context), -M and -O (list modules or options) and -x (run). For example:
recon-cli -w example -m recon/domains-hosts/hackertarget -o SOURCE=example.com -x
That module, according to its description, uses the HackerTarget API to find host names and adds them, with their IPs, to the hosts table. From a source install, the command is ./recon-cli.
recon-web starts a web interface that introduces itself as "the analytics and reporting engine for Recon-ng". With --host and --port you choose where it listens. Since it serves what is in your workspaces, keep it listening on your own machine unless you control who can reach it.
Exporting a report
The reporting branch has modules to export the workspace: reporting/html, reporting/csv, reporting/json and reporting/xlsx, among others. The HTML one asks for two options, CUSTOMER and CREATOR, which go in the header and footer, and leaves results.html in the workspace folder. Its SANITIZE option, on by default, masks sensitive data in the report: keep it on if the report leaves your hands.
Check before you assert
What recon-ng returns is what its sources say, and some of those modules have not been touched in years. A hostname from an old certificate may no longer exist, and a contact harvested from a WHOIS record may be out of date. Before you assert anything, corroborate it with another independent source: the method is in our guide to domain and IP reconnaissance, and if what you want is who is behind a domain, in how to find who owns a domain.
recon-ng vs theHarvester, SpiderFoot and Maltego
They answer the same question in different ways, and many people use more than one:
| recon-ng | theHarvester | SpiderFoot | Maltego | |
|---|---|---|---|---|
| How you work | Console, module by module | One command per run | Web interface or console | Graph client |
| What it keeps | A database per workspace | Report files and a local history | Each scan, with its results | The graph |
| Chaining | By hand, table to table | No, one pass per run | Automatic between modules | Transforms by hand, or machines |
| Best for | Long engagements you want to query with SQL | A quick first sweep of a domain | Broad automated scans | Visual analysis of links |
If you want the details, we have step-by-step guides to theHarvester, SpiderFoot and Maltego, and a comparison of recon-ng with the other two command-line tools, including the same case run in all three: SpiderFoot vs theHarvester vs recon-ng.
The passive part, in the browser: Pandora
Pandora is the tool we build: an OSINT link analysis search engine that runs in the browser. It is not recon-ng and does not wrap it; it covers part of the same ground with other pieces, without a console or modules to install.
What it does with a domain. From a domain, Pandora can gather its DNS over HTTPS, its RDAP and WHOIS data, and its subdomains from Certificate Transparency, from crt.sh (the same source as the module in the example) and Certspotter. It can also add passive and reverse DNS, other sites that share the IP or the analytics ID, the open ports and known vulnerabilities published by Shodan InternetDB, the network and its owner according to RIPEstat, registered look-alike domains and URLs archived in Common Crawl and the Wayback Machine.
How you read it. Instead of tables you query with show, everything appears on a graph that grows live, with the source of every data point and the case's audit trail, and you can also read it as a table or a timeline. Collection is passive: Pandora reads what other sources have already observed and scans nothing.
Where recon-ng is better. At keeping a long engagement in a database you can query with SQL, at scripting runs with recon-cli and at the active modules for your own infrastructure.
What it costs. The plans are on the pricing page. A free account gets one trial search with the findings masked: you see what kind of findings appear and how many, but not which ones.
The legal side
recon-ng is legal, and its own README separates reconnaissance from exploitation. Modules that send traffic to the target only belong on your own infrastructure or in an engagement with written permission: probing other people's systems without authorisation can be a criminal offence. And even when everything is passive, the contacts, names and email addresses it stores in the contacts table are personal data: you need a legitimate purpose and a lawful basis under the GDPR or its local equivalent, and you keep no more of them than the engagement needs. Our article on OSINT and the GDPR explains this in detail.
This article is not legal advice.
Frequently asked questions
How do you use recon-ng?
You start it with recon-ng, create a workspace for the case (workspaces create <name>), install a module from the marketplace (marketplace install <path>), load it (modules load <path>), set its input (options set SOURCE example.com) and type run. The results go into the workspace's database, and show hosts or dashboard displays them.
Is recon-ng installed on Kali Linux?
It is in Kali's repositories as recon-ng, version 5.1.2, and installs with sudo apt install recon-ng. The package brings three commands: recon-ng, the interactive console; recon-cli, to run modules from the shell; and recon-web, a web interface for analysis and reporting.
Why does recon-ng have no modules after installing it?
Modules are not shipped with the framework: they live in a separate repository, the marketplace, which you browse with marketplace search and install one by one with marketplace install. A module whose dependencies are missing stays disabled, and one that needs an API key warns you and will probably fail until you add it with keys add.
Is recon-ng passive?
It depends on the module. Its wiki describes the recon modules as the use of open sources, what is commonly called passive reconnaissance, and the discovery modules as active reconnaissance, which sends packets to the target. Even within recon, some modules resolve names or brute force DNS: read each module's info before you run it.
What is the difference between recon-ng and theHarvester?
theHarvester is a single command that queries many sources about a domain and saves a report. recon-ng is a framework with a console, workspaces and a database, where you install and chain modules one by one, so it suits longer engagements where you want to keep and query everything you collect.
Is it legal to use recon-ng?
The tool is legal; what matters is what you run it against and what you do with the data. Modules that contact the target only belong on your own infrastructure or in an engagement with written permission. And the contacts it collects are personal data: you need a legitimate purpose and a lawful basis under the GDPR or its local equivalent.