How to change Mac address in kali Linux

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.

How to change Mac address in kali Linux 1

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.

Did not understand: Turn hotspot on of your phone and connect any device with this network now on connected device open hotspot settings and in connected user an id like E2:F4:R3:56:78:90 is showing that is mac id of the connected device.

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 adaptersifconfig

How to change wlan0 address: Type following commands to spoof wlan0 interface

root@kali:~# ifconfig wlan0 down
              
For changing id manually then type macchanger –m  fake address wlan0 for example

root@kali:~#

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

root@kali:~# ifconfig wlan0 up

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.

10 thoughts on “How to change Mac address in kali Linux”

  1. 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.

    Reply
  2. 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

    Reply

Leave a Comment