V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
LaureatePoet
V2EX  ›  macOS

macOS 在 15.5(可能更早)及之后 通过 SIP 限制了 MAC 地址的修改 :(

  •  
  •   LaureatePoet · Oct 12, 2025 · 2144 views
    This topic created in 199 days ago, the information mentioned may be changed or developed.

    macOS 在 15.5(可能更早)及之后 通过 SIP 限制了 MAC 地址的修改 :(

    具体表现为:spoof-mac 工具失效;sudo ifconfig en0 ether [mac address]也失效。

    WARNING: The airport command line tool is deprecated and will be removed in a future release.
    For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
    ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address
    

    ref:

    5 replies    2025-10-15 12:57:11 +08:00
    LaureatePoet
        1
    LaureatePoet  
    OP
       Oct 12, 2025
    补充一下:是 macOS 在 15.5(可能更早)及之后 通过 SIP 限制了"无线网卡 en0 MAC 地址"的修改,经过测试,有线网卡还是可以修改的。
    intoext
        2
    intoext  
       Oct 12, 2025
    @LaureatePoet 通过第三方软件也无法修改吗? 苹果这又是为了啥呢 溯源??
    cnachen
        3
    cnachen  
       Oct 13, 2025
    貌似是 macOS 15 加入的 private Wi-Fi address 功能 break 了一些东西,
    可以用下面的工具修改,macOS 26 实测有效。
    https://github.com/acrogenesis/macchanger/
    LaureatePoet
        4
    LaureatePoet  
    OP
       Oct 13, 2025
    感谢 @cnachen 提供的线索。已解决!

    我在安装 `acrogenesis/macchanger` 的过程中 Terminal 提示我更新`xcode command line` 及 `Xcode` 到最新。在安装 macchanger 确实可以修改。后续我 测试了 spoof-mac 工具修改 MAC 地址也没有报错;于是我在想“是不是因为升级 macOS 系统之后,Xcode 没有更新导致的 spoof-mac 报错”,遂`brew uninstall macchanger` 重启,发现 spoof-mac 报错了。我将 spoof-mac 更新至最新版,成功!


    总结:macOS 更新系统之后(特别是跨大版本更新),将 Xcode(include `Xcode Command Line Tools`)更新至最新版,使用 spoof-mac 或者 macchanger 最新版即可修改无线网卡 MAC 地址。

    *本次测试 spoof-mac 2.1.1, macchanger 1.6.1, macOS 15.7.1*
    LaureatePoet
        5
    LaureatePoet  
    OP
       Oct 15, 2025
    补充一下:spoof-mac 是无效。还是得用#3 的
    https://github.com/acrogenesis/macchanger 有效
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4529 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:05 · PVG 18:05 · LAX 03:05 · JFK 06:05
    ♥ Do have faith in what you're doing.