theHarvester OSINT harvesting from Google and LinkedIn
Short answer
B TheHarvester -d target.com -b google,linkedin queries Google and LinkedIn as data sources to harvest email addresses and employee names for target.com.
Question
theHarvester -d target.com -b google,linkedin. What is the primary purpose of this command?Key Takeaways
OSINT reconnaissance with theHarvester centers on the -b flag, which selects the public data sources queried for a domain. Option B is correct because -b google,linkedin restricts harvesting to those two sources, yielding email addresses and employee names for target.com. Port scanning, resolver lists and SQL injection testing are unrelated to what this invocation configures.
Expert Analysis
theHarvester is an OSINT tool designed to gather email addresses, subdomains, hosts, employee names, and open ports from different public sources. The -d flag specifies the domain and -b specifies the data sources (Google and LinkedIn in this case) to search for organizational information.
The deciding constraint is the source list: -b google,linkedin names two public OSINT search sources, not a network interface. Every capability of theHarvester that touches a live host — its optional port-discovery step and any DNS resolution it performs — is secondary to harvesting records from the sources named after -b. With google and linkedin supplied, the tool queries those search surfaces for target.com and parses the returned content for addresses and identity strings, so option B names exactly the output the command produces: email addresses and employee names drawn from Google and LinkedIn.
Option A fails on the same flag. Open-port scanning is an optional side output of theHarvester's host resolution path, and it would still be driven by -d target.com; but a port scan is not what -b google,linkedin requests, and the question's stated sources are search engines and a professional network, not a scanner. Choosing A would mean the -b argument had no effect, which contradicts its documented role.
Option C misreads -b as a resolver argument. Multiple resolvers would appear in a tool such as dnsrecon or dig with a @server list; here -b accepts a comma-separated list of data sources, and a comma-separated list of resolvers is not something this invocation supplies. The command performs at most incidental DNS lookups for hosts it discovers, and only to enrich the harvested records.
Option D is unrelated to the tool's function: SQL injection testing belongs to web application attack tooling (burpsuite, sqlmap), whereas theHarvester neither sends crafted HTTP payloads nor evaluates responses for injection behaviour. Nothing in -d or -b configures a payload or a target URL.
One mechanism the question relies on but never states: theHarvester's -b flag accepts a comma-separated list of source backends, and each backend is queried independently and merged into one result set. In this invocation that means Google and LinkedIn are both hit for target.com, and the merged output is the email and name harvest — which is why a single answer covering both sources, option B, is correct rather than a partial answer naming only one source. A related nuance: because the results are only as good as the search engine's index, the harvested addresses are candidates for later verification, not confirmed mailboxes; that verification belongs to a later phase, not to this command.
A practical reading tip for this style of question: identify the flag that constrains scope (-d) and the flag that constrains data origin (-b), then match the origin to the tool's documented purpose. Google and LinkedIn are origins, and origins determine what can be retrieved — for theHarvester, that is organizational identity data.
Official Reference
https://github.com/laramies/theHarvester
This link opens the official vendor documentation in a new tab.
Exam Strategy
When a command-based question names flags, map each flag to its documented parameter before reading the options: here -d sets scope (the domain) and -b sets data origin (the sources). Then reject options whose described action would ignore a named flag — a port scan or SQL injection test would leave -b google,linkedin doing nothing. On PT0-003, treat any option describing an active attack against a host as suspect when the tool's inputs are purely search-source arguments.
Related Analysis
Practice All PT0-003 Questions
Access 120 questions with complete answers and detailed explanations.
View Full PT0-003 Practice Test →