theHarvester logo

theHarvester

Gather emails, subdomains, hosts and employee names for a domain from 20+ public sources. Free, open source, command line.

Overview

theHarvester gathers publicly available information from supported sources to help map an organization’s external footprint. Results are leads to verify, not proof of ownership, exposure or vulnerability.

Key features

Public-source discovery; domain and email intelligence; exportable results; reconnaissance workflow support.

Install & first run


# Kali
sudo apt install theharvester

# pipx (keeps its pinned dependencies out of your system Python)
pipx install theHarvester

# From source
git clone https://github.com/laramies/theHarvester.git
cd theHarvester && pipenv install

# Sources that need no API key
theHarvester -d example.com -b crtsh,certspotter,otx,rapiddns -l 200

# Everything, into a report file
theHarvester -d example.com -b all -l 500 -f harvest.html

-d is the domain, -b the sources, -l the result limit and -f the output file. Docs: https://github.com/laramies/theHarvester

Real-world example

During an approved assessment, use public-source results to identify contact patterns and candidate subdomains for verification.

Common questions

Is every result accurate?

No. Sources may be incomplete or stale, so validate findings before reporting them.

Which sources need API keys?

crtsh, certspotter, otx, rapiddns and urlscan need none. Shodan, Hunter, SecurityTrails and similar read keys from api-keys.yaml.

Why does Google return nothing?

Google blocks automated queries quickly. Use bing, duckduckgo or crtsh instead, and keep -l modest.

Is this active scanning?

No - it queries third-party indexes and public sources. Nothing is sent to the target, which is why it is safe at the recon stage.

dnsx

Resolve and inspect DNS records at scale in a pipeline: A/AAAA/CNAME lookups, wildcard filtering and custom resolvers. Free, open source, Go.

httpx

Turn a host list into live HTTP services: status codes, titles, TLS details, headers and detected tech in one fast pass. Free, Go CLI.

Katana

Crawl web applications for URLs and endpoints, parsing JavaScript and known files so you see the routes a user can really reach. Free, Go CLI.


Also in the OSINT Hub: this tool is documented in more depth at /osint/theharvester — that page is the canonical one.

Keep exploring: browse every assessment phase in the Pentest Hub.

Authorized testing only — only ever test systems you own or have explicit written permission to assess.