Today you’ll learn a quick and easy way on how to change your mac address in Kali Linux using a tool called macchanger.
Before I start, there are two ways to go about changing your Mac address in Kali Linux that you’ll learn here.
- Using Macchanger
I’ll be showing you how to do both in this article.
Macchanger is a free Mac address manipulation tool that comes pre-installed in Kali Linux which is what we’ll use here. If you don’t have it installed, you can install it by following the installation steps below.
How To Install Macchanger on Kali Linux
By default, macchanger should be pre-installed in Kali. If not, you can install it using the following command:
sudo apt-get install macchanger
During the installation process, you’ll be asked if you want to spoof the Mac address each time you attach a ethernet cable or a network adapter.
If you select yes, you’ll automatically be assigned a new Mac address for each interface brought up or plugged in. It’s up to you if you want to enable this or not.
It’s up to you if you want to enable this or not.
If you have mac-filtering enabled on your router, you’ll want to select NO on this one; otherwise, you won’t be able to connect to your own wifi.
Afterwards, check to make sure it’s installed and working by typing “macchanger” in the terminal.
It should look like this:
How To Display Network Interfaces
Next, we need to determine the interface we want to spoof.
To list all available network interfaces on your system, type the following command:
Depending on which interface you want to spoof, you’ll want to make sure you use the name of your interface. Mine is “wlan0.”
Now that we know what interface to use, it’s time to get spoofin!
Bring Down The Interface You Want To Spoof
If you spoof without bringing down the interface, you’ll get the “insufficient permission” or “device is busy” error.
You must always bring the interface down before changing the Mac address.
sudo ifconfig wlan0 down
Remember to replace “wlan0” with your interface.
Display Your Current Mac Address
This will show you the current (and permanent) Mac address of an interface.
-s = print the Mac address
macchanger -s wlan0
Set (Specify) Your New Mac Address
This will set your Mac address to whatever value you assign it.
-m = set the Mac address
macchanger -m 11:22:33:44:55:66 wlan0
Change Mac Address To A Random Vendor
This will randomize your Mac address and it will use one from a known vendor.
NOTE: A vendor is the manufacturer of the network interface card (ie. TP-LINK TECHNOLOGIES CO., LTD)
-A = set a random Mac address of any kind.
macchanger -A wlan0
Change Mac Address But Use The Same Vendor
This will randomize your Mac address but it will use the same vendor as your current one.
-a = set a random Mac address of the same kind
macchanger -a wlan0
Change To A Fully Random Mac Address With No Vendor
This will set a fully random Mac address with no vendor.
If you were to use a MAC address lookup tool, it won’t be able to detect the manufacturer because it’s completely made up.
-r = set a fully random Mac address
macchanger -r wlan0
Reset (Revert) Back To Original Mac Address
This will revert the changes and it will go back to using the permanent Mac address of the interface.
-p = reset to original Mac address
macchanger -p wlan0
View a list of known Mac vendors
If you want to set your own Mac address, this will show you a huge list of legit Mac vendors you can choose from.
-l = print known vendors
NOTE: After making changes to the Mac address, you’ll need to bring the interface back up by typing: ifconfig wlan0 up.
How To Manually Change Mac Address On Kali Linux (without Macchanger)
If you don’t have macchanger installed, here’s how to change your Mac address manually.
For this to work, you have to use a Mac address from a known vendor. Fully random Mac address won’t always work.
ifconfig wlan0 downifconfig wlan0 hw ether fc:c7:34:12:bc:1cifconfig wlan0 up
That’s it! Let me know if you have any questions. I’ll be glad to help.