Macchanger is a free utility used to change the MAC address of the network adapter. Macchanger can randomly assign a MAC address or assign a specific MAC address of your choosing.
There are several instances changing the MAC address is necessary, but I use the utility while pentesting a wireless network with MAC filtering enabled and have to assign an approved MAC address to the wireless adapter.
The Macchanger utility is included with Kali Linux, but to install the application, update it, or verify your using the most up to date version run the following command. In the screen shot that follows the install command confirms that the newest version is already installed.
#apt-get install macchanger
Help with Macchanger can be accessed by running the following two commands.
#macchanger --help #man macchanger
Assign a Random MAC Address
I’m using an Alfa USB wireless adapter and I will run the following commands to verify the adapters interface and the permanent MAC address.
#ifconfig #ifconfig wlan1
Macchanger can also be used to verify the manufacture burned in MAC address by running the following command.
Change the MAC address using one of the following commands.
#macchanger -r wlan1 #macchanger -A wlan1
If you get an error message the MAC address can’t be changed and the adapter is busy take the adapter down and then rerun Macchanger. (Only the OUI portion of the MAC address is shown in the screen shot and the last 3 octets are blocked out)
#ifconfig wlan1 down #macchanger -A wlan1
Bring the interface back up and verify the MAC address is changed.
#ifconfig wlan1 up #macchanger --show wlan1
To return the MAC address to the vendor burned in address run the following command. You may have to take the interface down first.
#ifconfig wlan1 down #macchanger --permanent wlan1
Assign a Specific MAC Address
The following command will assign a specific MAC address.
Using the Macchanger GUI
If you’re not comfortable running commands there is a Macchanger GUI. A couple of commands will have to be run from the terminal window. One to install the Macchanger GUI application and the second to start the GUI application.
#apt-get install macchanger-gtk #macchanger-gtk
After the GUI opens select the options to change the MAC address and click the Change MAC button.
As you can see Macchanger is a great utility to change the MAC address and is simple to use and offers a GUI application as well. Let me know any questions in the comments section below or share any commands you find easier to use with Macchanger, or pass along any other utilities you use to change the MAC address.
Thanks for visiting my blog and happy pentesting!