Mac – How to get the MAC Address and signal strength of nearby wireless devices

mac addresssignal strengthwifi-configurationwireless-access-pointwireless-networking

Is there a way to get the MAC Address and signal strength of nearby wireless devices from something like a phone or a laptop, or by using an access-point?

Best Answer

Well Everybody answered the Question for Windows Platform only. So, I thought It would be useful to answer for Linux Platform too. On Linux you can do the following:

Getting MAC Address of Devices connected in your network

You can Use a number of tools for thus task such as Netdiscover, arp-scan, nmap and even WireShark. These tools are basically used in Penetration Testing of Wireless Networks and can be used to get to know who is in the Network by knowing their IP Address and MAC Address.

ARP (Address Resolution Protocol) is used to map MAC addresses to IP addresses on an internal network. The router and switches send out broadcast ARP requests to all the MAC addresses on the network asking them to respond with their IP addresses. Each system will then respond with their IP address and the switch or other device will then create a small database that maps the MAC to the IP address, so that it it knows "who is who". Both the tools Uses ARP Packets to get this information.

  1. Using Netdiscover

    Netdiscover is used for the active or passive scanning of those wireless networks without the DHCP server. It can also be used for scanning hub/switched networks.

    netdiscover -i eth0 -r 192.168.2.0/24
    

    where -i denotes the interface (Here eth0) & -r denotes the `IP Range to be tested.

    See this Example

  2. Using arp-scan

    arp-scan (also called ARP Sweep or MAC Scanner) is a very fast ARP packet scanner that shows every active IPv4 device in the network. Since ARP is non-routable, it only works in local LAN (local subnet or network segment). It shows all active devices even if they have firewalls.

    arp-scan --interface=wlan0 [ --localnet ] 192.168.0.1/24
    

    Tutorial for using arp-scan & Full Documentation Here

Getting MAC Address of Devices NOT connected in your network

Well this part is an exact answer to your Question about both MAC Address and Signal of nearby devices. For this we can use Airmon-ng tool to setup a Wireless Monitor and then use Airodump-ng to dump the wireless signals from Monitor to Sreen. Both tools are part of Aircrack-ng, again a set of tools used for Penetration Testing of Wireless Networks. This is a prefect tool for what you want.

Using Aircrack-ng Suite is not quite easy but It's worth the time and effort. Writing all commands in the answer will make it quite boring, So A short steps of commands goes like this

  1. Check Interface Status:

    airmon-ng
    
  2. Check any Processes that can be troublesome to Airmon-ng & killing them:

    airmon-ng check kill
    
  3. Enable monitor mode (start) on the given wireless interface (wlan0)

    airmon-ng start wlan0
    

    where wlan0 is the name of wireless interface. Type iwconfig at terminal to get the wireless interface name of wireless device on your machine.

  4. Start Airodump-ng to dump the packets from Wireless Monitor

    airodump-ng mon0
    

    where mon0 is the monitor initiated on the interface wlan0. Now You will clearly see all the devices nearby you and everyone's MAC Address and signal Strength also. When done press Ctrl+C to stop Monitoring.

  5. Finally stop the Monitor mode on Interface

    airmon-ng stop wlan0
    

Note : It doesn't matters whether you are connected or not to a wireless Network for Using Airmon-ng. The only problem is that Using Airmon-ng commands need to put the Wireless Interface (on your device) into Monitor mode, as a result of which you will get disconnected to any Wireless Network, but the rest of all works perfect for what you need.

Complete Tutorial on Using Aircrack-ng Suite

Related Question