Tanto per rimanere a tema oggi vi mostro un altro potente strumento di ricognizione, ossia, TheHarvester, letteralmente “Il Raccoglitore”.
TheHarvester è un tool un pò simile ad InstaRecon.py…
Stop! Fermiamoci un attimo… Vi consiglio di leggete prima l’articolo su InstaRecon.py
The Harvester, permette di recuperare informazioni sul nostro Target (obiettivo) consultando più fonti, quali: Google, Bing, Linkedin, Twitter, etc… a differenza di InstaRecon.py che si limita al profilo Linkedin… ed inoltre esegue anche un reverse DNS, scova sottodomini, Email referenziali e quant’altro…un pò come InstaRecon.py, ci risparmia un bel pò di tempo in ricerche varie!
La differenza sostanziale tra i due Tools è che TheHarvester concentra le sue ricerche anche nei Social, oltre che sul Dominio. InstaRecon.py si concentra solo sul Dominio.
root@kali-2:~# theharvester -h
*******************************************************************
* *
* | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ *
* | __| '_ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| *
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
* *
* TheHarvester Ver. 2.6 *
* Coded by Christian Martorella *
* Edge-Security Research *
* cmartorella@edge-security.com *
*******************************************************************
Usage: theharvester options
-d: Domain to search or company name
-b: data source: google, googleCSE, bing, bingapi, pgp
linkedin, google-profiles, people123, jigsaw,
twitter, googleplus, all
-s: Start in result number X (default: 0)
-v: Verify host name via dns resolution and search for virtual hosts
-f: Save the results into an HTML and XML file
-n: Perform a DNS reverse query on all ranges discovered
-c: Perform a DNS brute force for the domain name
-t: Perform a DNS TLD expansion discovery
-e: Use this DNS server
-l: Limit the number of results to work with(bing goes from 50 to 50 results,
-h: use SHODAN database to query discovered hosts
google 100 to 100, and pgp doesn't use this option)
Examples:
theharvester -d microsoft.com -l 500 -b google
theharvester -d microsoft.com -b pgp
theharvester -d microsoft -l 200 -b linkedin
theharvester -d apple.com -b googleCSE -l 500 -s 300
Iniziamo col fare una ricerca semplice e breve, cerchiamo persone che lavorano per la Google. E’ noto e consolidato che professionisti di aziende in generale, ma ancor di più il colosso in questione (Google), siano iscritti a linkedin ed abbiano inserito nelle loro esperienze lavorative il nome dell’azienda.
Nell’elenco di risultati a seguire potreste trovare anche persone che hanno inserito il termine Google sotto altre voci nel loro profilo linkedin “es. Studi e Formazione: presso Google…” per cui dopo questa fase iniziale con TheHarvester” seguira una seconda fase che possiamo chiamare “catalogare le informazioni” ma questo lo vedremo in un altro articolo.
Eseguiamo questa Query:
theharvester -d google.com -f /root/Scrivania/Google.html -l 1 -b linkedin
Spiegazione del comando:
-d è il nome del target (google.com)
-f è la directory in cui andremo a salvare il report in .html
-l 1 è la quantità di pagine che andremo a consultare (in questo caso la prima pagina di linkedin), abbiamo scelto “1” per semplificare, di solito possiamo arrivare a 500 o più
-b è la fonte, nel nostro caso Linkedin, ma potevamo scegliere anche Google, Bing, etc…
Ora vediamo l’output:
root@kali-2:~# theharvester -d google.com -f /root/Scrivania/Google.html -l 1 -b linkedin ******************************************************************* * * * | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ * * | __| '_ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| * * | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | * * \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| * * * * TheHarvester Ver. 2.6 * * Coded by Christian Martorella * * Edge-Security Research * * cmartorella@edge-security.com * ******************************************************************* [-] Searching in Linkedin.. Searching 100 results.. Users from Linkedin: ==================== Minette Plaza Luis Silva Lyman Missimer Ankur Jain Jeff Dean Ankita Bhatia Richard Achee Dave Ferguson Yossi Matias Melanie Olson Ashley McMillan Nico Gaviola Stephanie Nelson Gautham Thambidorai Ali-Jae Henke Claudio Cherubino Rick Needham Tushar Parlikar Howard Smith Yuchung Cheng Ailsa Cole Brendon Kraham Hemant Bhanoo Ankit Jain
Facciamo una verifica, scegliamo un nome a caso e visualizziamo il suo profilo. es. Ailsa Cole.
E cerchiamola su linkedin…
…Abbiamo 3 risultati, ecco lei è la prima della lista…
Ricordate che su Linkedin quando visitate il profilo di qualcuno, l’interessato riceve una notifica e saprà subito chi (nome e cognome) ha visualizzato il suo profilo (è una peculiarità di Linkedin) per cui abbiate l’accortenza di modificare le impostazioni sulla Privacy.
Una nota molto importante, TheHarvester come del resto InstaRecon.py, sono solo delle “macchine”, cioè dei software che cercano le cose molto più in fretta di noi! Intendo dire che è sempre importante verificare ogni risultato affinchè non vengano commessi errori. Durante una fase di approfondimento sui soggetti reperiti vi accorgerete subito se i risultati sono tutti corretti o no.
Adesso facciamo un altro esperimento, utilizzeremo il parametro -all così cercheremo un pò dappertutto!
Il nostro obiettivo stavolta è la eLearnSecurity. Digitiamo la Query come a seguire ed osserviamo l’Output:
root@kali-2:~# theharvester -d elearnsecurity.com -f /root/Scrivania/elearnsecurity.html -l 500 -b all
*******************************************************************
* *
* | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ *
* | __| '_ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| *
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
* *
* TheHarvester Ver. 2.6 *
* Coded by Christian Martorella *
* Edge-Security Research *
* cmartorella@edge-security.com *
*******************************************************************
Full harvest..
[-] Searching in Google..
Searching 0 results...
Searching 100 results...
Searching 200 results...
Searching 300 results...
Searching 400 results...
Searching 500 results...
[-] Searching in PGP Key server..
[-] Searching in Bing..
Searching 50 results...
Searching 100 results...
Searching 150 results...
Searching 200 results...
Searching 250 results...
Searching 300 results...
Searching 350 results...
Searching 400 results...
Searching 450 results...
Searching 500 results...
[-] Searching in Exalead..
Searching 50 results...
Searching 100 results...
Searching 150 results...
Searching 200 results...
Searching 250 results...
Searching 300 results...
Searching 350 results...
Searching 400 results...
Searching 450 results...
Searching 500 results...
Searching 550 results...
[+] Emails found:
------------------
davide@elearnsecurity.com
support@elearnsecurity.com
ilaria@elearnsecurity.com
@elearnsecurity.com
contactus@elearnsecurity.com
giuseppe@elearnsecurity.com
andrea@elearnsecurity.com
mike@elearnsecurity.com
salman@elearnsecurity.com
@elearnsecurity.com
support@elearnsecurity.com
jens@elearnsecurity.com
contactus@elearnsecurity.com
[+] Hosts found in search engines:
------------------------------------
[-] Resolving hostnames IPs...
199.193.116.231:www.elearnsecurity.com
34.192.31.29:blog.elearnsecurity.com
199.193.116.231:members.elearnsecurity.com
34.192.31.29:community.elearnsecurity.com
199.193.116.233:ns1.elearnsecurity.com
199.193.116.231:www.elearnsecurity.com
199.193.116.231:members.elearnsecurity.com
34.192.31.29:blog.elearnsecurity.com
34.192.31.29:community.elearnsecurity.com
34.192.31.29:Blog.elearnsecurity.com
199.193.116.233:ns1.elearnsecurity.com
31.199.53.9:yet.elearnsecurity.com
[+] Virtual hosts:
==================
199.193.116.231 members.<strong>elearnsecurity<
199.193.116.231 www.<strong>elearnsecurity<
199.193.116.231 members.elearnsecurity.com
199.193.116.231 www.elearnsecurity.com
34.192.31.29 community.elearnsecurity
34.192.31.29 blog.elearnsecurity
34.192.31.29 community.elearnsecurity › submit
34.192.31.29 blog.elearnsecurity › <strong>tag › google<
34.192.31.29 community.elearnsecurity.com
34.192.31.29 <strong>blog<
34.192.31.29 blog.elearnsecurity.com
[+] Saving files...
Files saved!
Visto?! Abbiamo Email, Host & VHost attivi.
Visualizza il Report in html ->
Cerchiamo membri di linkedin ora, così sapremmo chi ha studiato o lavorato presso la eLearnSecurity (quello di cui abbiamo parlato all’inizio)!
root@kali-2:~# theharvester -d elearnsecurity.com -f /root/Scrivania/elearnsecurity2.html -l 500 -b linkedin ******************************************************************* * * * | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ * * | __| '_ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| * * | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | * * \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| * * * * TheHarvester Ver. 2.6 * * Coded by Christian Martorella * * Edge-Security Research * * cmartorella@edge-security.com * ******************************************************************* [-] Searching in Linkedin.. Searching 100 results.. Searching 200 results.. Searching 300 results.. Searching 400 results.. Searching 500 results.. Users from Linkedin: ==================== Simone Bovi Davide Puggioni Giuseppe Trotta Armando Romeo Claudio G. Giuseppe Morici - OSCP cedric kouontchou Sean Roberts Ilaria Mori Greg Adargo Federico Selva Eddy Simons Jeremiah Bess Vincenzo Corona Jason Martin Jens Behnisch Marco Sonaglia Stefano Cangiano Costin-Alin Neacsu Federico Zambito Daniel Hoberecht Paul Dejyothin
Eccomi 🙂 !

Vedete, Linkedin è pericoloso, quelli nella foto a seguire sono alcuni visitatori del mio profilo. Quando fate questo tipo di ricerche, specie se state svolgendo un lavoro, non dimenticate di modificare le impostazioni sulla Privacy! E’ importante.
Per ora e tutto! Più avanti tratteremo ancora l’argomento Shodan e parleremo di altri Tool integrabili col medesimo.
Abusare di tali tecniche e strumenti potrebbe costituire reato penale. Noi non ci assumiamo responsabilità!