MAC spoofing is a technique that allows us to change the MAC address (Media Access Control) of our electronic device. The MAC address is unique and encrypted in our electronic device for never changing. It is on the second level of OSI and we can perceive it as the physical address of our interface. To macchanger is a tool that helps us change the MAC address of our network card to any other until the next reboot. In this article we will look at how to install this tool on our computer as well as how to use it.
How to install it
Macchanger installation is only supported in the environment Linux. You will find it pre-installed in the well known distro, Kali Linux.
Ubuntu & Debian
To install macchanger in ubuntu and debian open a terminal and type the following commands:
sudo apt-get update sudo apt-get install macchanger |
Fedora
To install the macchanger in fedora and debian, open a terminal and type the following commands:
dnf install macchanger |
How to use it
To see the different parameters we can use in this tool we will open a terminal and run the following command:
macchanger –options |
The result is shown below.
root @ kali: ~ # macchanger –option macchanger: unrecognized option '-option' GNU MAC Changer Usage: macchanger [options] device-h, –help Print this help -V, –version Print version and exit -s, –show Print the MAC address and exit -e, –ending Don't change the vendor bytes -a, –another Set random vendor MAC of the same kind -A Set random vendor MAC of any kind -p, –permanent Reset to original, permanent hardware MAC -r, –random Set fully random MAC -l, –list [= keyword] Print known vendors -b, –bia Pretend to be a burned-in-address -m, –mac = XX: XX: XX: XX: XX: XX –Mac XX: XX: XX: XX: XX: XX: XX Set the MAC XX: XX: XX: XX: XX: XX Report bugs to https://github.com/alobbs/macchanger/issues |
Let's see now how we can use it to change the MAC address of our network card.
First we will try to change the MAC address to a random one. To see the current state of our eth0 interface we will use the -s parameter:
macchanger -s eth0
To proceed with the change we need to download the interface using ifconfig:
ifconfig eth0 down |
Next, we will change the MAC address to a random hexadecimal value:
macchanger -r eth0 |
Now, we will re-enable it interface us and we will check out his new items:
ifconfig eth0 up macchanger -s eth0 |
We see that the MAC address has changed. We can confirm this with the help of the ifconfig command:
Let's now try to change the MAC address of our network card to a string of our choice. To do this we will use the -m parameter:
ifconfig eth0 down macchanger -m 00:d0:70:00:20:69 eth0 ifconfig eth0 up macchanger -s eth0 |
So we see that the address has changed.
Let's see now how we can use the -l parameter to find the prefix for each hardware manufacturer:
macchanger -l |
How did you like it; We look forward to your comments ...