• InfoSec Dot
  • Posts
  • OSINT Tool Guide & Demonstration: The Harvester

OSINT Tool Guide & Demonstration: The Harvester

🛠 What the tool does

“theHarvester” is a simple to use, yet powerful tool designed to be used during the reconnaissance stage of a red team assessment or penetration test. It performs open source intelligence (OSINT) gathering to help determine a domain's external threat landscape. The tool gathers names, emails, IPs, subdomains, and URLs by using multiple public resources that include:

Passive modules -

Active modules -

  • DNS brute force : dictionary brute force enumeration

  • Screenshots : Take screenshots of subdomains that were found

Modules that require an API key -

Documentation to setup API keys can be found at - https://github.com/laramies/theHarvester/wiki/Installation#api-keys

  • bevigil - Free upto 50 queries. Pricing can be found here: https://bevigil.com/pricing/osint

  • bing

  • bufferoverun - uses the free binaAPI

  • censys - API keys are required and can be retrieved from your Censys account.

  • criminalip

  • fullhunt

  • github

  • hunter - limited to 10 on the free plan, so you will need to do -l 10 switch

  • hunterhow

  • intelx

  • netlas - $

  • onyphe -$

  • pentestTools - $

  • projecDiscovery - invite only for now

  • rocketreach - $

  • securityTrails

  • shodan - $

  • tomba - Free up to 50 search.

  • venacus - $

  • whoisxml

  • zoomeye

📕 Step-by-Step Usage Guide -

1. Install the tool

Make sure you have Python 3 installed. Then clone the tool from GitHub by executing following commands one by one :-

Ø cd theHarvester

Ø pip install -r requirements.txt

2. Basic Command Structure

· -d specifies the domain (e.g., example.com)

· -b is the data source (e.g., google, bing, crtsh, anubis, etc.)

3. Sample Usage

Sample output from querying tesla.com with Bing -

· These results give you insight into possible email addresses and subdomains exposed to the public.

Educational Use Cases -

1. Red Team Training: Teaches students how attackers gather intelligence before launching cyberattacks, enhancing threat modeling skills.

2. Reconnaissance Practice in CTFs: Useful in Capture The Flag challenges to identify domains, emails, and services as part of offensive tasks.

3. Information Security Curriculum: Helps demonstrate passive information gathering techniques in university and certification programs.

4. Threat Intelligence Analysis: Introduces the process of gathering open source data to analyze potential threats in a controlled setting.

5. Compliance and Audit Education: Shows how public exposure of sensitive data can lead to audit findings or compliance violations (e.g., GDPR issues).

Limitations

1. Public Data Only: OSINT tools can only collect what is publicly indexed or exposed, private or protected content remains inaccessible.

2. Inconsistent Results Across Sources: Different search engines and APIs may return varying levels of detail depending on rate limits or indexing.

3. Blocked or Rate-Limited Queries: Overuse or malformed queries may trigger captchas, bans, or restrictions from data sources.

4. Lack of Context or Validation: Tools cannot verify accuracy or intent behind discovered data; results may include outdated or unrelated entries.

5. No Post-Exploitation Support: OSINT is limited to information gathering and doesn't include exploitation, lateral movement, or internal scanning.

Ethical Considerations

1. Consent is Critical: Using OSINT on real individuals or organizations without permission, even if data is public, can violate ethical norms.

2. Avoid Targeting Individuals: Gathering personal emails, phone numbers, or social media details without consent raises privacy and legal concerns.

3. Academic Integrity: Misrepresenting OSINT exercises or using real targets without disclosure may result in academic violations.

4. Data Misuse Risks: Information collected via OSINT (e.g., leaked credentials) should never be used maliciously or shared irresponsibly.

Legal Boundaries Vary: Laws differ by country and region (e.g., GDPR in the EU), and using OSINT tools irresponsibly can lead to legal action.

Written by: Keshav Goyal and Deeptansh Nagar

Disclaimer: This post was authored by interns participating in the Infosec Dot Internship Program. Infosec Dot does not verify the accuracy, originality, or authenticity of the content. The views expressed are solely those of the authors and do not necessarily reflect those of Infosec Dot.

Reply

or to participate.