Media Access Control (MAC) Address
The MAC address, also known as the Media Access Control address, is a unique and separate hardware number of a particular computer, especially in a LAN (Local Area Network) or other networks. When connected as a host, your computer is connected to the Internet. In this case, the IP address of your computer is linked to the physical MAC address of your computer when you are on a LAN. A MAC address is similar to an Ethernet address on the Ethernet LAN. In telecommunication protocols, the media access control, which is the sublayer of the data-link layer, uses the MAC address.
Next, we will discuss step-by-step how to change the MAC address, as well as why there is a need to change it.
Changing the MAC Address
As described earlier, the term MAC address means Media Access Control Address. A MAC address is a unique and separate identifier given to the Network Interface Controller (NIC). A MAC address is a hardware ID assigned upon connecting to the Wi-Fi or through an Ethernet cable. The MAC address is unique for each device, therefore, it does not look similar on any other device. It is possible to spoof a MAC address, but it is not possible to change it permanently. This can be done by using the MAC address.
Why Change the MAC Address?
Normally, there isn’t any need to change the MAC address, but a MAC address change can have many benefits while doing penetration testing. Say, for example, some wireless system has blocked the real MAC address, then it can be bypass or can be spoofed easily before performing the penetration test of the wireless network. In this case, the network admin cannot ban or see the original MAC address. By changing or spoofing the admin MAC address, the network admin can now ban or block the spoofed MAC address.
How to Change the MAC Address
In a Kali Linux, it is very easy to spoof the MAC address. This can be done by opening the terminal window in the Kali Linux system. Initially, we will check all of the adapters that are using the ifconfig command, as shown:
In the above screenshot, the MAC address, which is highlighted, is the MAC address of the eth0 Ethernet interface.
Here, it is essential to turn off the network interface because by doing so, we are now able to change the MAC address of the eth0.
For this purpose, we will enter the following command:
Next, we will change the MAC address. This can be done by entering the following command:
In this command, the -r flag is used to change the current MAC address to the random MAC address in the network interface of eth0.
In the screenshot above, note that the MAC address has been successfully spoofed. Now, we will turn on the network interface again.
This can be done by entering the following command:
Next, it is necessary to check the MAC address again with the help of the ifconfig command:
Above, it can be observed that the highlighted area of the MAC address is now changed.
Conclusion
This article taught you what a MAC address is and how it can be changed in Kali Linux using the macchanger tool. You also learned how to work with macchanger using the well-known ifconfig command.