Article original Publié le : 07 mai 2017 Mise a jour le : 12 septembre 2021 |
- MAJ: Correction des urls et réécriture de l’article
I.Description
Fing est un outil d’analyse et de collecte, il scan des plages d’adresses et dresse une liste des équipements connectés au réseau
On peut ainsi récupérer une cartographie des matériels, ip, mac, nom, status ..
Il peut être utilisé en instanté ou en continu (recherche de nouveau hôte, status up/down des hosts existant ..)
II.Installation
Compatible tout système, jusqu’a Android, les sources sont disponible sur le repo officiel https://www.fing.com/products/development-toolkit/
Pour l’installation sur Debian/Ubuntu actuellement 5.5.2, récupérer l’archive, déziper et installer selon son architecture .
1 |
$ wget -O source-fing.zip https://www.fing.com/images/uploads/general/CLI_Linux_Debian_5.5.2.zip |
1 |
$ unzip -d source-fing source-fing.zip |
1 |
$ sudo dpkg -i source-fing/fing-5.5.2-amd64.deb |
III.Utilisation
Plusieurs options sont disponibles
1 |
fing -h |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
=== Fing 5.5.2 - www.fing.io === CLI options: Helper: -h [ --help ] show this help message -v [ --version ] show fing version --interactive start the interactive mode Command List: -i [ --info ] show network informations -n [ --netdiscover ] arg run network discovery -s [ --servicescan ] arg scan services on host/network -p [ --ping ] arg run icmp ping on the hosts -T [ --traceroute ] arg run traceroute on the specified host -w [ --wol ] arg send wake on lan command on targets Command Options: -d [ --rdns ] arg enable/disable reverse DNS lookups -o [ --output ] arg use output setup for discovery/scan/ping -P [ --profile ] arg use specific discovery/scan/ping profile -r [ --rounds ] arg number of rounds for discovery -m [ --maxports ] arg max ports for scan --session arg use specific discovery session file --silent force to silent mode |
Pour lancer la découverte d’une plage réseau
1 |
$ sudo fing -n 192.168.3.0/24 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
02:50:50 > Discovery profile: Default discovery profile 02:50:50 > Discovery class: data-link (data-link layer) 02:50:50 > Discovery on: 192.168.3.0/24 02:50:50 > Discovery round starting. 02:50:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (CADMUS COMPUTER SYSTEMS) 02:50:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Cisco) 02:50:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Raspberry Pi Foundation) 02:50:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Synology) 02:50:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Lg) 02:50:52 > Discovery progress 75% ------------------------------------------------------------------------------- | State | Host | MAC Address | Last change | |-----------------------------------------------------------------------------| | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | ------------------------------------------------------------------------------- 02:50:54 > Discovery round completed in 4.754 seconds. 02:50:54 > Network 192.168.3.0/24 has 5/5 hosts up. 02:50:54 > Next round starting at 02:51:50. Press Ctrl^C to exit. 02:51:50 > Discovery round starting. 02:51:50 > Discovery progress 25% 02:51:52 > Discovery progress 50% 02:51:53 > Discovery progress 75% 02:51:55 < Host is down: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Synology) ------------------------------------------------------------------------------- | State | Host | MAC Address | Last change | |-----------------------------------------------------------------------------| | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | DOWN | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | 02:51:55 | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | ------------------------------------------------------------------------------- 02:51:55 > Discovery round completed in 5.007 seconds. 02:51:55 > Network 192.168.3.0/24 has 4/5 hosts up. 02:51:55 > Next round starting at 02:52:50. Press Ctrl^C to exit. 02:52:50 > Discovery round starting. 02:52:50 > Host is up: 192.168.3.xxx HW Address: xx:xx:xx:xx:xx:xx (Synology) 02:52:50 > Discovery progress 25% 02:52:52 > Discovery progress 50% 02:52:53 > Discovery progress 75% ------------------------------------------------------------------------------- | State | Host | MAC Address | Last change | |-----------------------------------------------------------------------------| | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | 02:52:50 | | UP | 192.168.3.xxx | xx:xx:xx:xx:xx:xx | | ------------------------------------------------------------------------------- 02:52:55 > Discovery round completed in 5.000 seconds. 02:52:55 > Network 192.168.3.0/24 has 5/5 hosts up. 02:52:55 > Next round starting at 02:53:50. Press Ctrl^C to exit. |
Vérifier les services tcp ouverts sur les machines du réseau
1 |
$ sudo fing -s 192.168.3.0/24 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
12:47:29 > Service scan on a local network 12:47:29 > Preemptive discovery on: 192.168.3.0/24 12:47:34 > Preemptive discovery completed. 12:47:34 > Service scan on: 192.168.3.xxx 12:47:34 > Service scan starting. 12:47:34 > Detected MAC address: xx:xx:xx:xx:xx:xx 12:47:34 > Detected service: 443 (https) 12:47:36 > Service scan completed in 1.612 seconds. 12:47:36 > Service scan on: 192.168.3.xxx 12:47:36 > Service scan starting. 12:47:36 > Detected MAC address: xx:xx:xx:xx:xx:xx 12:47:36 > Detected service: 2222 (ssh) 12:47:36 > Service scan completed in 0.561 seconds. 12:47:36 > Service scan on: 192.168.3.xxx 12:47:36 > Service scan starting. 12:47:36 > Detected MAC address: xx:xx:xx:xx:xx:xx 12:47:40 > Detected firewall 12:47:40 > Service scan completed in 3.649 seconds. 12:47:40 > Service scan on: 192.168.3.xxx 12:47:40 > Service scan starting. 12:47:40 > Detected MAC address: xx:xx:xx:xx:xx:xx 12:47:40 > Detected service: 25 (smtp) 12:47:40 > Detected service: 80 (http) 12:47:40 > Detected service: 139 (netbios-ssn) 12:47:40 > Detected service: 443 (https) 12:47:40 > Detected service: 445 (microsoft-ds) 12:47:40 > Detected service: 465 (smtps) 12:47:40 > Detected service: 554 (rtsp) 12:47:40 > Detected service: 587 (submission) 12:47:40 > Detected service: 993 (imaps) 12:47:40 > Detected service: 995 (pop3s) 12:47:41 > Detected service: 3128 (squid-http) 12:47:41 > Service scan completed in 0.554 seconds. 12:47:41 > Service scan on: 192.168.3.xxx 12:47:41 > Service scan starting. 12:47:41 > Detected MAC address: xx:xx:xx:xx:xx:xx 12:47:43 > Service scan completed in 1.717 seconds. ------------------------------------------------------------------------------- | Scan result for 192.168.3.xxx (xx:xx:xx:xx:xx:xx) | |-----------------------------------------------------------------------------| | Port | Service | Description | |-----------------------------------------------------------------------------| | 443 | https | Secure World Wide Web HTTP (SSL) | ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- | Scan result for 192.168.3.xxx (xx:xx:xx:xx:xx:xx) | |-----------------------------------------------------------------------------| | Port | Service | Description | |-----------------------------------------------------------------------------| | 2222 | ssh | SSH Secure Shell | ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- | Scan result for 192.168.3.xxx (xx:xx:xx:xx:xx:xx) | |-----------------------------------------------------------------------------| | Port | Service | Description | |-----------------------------------------------------------------------------| | 25 | smtp | Simple Mail Transfer | | 80 | http | World Wide Web HTTP | | 139 | netbios-ssn | NETBIOS Session Service | | 443 | https | Secure World Wide Web HTTP (SSL) | | 445 | microsoft-ds | SMB directly over IP | | 465 | smtps | smtp protocol over TLS/SSL (was ssmtp) | | 554 | rtsp | Real Time Stream Control Protocol | | 587 | submission | | | 993 | imaps | imap4 protocol over TLS/SSL | | 995 | pop3s | POP3 protocol over TLS/SSL | | 3128 | squid-http | | ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- | Non positive scan results | |-----------------------------------------------------------------------------| | Host | Result | |-----------------------------------------------------------------------------| | 192.168.3.0 | host unreachable | | 192.168.3.1 | host unreachable | | 192.168.3.2 | host unreachable | | 192.168.3.3 | host unreachable | | 192.168.3.4 | host unreachable | | 192.168.3.5 | host unreachable | | 192.168.3.6 | host unreachable | | 192.168.3.7 | host unreachable | | 192.168.3.8 | host unreachable | | 192.168.3.9 | host unreachable | | 192.168.3.10 | host unreachable | | 192.168.3.11 | host unreachable | | 192.168.3.12 | host unreachable | | 192.168.3.13 | host unreachable | | 192.168.3.14 | host unreachable | | 192.168.3.15 | host unreachable | | 192.168.3.16 | host unreachable | | 192.168.3.17 | host unreachable | | 192.168.3.18 | host unreachable | | 192.168.3.19 | host unreachable | | 192.168.3.20 | host unreachable | | 192.168.3.21 | host unreachable | | 192.168.3.22 | host unreachable | | 192.168.3.23 | host unreachable | | 192.168.3.24 | host unreachable | | 192.168.3.25 | host unreachable | | 192.168.3.26 | host unreachable | | 192.168.3.27 | host unreachable | | 192.168.3.28 | host unreachable | | 192.168.3.29 | host unreachable | | 192.168.3.30 | host unreachable | | 192.168.3.31 | host unreachable | | 192.168.3.32 | host unreachable | | 192.168.3.33 | host unreachable | | 192.168.3.34 | host unreachable | | 192.168.3.35 | host unreachable | | 192.168.3.36 | host unreachable | | 192.168.3.37 | host unreachable | | 192.168.3.38 | host unreachable | | 192.168.3.39 | host unreachable | | 192.168.3.40 | host unreachable | | 192.168.3.41 | host unreachable | | 192.168.3.42 | host unreachable | | 192.168.3.43 | host unreachable | | 192.168.3.44 | host unreachable | | 192.168.3.45 | host unreachable | | 192.168.3.46 | host unreachable | | 192.168.3.47 | host unreachable | | 192.168.3.48 | host unreachable | | 192.168.3.49 | host unreachable | | 192.168.3.50 | host unreachable | | 192.168.3.51 | host unreachable | | 192.168.3.52 | host unreachable | | 192.168.3.53 | host unreachable | | 192.168.3.54 | host unreachable | | 192.168.3.55 | host unreachable | | 192.168.3.56 | host unreachable | | 192.168.3.57 | host unreachable | | 192.168.3.58 | host unreachable | | 192.168.3.59 | host unreachable | | 192.168.3.60 | host unreachable | | 192.168.3.61 | host unreachable | | 192.168.3.62 | host unreachable | | 192.168.3.63 | host unreachable | | 192.168.3.64 | host unreachable | | 192.168.3.65 | host unreachable | | 192.168.3.66 | host unreachable | | 192.168.3.67 | host unreachable | | 192.168.3.68 | host unreachable | | 192.168.3.69 | host unreachable | | 192.168.3.70 | host unreachable | | 192.168.3.73 (xx:xx:xx:xx:xx:xx) | no service found, firewalled | | 192.168.3.75 (xx:xx:xx:xx:xx:xx) | no service found | | 192.168.3.76 | host unreachable | | 192.168.3.77 | host unreachable | | 192.168.3.78 | host unreachable | | 192.168.3.79 | host unreachable | | 192.168.3.80 | host unreachable | ... ... | 192.168.3.254 | host unreachable | | 192.168.3.255 | host unreachable | ------------------------------------------------------------------------------- |
Peut etre aussi lancé en mode interactif
1 |
$ sudo fing --interactive |
Pour renvoyer vers un fichier de sortie, utiliser le paramètre -o suivie de l’extension et du nom
1 |
$ sudo fing -s 192.168.3.0/24 -o html,export-fing-port.html |
1 |
$ sudo fing -s 192.168.3.0/24 -o csv,export-fing-port.csv |
1 |
$ sudo fing -s 192.168.3.0/24 -o text,export-fing-port.txt |
1 |
$ sudo fing -n 192.168.6.0/24 -o table,html,export-fing-ip.html |
1 |
$ sudo fing -n 192.168.6.0/24 -o table,csv,export-fing-ip.csv |
1 |
$ sudo fing -n 192.168.6.0/24 -o table,text,export-fing-ip.txt |
Pour tester la latence du reseau avec le paramètre -p suivie d’une ou plusieurs url
1 |
$ sudo fing -p google.fr free.fr yahoo.fr |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
13:41:49 > Ping reply from 216.58.213.131 in 40 ms 13:41:49 > Ping reply from 212.27.48.10 in 29 ms 13:41:49 > Ping reply from 74.6.50.24 in 137 ms 13:41:49 > Ping reply from 216.58.213.131 in 31 ms 13:41:49 > Ping reply from 212.27.48.10 in 53 ms 13:41:49 > Ping reply from 74.6.50.24 in 132 ms 13:41:49 > Ping reply from 216.58.213.131 in 30 ms 13:41:50 > Ping reply from 212.27.48.10 in 39 ms 13:41:50 > Ping reply from 74.6.50.24 in 131 ms 13:41:50 > Ping reply from 216.58.213.131 in 54 ms 13:41:50 > Ping reply from 212.27.48.10 in 28 ms 13:41:50 > Ping reply from 74.6.50.24 in 140 ms 13:41:50 > Ping reply from 216.58.213.131 in 30 ms 13:41:50 > Ping reply from 212.27.48.10 in 32 ms 13:41:51 > Ping reply from 74.6.50.24 in 131 ms ----------------------------------------------- | === overlook fing 3.0 - www.overlooksoft.co | |---------------------------------------------| | host | avg | loss | min | max | |---------------------------------------------| | free.fr | 36 | - | 28 | 53 | | google.fr | 37 | - | 30 | 54 | | yahoo.fr | 134 | - | 131 | 140 | ----------------------------------------------- |
Pour lister les interfaces disponibles
1 |
$ sudo fing -i |
1 2 3 4 5 |
Local network interfaces: wlp3s0 Hardware address: xx:xx:xx:xx:xx:xx Vendor: Azurewave Technologies IP address: 192.168.3.244/24 [192.168.3.255] IP address: FE80:0000:0000:0000:A65B:B120:218B:D45B/128 |
J’avais eu l’occasion de découvrir l’outil il y a quelques temps et je continue à l’utiliser régulièrement…
Sympas tes tutoriels on y apprend pas mal de choses….
Kenavo…
Hello,
Merci pour ton retour