What Is Recon-ng and How Do Ethical Hackers Use It for OSINT?

Recon-ng is an open source framework for open source intelligence (OSINT) gathering, written in Python and included in Kali Linux. It works like a console with workspaces, a built-in database and installable modules that query public sources such as DNS, certificate transparency logs and search APIs to find domains, hosts and contacts related to a target.

Jul 08, 2025 - 14:37
Updated: 
108.6k

Security Tools, Authorized Labs & CTFs in Cybersecurity & Ethical Hacking · Lab / project

What Is Recon-ng and How Do Ethical Hackers Use It for OSINT?

Quick answer: Recon-ng is an open source framework for open source intelligence (OSINT) gathering, written in Python and included in Kali Linux. It works like a console with workspaces, a built-in database and installable modules that query public sources such as DNS, certificate transparency logs and search APIs to find domains, hosts and contacts related to a target. Ethical hackers use it in the reconnaissance phase of authorised tests, and defenders use it to see what their organisation exposes publicly. Use it only within agreed scope, and treat any personal data you collect carefully.

Key takeaways

  • Recon-ng organises OSINT into workspaces with a shared database.
  • Modules are installed from a marketplace; many need API keys.
  • Results can be exported into reports for test documentation.
  • Defenders use the same findings to reduce their attack surface.
  • Reconnaissance of others' organisations needs authorisation and respect for privacy law.

Table of Contents

What Is Recon-ng?

Recon-ng, created by Tim Tomes, is a reconnaissance framework modelled on the Metasploit console style. It is packaged in Kali Linux. It covers the Reconnaissance tactic in MITRE ATT&CK, which is also why defenders need to understand it.

How Is Recon-ng Organised?

ConceptPurpose
WorkspacesSeparate projects, each with its own database
MarketplaceInstall, update and search modules
ModulesDiscovery, recon, reporting and import tasks
Database tablesDomains, hosts, contacts, credentials found, and more
KeysStore API keys for services modules use

What Does a Basic Workflow Look Like?

Example for an organisation's own domain or one you are authorised to assess:

recon-ng
[recon-ng][default] > workspaces create acme_assessment
[recon-ng][acme_assessment] > db insert domains
domain (TEXT): example.com
[recon-ng][acme_assessment] > marketplace search hackertarget
[recon-ng][acme_assessment] > marketplace install recon/domains-hosts/hackertarget
[recon-ng][acme_assessment] > modules load recon/domains-hosts/hackertarget
[recon-ng][acme_assessment][hackertarget] > run
[recon-ng][acme_assessment] > show hosts
[recon-ng][acme_assessment] > marketplace install reporting/html

Module names and availability change over time; use marketplace search to see current ones.

How Do You Manage API Keys?

  • Add keys with keys add <name> <value>; list them with keys list.
  • Use separate keys for testing, not personal accounts.
  • Respect each service's terms and rate limits.
  • Never include keys in shared reports or repositories.

How Do Defenders Use OSINT?

FindingDefensive action
Forgotten subdomains (from DNS and certificate logs)Decommission or secure them
Exposed staff email patternsTarget phishing training and email filtering
Leaked credentials in breach dataForce resets, enforce MFA
Outdated technologies on public hostsPatch or retire

The OWASP Web Security Testing Guide describes information gathering as the first testing step.

What Are the Legal and Ethical Limits?

  • Use Recon-ng for your own organisation or within a written scope of work.
  • Collecting and storing personal data is regulated; in India the DPDP Act 2023 applies.
  • Do not use OSINT for stalking, harassment or doxxing.
  • Moving from passive lookup to active probing or access without permission can breach the IT Act 2000, Sections 43 and 66.

Related: Recon-ng commands and setup and bug bounty tools. WebAsha offers ethical hacking training.

References

Frequently Asked Questions

An open source Python framework for gathering open source intelligence through modules, workspaces and a built-in database.

Yes. Recon-ng is packaged in Kali Linux and can also be installed from its GitHub repository.

Separate projects, each with its own database, so findings for different assessments do not mix.

Many do. Keys are stored with the keys add command and used by modules that query external services.

Gathering public information within an authorised scope is generally lawful, but misuse of personal data or unauthorised probing is not.

To discover what their organisation exposes publicly, such as forgotten subdomains or leaked emails, and then reduce that exposure.

Yes. Reporting modules export findings to formats such as HTML, CSV and JSON for documentation.

The reconnaissance or information gathering phase at the start of an authorised penetration test or assessment.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.