Friday, April 12, 2013

How to Change your Mac / Hardware Address in Kali Linux / Backtrack

Written by: Pranshu Bajpai | Find Pranshu on Google+ And LinkedIn

Macchanger is a tool already available in Kali Linux or Backtrack.  It lets you change the hardware address pertaining to a particular interface on your machine. For instance, as 'eth0' or 'wlan0' are the interfaces for wired and wireless connection respectively, here's how you would use it:


Here, the option 'r' is used to tell macchanger to use a 'random' MAC address. The option 'A' is used to set the random vendor MAC of any kind, while 'a' is used to set the random vendor MAC of the same kind.

You can also specify the MAC address that you want to use by using the option 'm' as shown in the figure.

In case you want your machine to acquire a random MAC address every time you restart the machine, you can do so by storing the following command in the '/etc/network/interfaces' file:
pre-up ifconfig eth0 hw ether 00:00:00:00:00:00
Here, the MAC address '00:00:00:00:00:00' will be allocated to your machine each time you restart it.

Update: If you get an error while you are trying to spoof your MAC address using macchanger, it is probably because you are trying to change the hardware address of that interface while it is 'up'. This is similar to trying to change a car's tire while it is in motion--maybe not the best example, but you get the idea. You need to put the interface 'down' first. Then change the hardware address using macchanger, and then bring it 'up' again.
#ifconfig wlan0 down
#macchanger -r wlan0
#ifconfig wlan0 up

7 comments:

  1. I have a iomega external hard drive and I recently discovered that it's corrupted. There is some data on there which is important and the "mac disk utility" can't repair it. I need a free software (not limiting demos) that can do either of the following: Transfer files from my external hard drive to my mac repairs the hard drive without erasing the data

    ReplyDelete
    Replies
    1. "200 ways to revive a Hard Drive" - read that book if you want to do it yourself.. However I would suggest that you seek professional help.

      Delete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. i take this error :
    ERROR: Can't change MAC: interface up or not permission: Device or resource busy
    i have root permissions.

    ReplyDelete
    Replies
    1. ifconfig wlan0 down
      macchanger blah blah
      ifconfig wlan0 up

      Its busy so put it down before you change the mac.

      Delete
  5. macchanger -r eth0

    ReplyDelete