I'm a web dev who is trying to get a better handle on security. I'm trying to figure out a way (on Linux/Debian based distros) to list all computers on the same LAN my netbook is on. I tried "arp -n" but I don't feel it's a complete list, as my iPhone is on the same wi-fi router as my netbook, and that didn't come up. Is there some better way to get a full list of machines that are all sharing the same gateway?
|
feedback
|
|
Get nmap. It's the program Trinity used in The Matrix and you can do a scan to find all of the devices that are connected to the LAN you're on and more. Here's the reference guide. | |||||||
feedback
|
|
The "all ones" (in binary) broadcast address. Note that most IP stacks will translate this to the subnet broadcast addresses for all subnets you're attached to:
The subnet broadcast address for your current subnet. So assuming you're on 192.168.1.0/24:
The "all hosts" multicast address. I like this one a lot because it's more likely to find hosts configured for other IP subnets, that happen to be attached to the same Ethernet LAN as you:
Note that this method, and the other methods I've seen mentioned in other Answers so far, only look for IP-reachable hosts on the current network. That's probably all you need to care about, but it's possible for an attacker to snoop on, or do bad things to, a network without being visible via IP. | |||
|
feedback
|
|
Hunt is a command line tool that is capable of building a list of machines as they broadcast over the network for information. It uses TCP, UDP, ICMP and ARP data to build a list of active MAC addresses on a network. It is a passive tool that works by listening on the wire. | |||
|
feedback
|
