Macchanger is a tool used to change mac address in Linux. In kali and backtrack it is pre-installed on other distribution you can install it manually (type macchanger in the terminal to know how to install) by reading this tutorial you can spoof Mac address of any interface like eth0, wlan0 etc.
If you are new Kali Linux then before starting tutorial you need to know what Mac Address is and why you need to change it. Generally, an error you need to down interface if you not down this then there will an error occur ERROR: can’t change mac address: interface up or not permission: Cannot assign requested address while occur while changing mac.
Also, read:
What is Mac Address?
Mac stands for Multimedia access control. It is basically our computer’s hardware identification or while connecting an Ethernet or Wi-Fi an identification of our device is needed that id is our Mac id. Every device has unique Mac id and you can’t change it permanently but you are able to spoof for some time it with macchanger. Wi-Fi address is 12-bit long ex. E2:F3:W3:34:56:67 in Every id first three digits E4:F3:W3 are the identity of manufacture and last three digits 34:56:67 are made by the manufacturer. The Same way our Ethernet id is made but it 10 bit long. Remember Ethernet and Wi-Fi address are not same these are two different-different interfaces. To know your real id go to setting→network→wireless.
Why do you need to change it?
For the normal purpose, there is no need to spoof but in hacking, it has many benefits.
Bypass Mac filtration security: This is wireless network security. In this security only allowed device are able to connect to wifi other device are unable to connect because as I tell you above by default every device has a unique id so only allowed devices can connect to wi-fi. To bypass this security you need to spoof your id.
While hacking a router: If you want to full control by hacking router then you should spoof Mac id because if the admin sees any activity from your computer id then admin can block but you if your wifi address is not real then you can reconnecting to the network.
How to Spoof Mac
It is very easy. In this tutorial I will change my wireless adapter address but I will I also tell you how you can change other adapter addresss.
open terminal and type ifconfig. it will show you all the adapters
How to change wlan0 address: Type following commands to spoof wlan0 interface
For changing id manually then type macchanger –m fake address wlan0 for example
macchanger –m 12:12:12:12:12:12 wlan0
If you want to change your id automatically then type
macchanger -a wlan0
And for random change replace -a with –r
And in the last type
For turning off spoofing type
ifconfig wlan0 down
Ifconfig -p wlan0 // -p mean permanent
ifconfig wlan0 up
Now your wifi address interface id is successfully changed you can connect your PC with phone’s hotspot for verification if you are not able to buy a router.
How to change eth0 interface: To spoof eth0 address just replace eth0 with wlan0
Ifconfig eth0 down //Type only if you are using ethernet
Macchanger -r eth0
Ifconfig eth0 up
Tip: For bypass mac filtration security change wlan0 not mon0 although you enable mon0 interface. If your internet stop working then disconnect and network and connect again to it.
Reason error occurring on changing Multimedia access control?
Most of the times we do not down interface
If we do not type correct syntax for wlan0 XX:XX:XX:XX:XX:XX and for eth0 XX:XX:XX:XX:XX replace xx with any numerical or alphabet.
If you running dual os using Virtual box then you need to buy a wireless adapter for wlan0.
It give an error of network driver did not actually change to the new mac address
did you down interface and are you using any kind of virtual machine or dual boot
thnx dude
Welcome
Solved the problem. I did the ifconfig interface up down, but my vpn was set on autoconnect and it was messing up the settings.
Without starting the vpn at reboot and performing the macchanger commands, the internet was working. Then i connected the vpn and the random mac remained the same.
Hope it helps others who have this problem.
Just a small question… while doing so on any interface i loose connection to the internet.. i am connected to the router but i cant ping anything. even if i return the mac to its original address i still cant access internet. only option the is to reboot. any solution or idea of what could cause this? thank you
Did you up interface mean type this command ipconfig wlan0 up
Of course. Even restarted network manager.. it may be due to vpn perhaps?
Smartest problem here. I lose internet connection. Could be because of my router?
Bro, that’s why I typed ifconfig wlan0 down and ifconfig wlan0 up commands