How To Spoof Your MAC Address in Mac OSX

Today you'll learn how to change your Mac address in Mac OSX, and reasons why you should.

For starters, a Mac address is a unique 12-digit number that's hard-coded on the network interface card (NIC) of a device.

Most internet-connected devices have a unique Mac address. From cell phones, computers, wireless cameras, baby monitors and gaming consoles.

If a device can connect to the internet or communicate with other devices via wired, wireless, or bluetooth - it has a Mac address.

A device can have more than one Mac address if it has multiple network interfaces.

For example. If your laptop has ethernet (wired) and wifi capabilities, each interface will have a different Mac address.

What is a MAC Address and what is its purpose?

A Mac address is used to uniquely identify a device on the local network.

A local network comprises of the devices connected to the same network/wifi as you, including the router.

Such devices communicate using their Mac address. This is how they can differentiate between two of the same devices.

For instance.

If there are two iPhones using the same name and connected to the same network, the router won't be confused because both devices have a unique Mac address that which they use to communicate.


It's not possible for two devices with the same Mac address to coexist on a network.

Why? Because the network will get confused and neither devices will be able to connect to the network; thus, every device must have a unique Mac address.

Who can see my MAC address?

For a Mac address to be seen, the device must be active and communicating via wired, wireless or bluetooth.

If the device is powered off then nothing is broadcasted.

When the device is connected and being used, the Mac address is visible to:

  • Your router and routers nearby.
  • Devices connected to the same network/wifi as you.
  • Wireless sniffers (people capturing wireless data traveling through the air)

Can a MAC address be traced?

Some people might think that, if their device was stolen, it'd be possible for them to trace its location through the Mac address.

This is just not possible, as Mac addresses are NOT traceable.

Unlike a public IP address, which is transmitted over the internet, a Mac address is only visible on the local network. It doesn't travel to the outside world.

Even if your Mac address was somehow leaked online, it's not something people can simply look up and get the GPS coordinates, like they would with an IP address.

The only vulnerability that lies with a Mac address is the ability to determine the manufacturer or model of the device being used.

This can be done by using a MAC vendor lookup tool.


The closest thing someone can get to "tracing" a Mac address is to associate it with a person. And the only way to do that is to be close enough to the device while it's being used.

At the end of the day, a Mac address is just a bunch digits assigned by the manufacturer of your device.

Why Should I Spoof My Mac Address?

Spoofing your Mac address has many benefits.

For one, spoofing protects you from device monitoring and logging.

If you didn't know, every network you connect to wether home, friends, or public wifi, keeps a log of your Mac address.

Whoever is in charge of the network can see information such as when you connected to the network and for how long.

If you connect to the same network on a regular basis, anyone paying attention or monitoring the network can easily figure out which Mac address belongs to you.

All they have to do is wait for you to walk in, sit down, open your laptop and connect to the wifi. As soon as this happens, a public handshake takes place between your device and the router.

And that handshake, which can be easily captured by anyone, contains your Mac address.

TIP: To protect from device logging, always use a new Mac address each time you connect to a public network.

If you're always using public wifi, you're essentially leaving traces of your device (MAC address) on those networks.

Click to Tweet

Important Key Facts about MAC addresses

  • Mac is short for Media Access Control.
  • A Mac address is hard-coded on the network interface card (NIC) of the device itself.
  • A Mac address is used to uniquely identify a device on the local network; it's also commonly referred to as the physical address of a device (on the local network).
  • Every Mac address is unique. Two iPhones don't have the same MAC address.
  • No other device can have the same exact address as you (unless spoofed).
  • Two devices with the same Mac address cannot coexist on the network (it will lead to connection problems).
  • A Mac address can be changed or spoofed temporarily for as long as the network card supports it. 
  • Your Mac address is NOT visible or shared on the internet. It's only visible to devices within the same network or wifi as you.
  • For the most part, a Mac address cannot be traced to its exact location (with the exception of if a sniffer is within range of your device, in such case, they could use a packet sniffer to determine which wifi/network your MAC address is connected to).

How To Find Your MAC Address on MAC OS X

Side note, I'm using Mac OSX El Capitan while creating this tutorial. 

1. First, open up the terminal application and type in:

ifconfig en0 | grep ether

NOTE: Use "en0" for wireless and "en1" for ethernet.

ifconfig command find mac address osx

How to find your Mac address via System Preferences

Go to System Preferences -> Network -> Advanced -> Hardware -> Mac Address.

find mac address on mac osx

How To Spoof Your MAC Address

1. To spoof your mac address, enter the following:

sudo ifconfig en0 ether 00-00-00-00-00-00

NOTE: Spoofing requires admin privileges.

If the address you entered doesn't work, try using one from a reputable vendor:

(Sony Corporation)


(Intel Corporate)

(Samsung Electronics Co.,Ltd)

2. Once complete. Run the code in step 1 to verify the change.

ifconfig command change mac address osx

How To Fix Network Connection Issues

1. You can fix connection issues by bringing the interface down and up:

sudo ifconfig en0 down && sudo ifconfig en0 up
bash command restart interfaces osx

You can also restart the interface by clicking “Turn Wi-Fi OFF” then “ON” on the top right of the screen.

To revert the changes (or return to your permanent Mac), simply restart your computer.


Recommend: How To Boot Kali Linux From USB (With Installation Procedure)

How To Create A Bash Script To Automate Spoofing Your Mac Address on Mac OS

If you’re familiar with bash scripting, you can easily create a script that will automatically spoof your Mac address, so you don't have to keep entering the same commands repeatedly.

I've created a very basic script that allows you to change your Mac address.

This script will change your Mac address to "00:03:93:00:00:00"
If you want to change it to something different, simply replace the digits on the script.

Here’s how to use the script:

1. Create a script called (or whatever you want to name it)


2. Copy and paste the following script:

# Specify interface to spoof INT="en0" # Insert your NEW MAC address here NEW="00:03:93:00:00:00"
echo "Run me as root, fam."
echo "Your current MAC: $(ifconfig $INT | grep ether | awk '{print $2}')" sudo ifconfig $INT ether $NEW sudo ifconfig $INT down && sudo ifconfig en0 up sleep 1.50 echo "Your new MAC: $(ifconfig $INT | grep ether | awk '{print $2}')" echo "Done."

If you want to use a different MAC address, replace "00:03:93:00:00:00" with your new MAC. So it should look like this: NEW="00:01:28:11:22:bb"

Replace the “en0” with your interface (if you’re using ethernet use en1). I'm using wireless so I have it set to en0.

3. Press “Ctrl + X” then “Y” then “Enter” to save the file.

4. Make the script executable.

chmod +x

5. Run the script.


Now whenever you need to spoof your Mac address, simply run the script as shown in step 5.

If you need to change to a different Mac address, replace the Mac address in quotes as shown in step 2.

That's it! If you found this useful, please let me know! If this didn't work for you, let me know as well so I can try my best to help you.

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}