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

Post not yet marked as solved Up vote post of Dynjo Down vote post of Dynjo
18k views
  • 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

Add a Comment

Replies

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.

  • Not work for me

  • It works for me only for en0, but when I try on en7, it doesn't work. ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address

  • No available formula with the name "macchanger"

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?

  • This message board is for Developers/Engineers, not complainers.

Add a Comment

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 its working

  • good job 👍

  • After struggling with the ether command, lladdr worked, thank you!

Thanks Squeeby! It worked perfectly.

2021 MacBook Pro running Monterey 12.3.1.

  • Please what password do y’all keep input? I can’t seem to type anything after it requests for password

Add a Comment

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?

  • you should key the cmd as sudo ifconfig en0 lladdr e0:eb:ee:ea:6c:93, intf is en0, en1 ......

  • It works on 12.6.3. In my case it worked after disabling the firewall and/or rebooting.

Add a Comment

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?

  • Do not restart the computer, or the mac addr will reset back

Add a Comment

..

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.