Tools - TheHarvester
Alasta 29 Mars 2016 tools bash tools Linux Open Source Security shell dns kali
Description : Nous allons utiliser Theharvester pour de la collecte d'informations.
Rappel :
Attention dans cet article l'outils est utilisé pour la recherche et l'apprentissage. Ce type d'outils ne doit pas être utilisé vers un serveur qui ne vous appartient pas, ceci peut être puni par la loi (voir les articles 323-XX).
Environnement de test :
Pour cela nous allons utiliser une VM tournant sur la distribution Kali. TheHarvester est installé de base sur Kali.
Utilisation :
La commande et ses options
1 root@kali:~# theharvester -h
2
3
4
5 | || | /\ /\ | | _
6 | | ' \ / _ \ / // / _` | '\ \ / / \/ | / \ '|
7 | |_| | | | / / / (_| | | \ V / /_ \ || __/ |
8 _|| ||_| \/ // _,|| _/ _||/__|_|
9
10 TheHarvester Ver. 2.2a
11 Coded by Christian Martorella
12 Edge-Security Research
13 cmartorella@edge-security.com
14
15
16
17 Usage: theharvester options
18
19 -d: Domain to search or company name
20 -b: Data source (google,bing,bingapi,pgp,linkedin,google-profiles,people123,jigsaw,all)
21 -s: Start in result number X (default 0)
22 -v: Verify host name via dns resolution and search for virtual hosts
23 -f: Save the results into an HTML and XML file
24 -n: Perform a DNS reverse query on all ranges discovered
25 -c: Perform a DNS brute force for the domain name
26 -t: Perform a DNS TLD expansion discovery
27 -e: Use this DNS server
28 -l: Limit the number of results to work with(bing goes from 50 to 50 results,
29 -h: use SHODAN database to query discovered hosts
30 google 100 to 100, and pgp doesn't use this option)
31
32 Examples: theharvester -d microsoft.com -l 500 -b google
33 theharvester -d microsoft.com -b pgp
34 theharvester -d microsoft -l 200 -b linkedin
La commande par l'exemple
1 root@kali:~# theharvester -d alasta.com -b bing
2
3
4
5 | || | /\ /\ | | _
6 | | ' \ / _ \ / // / _` | '\ \ / / \/ | / \ '|
7 | |_| | | | / / / (_| | | \ V / /\ \ || / |
8 \|| ||\| \/ // \,|| \/ \||/\\_||
9
10 TheHarvester Ver. 2.2a
11 Coded by Christian Martorella
12 Edge-Security Research
13 cmartorella@edge-security.com
14
15
16
17 [-] Searching in Bing:
18 Searching 50 results...
19 Searching 100 results...
20
21 [+] Emails found:
22 ------------------
23 general@alasta.com
24 asinava@alasta.com
25
26 [+] Hosts found in search engines:
27 ------------------------------------
28 91.121.81.174:www.alasta.com
Il y a quelque chose de bizarre, c'est après différents tests je relance cette dernière et ne me trouve plus d'emails ...
On a seulement intérrogé bing (option -b bing) pour limiter le temps d'execution.
On fait la même requête mais sur tous les moteurs qu'il connaît (google,bing,bingapi,pgp,linkedin,google-profiles,people123,jigsaw) via l'option -b all, et on limite au 50 premiers résultat de chaque moteur.
1 root@kali:~# theharvester -d alasta.com -b all -l 50
2
3
4
5 | || | /\ /\ | | _
6 | | ' \ / _ \ / // / _` | '\ \ / / \/ | / \ '|
7 | |_| | | | / / / (_| | | \ V / /\ \ || / |
8 \|| ||\| \/ // \,|| \/ \||/\\_||
9
10 TheHarvester Ver. 2.2a
11 Coded by Christian Martorella
12 Edge-Security Research
13 cmartorella@edge-security.com
14
15
16
17 Full harvest..
18 [-] Searching in Google..
19 Searching 0 results...
20 [-] Searching in PGP Key server..
21 [-] Searching in Bing..
22 Searching 50 results...
23 [-] Searching in Exalead..
24
25
26
27
28 <!DOCTYPE html>
29 <html lang="en">
30 <head >
31
32
33
34
35
36 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
37 <!--[if lt IE 9]>
38 --SNiP--
39
40 Searching 100 results...
41
42 [+] Emails found:
43 ------------------
44 No emails found
45
46 [+] Hosts found in search engines:
47 ------------------------------------
48 91.121.81.174:www.alasta.com
49 91.121.81.174:www.alasta.com
50 [+] Virtual hosts:
51 ==================
52 91.121.81.174 www.alasta.com
Il est possible d'enregistrer la sortie de commande dans un fichier HTML via l'option -f file.