Changing the MAC Address on a Kali Box

First look at the MAC Address for your device (there are many ways):

ifconfig | grep ether

or

cat /sys/class/net/*/address
cat /sys/class/net/eth0/address


Shutdown the interface you want to change:

ifconfig eth0 down


Change the MAC Address:

ifconfig eth0 hw ether 00:00:00:00:00:01

Bring the interface back up:

ifconfig eth0 up

That’s it. Your MAC Address should now show up as the one entered above.

Permanently Change The MAC Address

If you want to permanently change the MAC Address, edit the interfaces file by adding “pre-up ifconfig eth0 hw ether 00:00:00:00:00:01“:

nano /etc/network/interfaces

You should see something like below:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
pre-up ifconfig eth0 hw ether 00:00:00:00:00:01

Restore original the MAC Address by puting a # in front of the line:

#pre-up ifconfig eth0 hw ether 00:00:00:00:00:01
More Stories
RFC1918 Private IPv4 Address Spaces