Skip to content

theHarvester

13 commands

Gathers emails, names, subdomains, IPs and URLs about a domain from public sources like search engines and certificate logs.

  • emails
  • subdomains
  • reconnaissance

Install theHarvester

sudo apt install theharvester

Collecting5

theHarvester -d <domain> -b <sources>

Searches the chosen sources for emails, hosts and IPs related to the domain.

Link
theHarvester -d <domain> -b all

Queries every available source. Sources that need API keys are skipped unless keys are configured.

Link
theHarvester -d <domain> -b crtsh

Subdomains from certificate-transparency logs — fast and keyless.

Link
theHarvester -d <domain> -b <source> -l <n>

Limits the number of results fetched from search engines.

Link
theHarvester -d <domain> -b <source> -S <start>

Starts from a later result offset.

Link

Active checks5

theHarvester -d <domain> -b <source> -r

Resolves discovered hosts with DNS.

Link
theHarvester -d <domain> -b <source> -c

DNS brute-forces subdomains.

Link
theHarvester -d <domain> -b <source> -n

Reverse DNS lookups on discovered IP ranges.

Link
theHarvester -d <domain> -b <source> -t

Checks discovered hosts for subdomain-takeover candidates.

Link
theHarvester -d <domain> -b shodan

Enriches hosts with Shodan data (needs an API key).

Link

Output3

theHarvester -d <domain> -b <source> -f <file>

Saves results as XML and JSON.

Link
theHarvester -d <domain> -b <source> -q

Quiet mode with fewer warnings.

Link
cat ~/.theHarvester/api-keys.yaml

API key configuration file (in /etc/theHarvester/ on some installs). Adding keys unlocks sources like Hunter, Shodan and SecurityTrails.

Link