Spoof your MAC address automatically at boot on macOS using SpoofMAC

Go to the profile of Sun KnudsenSun Knudsen

May 15

Every network adapter (the physical hardware used to connect to Wi-Fi access points) has its very own (and very unique) identifier called a MAC address. It looks something like this: 00:0C:29:5B:14:B3.

Want to know yours? Run the following command.

ifconfig en0 | grep ether | awk '{print $2}'

This MAC address is always the same by default and can be used to identify you personally (well, your device) when you go from one place to another.

Have you ever wondered how Wi-Fi networks that offer the first 30 minutes for free know who you are? You might have tried creating another account to get additional minutes, but that didn’t work right? That’s because your MAC address is used to identify your device.

READ ALSO:

MAC Address

Lets learn how to spoof (anonymize) that address to help you gain some privacy.

How to spoof your MAC address automatically at boot on macOS using SpoofMAC

Step 1: Install Homebrew

Homebrew is a macOS package manager similar to apt on Debian.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2: Install SpoofMac

brew install spoof-mac

Step 3: Test things out by manually spoofing your MAC address

You might have to reconnect to your Wi-Fi network after running this command.

sudo spoof-mac randomize en0

Step 4: Spoof your MAC address automatically at boot

Create the a local.macspoof.plist file using command sudo vi /Library/LaunchDaemons/local.macspoof.plist, paste the following code block into the window, save and exit.

Vim is a strange app. Once you enter Vim, you first have to press i to enter insert more. Then, you can paste the following code block. Then press Esc to exit insert mode. Then press Shift+z+z to save and exit.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>MacSpoof</string>
        <key>ProgramArguments</key>
<array>
<string>/usr/local/bin/spoof-mac.py</string>
<string>randomize</string>
<string>en0</string>
</array>
        <key>RunAtLoad</key>
<true/>
</dict>
</plist>

Step 5: Reboot

Step 6: Test launch daemon using command spoof-mac list

The output of the command should look similar to the following.

“Wi-Fi” on device “en0” with MAC address 00:0C:29:5B:14:B3 currently set to 00:50:56:43:BB:66

If so, your MAC address has been spoofed! 🎉

Similar Articles:

Self-host your very own strongSwan IKEv2/IPsec state-of-the-art VPN server for iOS and macOS

Self-host your very own strongSwan IKEv2/IPsec state-of-the-art VPN server for iOS and macOS

How I’m (slowly) moving off the cloud with Nextcloud

How I’m (slowly) moving off the cloud with Nextcloud

How Plus Addressing Can Prevent Spam

How Plus Addressing Can Prevent Spam

Free Hotel Wifi over and over indefinitely with Python and Selenium

Free Hotel Wifi over and over indefinitely with Python and Selenium