ARP Tools: arpdiscover looking for the IP of the devices on the network
Translation of the original in Catalan. Read it in: CatalàCastellano
Often in company networks we have more things connected than we remember. Or even worse things, there's some device (e.g. printserver) and we have no idea what IP it has so we can connect to it. Well, with the ARP Tools (gentoo package: net-analyzer/arptools) there's a tool called arpdiscover that massively sends ARP packets to the local network to see which IPs answer us.
For example:
$ sudo ./arpdiscover 10.19.83.1 5
using inteface eth0
our hw address is 00:11:D8:A9:D6:3B
our ip address is 10.19.83.5
bpf filter is 'ether dst 00:11:D8:A9:D6:3B && arp'
sniffer fork()ed into background with pid = 2535
request for hw address of ip address 10.19.83.1, 42 bytes to send, 42 bytes sent
received arp packet 60 bytes, hw address is 00:13:10:92:C2:E3, ip address is 10.19.83.1
request for hw address of ip address 10.19.83.2, 42 bytes to send, 42 bytes sent
request for hw address of ip address 10.19.83.3, 42 bytes to send, 42 bytes sent
request for hw address of ip address 10.19.83.4, 42 bytes to send, 42 bytes sent
request for hw address of ip address 10.19.83.5, 42 bytes to send, 42 bytes sent
waiting for sniffer terminate
sniffer terminated, exiting
scanner terminated3 comments
Comments from the old blog, as they were written. Comments are closed.
melmak
Interesante, pero lo del discover verndria a ser lo mismo que un simple ping a broadcast y luego grepar con la MAC la cache arp no ?
—
[1]
el problema de lo que comentas es que no todas las implementaciones de TCP/IP responden a los pings broadcast. Por ejemplo, windows no lo hace. Encambio con el método usado por arpdiscover se pregunta a todas las posibles IPs del rango que MAC tienen via ARP. Esto es mucho más rápido, por ejemplo, que hacer un ping para cada una de las IPs del rango. A no ser que tengas alguna herramienta que te haga los pings igual que lo hace arpdiscover, o sea, creando hijos (lanzando fork's) de la aplicación padre.
melamak
[2] No, si esta claro que alguna ventaja tenia que tener, y de ahi mi pregunta. Gracias por tu rápida respuesta ;o)