How to use theHarvester

How to use theHarvester

How to use theHarvester

What is theHarvester?

theHarvester is an open-source intelligence (OSINT) tool designed to collect information such as email addresses, subdomains, IP addresses, and URLs from various public sources. It’s commonly used in the reconnaissance phase of penetration testing to map an organization’s external footprint.

Why use theHarvester?

Utilizing theHarvester enables security professionals to efficiently gather critical data about a target domain, aiding in the identification of potential vulnerabilities and enhancing the overall effectiveness of security assessments.

How to use theHarvester:OSINT

  1. Installation:
    • On Kali Linux, theHarvester is pre-installed.
    • For other systems, clone the repository and install dependencies:
      bash
      git clone https://github.com/laramies/theHarvester.git
      cd theHarvester
      pip install -r requirements.txt
  2. Basic Usage:
    • Run theHarvester with the following syntax:
      bash
      theHarvester -d <domain> -l <limit> -b <source>
    • Example:
      bash
      theHarvester -d example.com -l 100 -b google

      This command searches for information related to example.com, limiting results to 100, using Google as the data source.

  3. Common Options:
    • -d: Specify the target domain.
    • -l: Set the maximum number of results to retrieve.
    • -b: Choose the data source (e.g., google, bing, crtsh).
    • -f: Save the output to a file in XML and HTML formats.
    • -c: Perform a DNS brute force to find additional subdomains.
    • -s: Use Shodan to query discovered hosts (requires a Shodan API key).

 

Example use:

  • Basic Usage:
    • To gather information about example.com using Google as the data source and limiting results to 100, execute:
      bash
      theHarvester -d example.com -l 100 -b google
    • This command will search for emails, subdomains, and other related information associated with example.com.
  • Saving Results:
    • To save the output to an HTML file for easier analysis, use the -f option:
      bash
      theHarvester -d example.com -l 100 -b google -f example_report
    • This creates example_report.html in your current directory.
  • Advanced Options:
    • To perform a DNS brute force to find additional subdomains, add the -c option:
      bash
      theHarvester -d example.com -l 100 -b google -c
    • To use multiple data sources, specify them separated by commas:
      bash
      theHarvester -d example.com -l 100 -b google,bing,crtsh

By following these steps, you can effectively utilize theHarvester to gather valuable information during the reconnaissance phase of security assessments.

Video Tutorial on How to use  theHarvester in Kali Linux for Reconnaissance

    Leave Your Comment Here

    This site uses Akismet to reduce spam. Learn how your comment data is processed.