A MAC address is the unique identity of the user who tries to authenticate over a wireless network. Often as a best practice users prefer to Mac-filter their networks to protect themselves from attackers; however it is very easy to change a Mac address and attack the network. In this recipe, we are going to see how one can change the Mac address of a wireless card.
A wireless card and a Kali machine are required to perform this exercise. In this recipe, we will scan the available network and the devices connected to it, after which we will change the Mac ID of the wireless card to that of the host connected to the network.
airmon-ng stop wlan0mon
ifconfig wlan0
The output will be as shown in the following screenshot:
ifconfig wlan0 down
macchanger
to change our Mac address. We will change it to a legitimate authenticated user's Mac, which can be found by running the airodump-ng
command explained in the next recipe to see which Mac ID is connected to our target router: macchanger -m xx:xx:xx:xx:xx:xx wlan0
The output will be as shown in the following screenshot:
macchanger -r wlan0
The output will be as shown in the following screenshot:
ifconfig wlan0 up
18.218.218.230