Each network card has a physical static address assigned by the card manufacturer called MAC address (Media Access Control), this address is used between devices to identify each other and each packet has a source and destination MAC address so they can be transferred to the right place.
This address is actually written, it’s phisically written, which means that it is never going to change, because of this, it can be used to trace you back and identify your device. Also, as they are used to identify each device in the network, they can be a connection moderor for some networks, they can use a blacklist and blacklist your address so you can not be able to connect to that network.
As the MAC address is static and phisically written, there is no way to change it, but the address stored in the RAM can be changed. So, it will be changed for this session, but once you restart your device you will have to change it again.
If you want to change the MAC address stored in the ram, you can do it by using
a tool called
macchanger and it can be used the following way:
First, you will need to install some necessary programs:
# On Kali linux sudo apt install macchanger net-tools # On Black Arch sudo pacman -S macchanger net-tools
Once it is installed, you will need to identify your in-use network interface, by issuing the command:
If you are using a wired connection an interface like
enp1s0would be the one you are using, if you are running a Wi-Fi connection, an interface like
wlan0would be your interface (it can also be checked through the Ip address)
Once you identified your interface (in my case it is eth0), run the following command to shut your interface down (this will shut down your connection too)
ip link set eth0 down
Then, run the following command to generate a random MAC address:
macchanger -r eth0
Note: You can access the
macchangerhelp by running:
Finally, bring your interface up again by running:
ip link set eth0 up