Install theHarvester on Ubuntu 18.04 Easily

x32x01
  • by x32x01 ||
If you're getting into ethical hacking, penetration testing, or OSINT (Open-Source Intelligence), then you’ve probably heard about a powerful tool called theHarvester. It’s one of the most popular recon tools used by security researchers to collect information about any domain - such as emails, subdomains, hosts, public records, and more 🔍

In this guide, we’ll walk step-by-step through how to install theHarvester on Ubuntu 18.04 LTS, using simple American English and a clean tutorial style that’s perfect for beginners and pros alike. We'll also include real command-line examples so you can follow along easily.

Let’s jump right in! ✨



What Is theHarvester? 🤔🔍

theHarvester is an open-source information gathering tool used during the reconnaissance phase in penetration testing. It pulls data from multiple public search engines and online sources to give you valuable details about a target domain.

It can collect:
  • Email addresses
  • Subdomains
  • Hosts
  • Employee names
  • Public IP data
  • Metadata

And it does all this using data from:
  • Google
  • Bing
  • Yahoo
  • DuckDuckGo
  • Baidu
  • Twitter
  • Shodan
  • LinkedIn
  • And many more…

It’s fast, lightweight, easy to use, and extremely effective - which is why penetration testers and OSINT analysts rely on it every day.



Why Use theHarvester? 🎯

Here’s what makes it so powerful:
⭐ Works with dozens of public data sources
⭐ Helps you identify exposed assets
⭐ Great for security assessments
⭐ Perfect for OSINT beginners
⭐ Ideal for pentesting recon
⭐ Fast and customizable
Whether you're scanning your own company or analyzing a target during a bug bounty program, theHarvester gives you a strong starting point.



How to Install theHarvester on Ubuntu 18.04 LTS 🐧⚙️

Let’s go through the full installation process step-by-step. The commands are clean, simple, and beginner-friendly.

Step 1: Clone theHarvester from GitHub ⬇️📦

Use git clone to download the latest version of theHarvester:
Code:
git clone https://github.com/laramies/theHarvester
This will create a folder called theHarvester in your current directory.

Step 2: Navigate into the Tool’s Folder 📁

Move into the directory: cd theHarvester
Now you're inside the project and ready for installation.

Step 3: Install pip for Python3 🐍📦

Run the following command:
sudo apt install python3-pip
This installs pip, which is required for downloading the tool’s dependencies.

Step 4: Install Dependencies Requirements 📦

TheHarvester includes two possible requirement files:
  • requirements/dev.txt
  • requirements/base.txt

Try installing the development requirements first:
Bash:
python3.7 -m pip install -r requirements/dev.txt

If this file doesn’t exist or gives you an error, use the base requirements:
Bash:
python3.7 -m pip install -r requirements/base.txt
This will install all Python modules needed for theHarvester to run.

Step 5: Run theHarvester for the First Time 🚀

To make sure everything is installed correctly, run:
Bash:
python3.7 theHarvester.py -h
This displays the help menu with all available options and flags.
If you see the help output, congrats - theHarvester is working! 🎉

Step 6: Real-World Example - Collect Emails from Google 📧🔍

Here’s a simple example of how to collect email addresses from a domain:
Bash:
python3.7 theHarvester.py -d gmail.com -l 500 -b google

What the flags mean:​

FlagDescription
-dTarget domain
-lNumber of results
-bData source (search engine)
This command will pull up to 500 results from Google for gmail.com.

Example: Find Subdomains Using Bing 🌐

To gather subdomains for Facebook:
Bash:
python3.7 theHarvester.py -d facebook.com -b bing
This scans the Bing search engine for exposed hosts and subdomains.



Example: Export Results to HTML 📝

To generate a clean HTML report:
Bash:
python3.7 theHarvester.py -d tesla.com -b google -f tesla-report

This will generate:
  • tesla-report.html
  • tesla-report.xml
You can open the HTML file in your browser to view a beautiful, organized report.



Having Trouble Running Python 3.7? ❗🐍

If your Ubuntu version doesn't include Python 3.7, simply use:
Bash:
python3 -m pip install -r requirements/base.txt
python3 theHarvester.py -h
The tool works fine with other Python 3 versions on most systems.



Best Data Sources to Use with theHarvester 📡

Here are the most effective search engines and services to get rich OSINT data:
  • Google
  • Bing
  • DuckDuckGo
  • Yahoo
  • Baidu
  • Shodan
  • LinkedIn
If you want maximum results, use: -b all
This tells theHarvester to use every available search engine at once.



Pro Tips Before Using theHarvester 💡🔥

To get better results:
  • Use a VPN to avoid rate limits
  • Save results in HTML format for easier reading
  • Try different search engines for broader coverage
  • Increase results with -l 1000
  • Combine results with tools like Recon-ng or Maltego
These tricks help you gather deeper and more accurate OSINT information.

Final Thoughts 🎉

theHarvester is one of the most important tools in the cybersecurity world. Whether you’re doing penetration testing, bug bounty work, or OSINT investigations, this tool gives you the data you need to understand your target before running deeper scans.

And now you know exactly how to install and use theHarvester on Ubuntu 18.04 LTS, with practical examples and clear commands you can run right away.

If you'd like more tutorials like this - OSINT tools, Kali Linux, Metasploit, bug bounty techniques - just tell me and I’ll write them for you! 🚀🔥
 
Related Threads
x32x01
Replies
0
Views
496
x32x01
x32x01
x32x01
Replies
0
Views
87
x32x01
x32x01
x32x01
Replies
0
Views
308
x32x01
x32x01
x32x01
Replies
0
Views
389
x32x01
x32x01
x32x01
Replies
0
Views
157
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
660
Messages
668
Members
67
Latest Member
TraceySet
Back
Top