Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to get the MAC address for machine using nmap

Tags:

nmap

I have a list of remote machines in a text files. Can I know their MAC addresses using nmap ?

like image 856
Jury A Avatar asked Nov 03 '12 18:11

Jury A


People also ask

How do I trace a MAC address on my network?

To see all the MAC addresses and their associated IP addresses, type “arp -a”. This command will list all the available MAC addresses in the system. The address on the left is the IP address, while the right is the MAC address.

Can we know IP address using Nmap?

To use nmap to scan the devices on your network, you need to know the subnet you are connected to. First find your own IP address, in other words the one of the computer you're using to find your MSRTK Moduls IP-address: On Linux, type hostname -I into a terminal window.

Do scanners have MAC addresses?

It enables users to scan hosts one at a time or a group of hosts at a time. MAC scanners allow users to find the IP and MAC addresses of devices accessing their network and to trace crucial client information like DNS engagement and hostnames.


2 Answers

If you're using nmap, MAC addresses are only available if you're on the same network segment as the target. Newer versions of nmap will only show the MAC address to you if you're running as root.

i.e.:

sudo nmap -sP -n 192.168.0.0/24

like image 173
Karimi Avatar answered Oct 11 '22 21:10

Karimi


Use snmp-interfaces.nse nmap script (written in lua) to get the MAC address of remote machine like this:

nmap -sU -p 161 -T4 -d -v -n -Pn --script snmp-interfaces 80.234.33.182

 Completed NSE at 13:25, 2.69s elapsed Nmap scan report for 80.234.33.182 Host is up, received user-set (0.078s latency). Scanned at 2014-08-22 13:25:29 Арабское время (зима) for 3s PORT    STATE SERVICE REASON 161/udp open  snmp    udp-response | snmp-interfaces:  |   eth |     MAC address: 00:50:60:03:81:c9 (Tandberg Telecom AS) |     Type: ethernetCsmacd  Speed: 10 Mbps |     Status: up |     Traffic stats: 1.27 Gb sent, 53.91 Mb received |   lo |     Type: softwareLoopback  Speed: 0 Kbps |     Status: up |_    Traffic stats: 4.10 Kb sent, 4.10 Kb received 
like image 22
user2328360 Avatar answered Oct 11 '22 20:10

user2328360