3-ways-to-change-your-mac-address

3 Ways To Change A Mac Address

 

In this article you will discover 3 ways to change your mac address.

 

What is a MAC address?

 
MAC = Media Access Control
The device manufacturer assigns a permanant unique physical MAC address to the Network Interface Card (NIC) on devices such as phones, printers, laptops, cameras and games consoles.
 

Why change a MAC address?

There are a number of reasons why a network engineer or a hacker may want to change their MAC address:
1- Join a network where only specific mac addresses are whitelisted by MAC filtering.
 
2- Impersonate the MAC address of another machine for a man in the middle attack.
 
3- Hide the identity of their machine so that they can be anonymous online.

How To Change Mac Address On Windows With Technitium Tool.

 
This tool is really useful to quickly change the MAC address on your Windows machine.
 
Its free to use and can be downloaded at:
 
 
Once you have downloaded and run the tool you can choose the adapter you want to change. You then have the option to enter a new MAC address or have one generated randomly. Click ‘Change Now’ and your MAC address has been changed for your Windows machine.
Technitium-Mac-Changer

How To Change MAC address on Kali Linux

 

In the terminal you can change the MAC address with a few commands:

 

ifconfig wlan0 down

ifconfig wlan0
hw ether 00:11:22:33:44:55

ifconfig wlan0 up

 

You can check the new MAC address has been changed with ifconfig

kaliterminalmacchange

How To Change Mac Address With Python

 

The third way to change the Mac Address is with a Python script and I’m actually going to give two examples. The first is a basic MAC changer and the second incorporates changing the network adapter to monitor mode.

 

Please feel free to copy this code.

 

				
					#!/usr/bin/env python

import subprocess

iface = input("Enter interface: ")
new_mac = input("Enter new MAC: ")

subprocess.call(["ifconfig", iface, "down",])
subprocess.call(["ifconfig", iface, "hw", "ether", new_mac])
subprocess.call(["ifconfig", iface, "up",])
print("Mac address changed")

				
			

As you can see when we run the macchanger.py file in the terminal, we are prompted to enter the name of the interface and the new MAC address. In this screenshot we can see the MAC address has been changed to 00:11:22:33:44:55

Kali-Mac-Changer

2 in 1 MAC Changer and Monitor Mode

This Python script will allow you to change the MAC address and then enable monitor mode on the same interface. You may copy this code.

				
					#!/usr/bin/env python

import subprocess

iface = input("Enter interface: ")
new_mac = input("Enter new MAC: ")

def mac_changer():
    subprocess.call(["ifconfig", iface, "down",])
    subprocess.call(["ifconfig", iface, "hw", "ether", new_mac])
    subprocess.call(["ifconfig", iface, "up",])
    print("Mac address changed to ", new_mac, "on interface", iface, " successfully")
mac_changer()

def mon_mode():
    subprocess.call(["ifconfig", iface, "down",])
    subprocess.call(["airmon-ng", "check", "kill",])
    subprocess.call(["ifconfig", iface, "up",])
    subprocess.call(["ifconfig", iface, "down",])
    subprocess.call(["iwconfig", iface, "mode", "monitor"])
    subprocess.call(["ifconfig", iface, "up",])
    print("Monitor mode enabled for", iface, "successfully")
mon_mode()

				
			
Kali-Macmon-Changer

If you found this blog useful on “3 ways to change your mac address”, please share it in social media channels to help others learn and do not forget to follow me on Twitter for latest blog updates. Peace.