MAC address spoofing not working in macOS 12 Monterey

sudo ifconfig en0 ether [MAC address]

Now results in

ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address

I have also noticed that with Big Sur.... It does not work even after disabling system protection (csruilt) I guess apple is removing that feature from Mac OS.

ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address

Same here, I am on macOS 12 Monterey Beta 5 build 21A5304g.

macOS 12 Monterey public Beta 10, still same issue ;(

This works in Monterey final release.

brew install macchanger

And then (with your network disconnected):

macchanger -m xx:xx:xx:xx:xx:xx en0

Replacing the xx with your required MAC address and en0 with the appropriate network device.

It's ridiculous. I'm a network engineer and mac spoofing it's one of the basics things at my work. How am I supposed to work now?

You can't change the lladdr (ether/macaddr) while the interface is associated with an SSID.

First, disassociate from any network:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z

Then change your lladdr:

sudo ifconfig <intf> lladdr 00:bb:cc:dd:ee:ff 

Then rejoin the WLAN normally.

Thanks Squeeby! It worked perfectly.

2021 MacBook Pro running Monterey 12.3.1.

Hi Squeeby,

Still not working...

I first command: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z

Add password, and then:

sudo ifconfig lladdr XXXXXXXX ( X = MAC address) ifconfig: ioctl (SIOCAIFADDR): Invalid argument

sudo ifconfig en0 ether XXXXXXXX ( X = MAC address) ifconfig: ioctl (SIOCAIFADDR): Invalid argument

sudo ifconfig en0 ether/macaddr XXXXXXXX ( X = MAC address) ifconfig: ether/macaddr: bad value

Can you help change MAC address on macOS Monterey?

Hi Squeeby,

I first disconnected from the network.

Then I ran: sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z

After this I added password and ran: sudo ifconfig en0 lladdr 00:bb:cc:dd:ee:ff

I restarted my computer and then rejoined the network.

The MAC address did not change from what it was previously.

Can you help me change my MAC address?

..

Hi please help

after command sudo /System/Library … after click on password sudo ifconfig en0 lladdrr (MAC address) and it shows invalid argument

Hi folks,

I'm trying to change the MAC address of a VLAN (on en0) but cannot achieve it yet.

Like: sudo ifconfig vlan2 lladdr <new_mac-address>

Did anyone know in what order I should execute the commands?

take it easy guys

1. Install brew (http:&#x2F;&#x2F;brew.sh&#x2F;)
2. brew update
3. brew install acrogenesis&#x2F;macchanger&#x2F;macchanger
Usage: macchanger [options] device
    -m, --mac MAC         Set the MAC address, macchanger -m XX:XX:XX:XX:XX:XX en0
    -r, --random          Set random MAC address, macchanger -r en0
    -s, --show            Show the MAC address, macchanger -s en0

I just found this and it worked on my 2023 MacBook Pro M2 Pro running Ventura 13.4.1:

From: Github link

Change MAC Address in macOS Monterey

I was unable to change the MAC address of the Wi-FI device on a MacBook Air (M1 2020) running macOS Monterey due to the following error: ifconfig: ioctl (SIOCAIFADDR): Can't assign requested addres.

By running these commands in following sequence I was able to change it successfully:

  • Turn WiFi device off: Click the Wifi icon in the menu bar and toggle the switch.
  • Turn the WiFi device on again: networksetup -setairportpower en0 on
  • Change the MAC: ifconfig en0 ether <new mac-address-here>
  • Run: networksetup -detectnewhardware

The changed MAC address is not reflected anywhere in the GUI, but if you do an ifconfig en0 from Terminal it shows there. And of course it will reset back to the hardware MAC address when rebooted.

I came across this tonight. This is how you spoof your mac address

  1. First, get home brew
  • https://brew.sh
  • Open up terminal

Paste this

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Next,

Paste in

  • brew install spoof-mac

https://formulae.brew.sh/formula/spoof-mac#default

Once installed, this is the output while installing - Good Luck!

~ % brew install spoof-mac
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

==> Fetching dependencies for spoof-mac: openssl@3 and python@3.11
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.1_1
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:c4366444
######################################################################### 100.0%
==> Fetching python@3.11
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/manifests/3.11.4_1
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/blobs/sha256:014abd
######################################################################### 100.0%
==> Fetching spoof-mac
==> Downloading https://ghcr.io/v2/homebrew/core/spoof-mac/manifests/2.1.1_4-1
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/spoof-mac/blobs/sha256:35b87b12
######################################################################### 100.0%
==> Installing dependencies for spoof-mac: openssl@3 and python@3.11
==> Installing spoof-mac dependency: openssl@3
==> Pouring openssl@3--3.1.1_1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openssl@3/3.1.1_1: 6,495 files, 28.4MB
==> Installing spoof-mac dependency: python@3.11
==> Pouring python@3.11--3.11.4_1.arm64_ventura.bottle.tar.gz
==> /opt/homebrew/Cellar/python@3.11/3.11.4_1/bin/python3.11 -m ensurepip
==> /opt/homebrew/Cellar/python@3.11/3.11.4_1/bin/python3.11 -m pip install -v -
🍺  /opt/homebrew/Cellar/python@3.11/3.11.4_1: 3,288 files, 62.0MB
==> Installing spoof-mac
==> Pouring spoof-mac--2.1.1_4.arm64_ventura.bottle.1.tar.gz
==> Caveats
Although spoof-mac can run without root, you must be root to change the MAC.

The launchdaemon is set to randomize en0.
You can find the interfaces available by running:
    "spoof-mac list"

If you wish to change interface randomized at startup change the plist line:
    <string>en0</string>
to e.g.:
    <string>en1</string>

To start spoof-mac now and restart at startup:
  sudo brew services start spoof-mac
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/spoof-mac/bin/spoof-mac randomize en0
==> Summary
🍺  /opt/homebrew/Cellar/spoof-mac/2.1.1_4: 781 files, 10.4MB
==> Running `brew cleanup spoof-mac`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> spoof-mac

Date July 20 2023

WiFi.. or an ethernet adapter?

WiFi: according to the replies it seems possible if you follow some steps, have not tried it yet

Ethernet adapters:

On my MBP 14" 2023 I can ONLY get the Apple TB Ethernet adapter working with the ifconfig ether command.

Every single other ethernet adapter does not allow me to change the MAC address, but they behave differently - falling into four categories:

  1. Network adapters connected over PCI / Thunderbolt containing the same chipset as the Apple TB adapter (such as the Thunderbolt display)
  2. Network adapters connected over PCI / Thunderbolt AND using a chipset Apple uses too (in the 10GbE Mac Mini for example)
  3. Network adapters connected over USB with driver support
  4. Network adapters connected over USB using a generic driver provided by macOS

Category 4 results in the error message, and so does 3 (sometimes). Category 2 however does accept the command without an error message, but does not actually do anything. According to another user this is even the case for the Aquantia 10GbE chipset in the Mac Mini 2023!

Only category 1, so the Broadcom chipset used by the old TB adapter seems to actually do the right thing.

My guess... Apple has decided to not update their current drivers. Maybe it isn't intentional.. but if it is, I really do not appreciate them not acknowledging it.

Just wanted to add to this chaos. I can also confirm mac address changing of ethernet adapters does not work on OSX Ventura as newts pointed out. I even ordered the Apple Thunderbolt 3 USB-C to Ethernet adapter thinking it would work but it does not. The newer M1 Macbooks do not have the older thunderbolt ports. Does anybody have a list of USB-C to Ethernet adapters that is known to work like newts mentioned?

Hi guys,

after trying to solve this on Ventura 13.4.1. I came to conclusion that macOS won't accept any mac address - you need to be careful to generate a mac address with apple vendor prefix. You can use this tool to generate a new mac address https://dnschecker.org/mac-address-generator.php and for apple mac address prefixes you can use this link http://www.coffer.com/mac_find/?string=apple to find them out or just google for them.

You would first need to run this to disassociate from all networks

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z

and then run the following command

sudo ifconfig en0 ether XX:XX:XX:XX:XX:XX (generated mac from dnschecker tool)

I hope this helps! I can finally use my hotel's wifi again! Yaay!

Cheers

Why do you need to change the MAC address? If it's to test routes, below probably won't work.

On the other hand, there are situations where it does work, as I verified on Sonoma.

Change the MAC address in a virtual machine. It might get you what you need.

A solution for macOS 14.5:

  1. Get your interface name by ⌥-clicking the Wi-Fi icon and checking "Interface Name". Normally it's en0.
  2. Disconnect from the Wi-Fi hotspot. Turning Wi-Fi off is not a solution; instead open the Wi-Fi menu and click the blue network to make it grey.
  3. Run sudo ifconfig en0 ether 12:34:56:78:9a:bc in Terminal (en0 is the interface name from p1; use any MAC you want).
  4. Connect back to the Wi-Fi hotspot.

The new MAC won't show anywhere in the UI nor in the networksetup -listallhardwareports output, but the router will see the new address. The address will reset when the device restarts.

My problem was daemon running in background Little Snitch . Kill it/disable it + turn off wifi

u/Mareks-MacBook-Pro-M1 LaunchDaemons % ls -al /Library/LaunchDaemons  total 16 drwxr-xr-x   5 root  wheel   160 May 14 13:49 . drwxr-xr-x  71 root  wheel  2272 May 15 14:50 .. -rw-r--r--   1 root  wheel   621 Apr 20  2023 at.obdev.littlesnitch.daemon.plist lrwxr-xr-x   1 root  wheel   103 Dec 17  2022 com.oracle.java.Helper-Tool.plist -> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Helper-Tool.plist -rw-r--r--   1 root  wheel   572 Jul  6  2022 com.xk72.charles.ProxyHelper.plist

MAC address spoofing not working in macOS 12 Monterey
 
 
Q