halo / LinkLiar

:link: Link-Layer MAC spoofing GUI for macOS
http://halo.github.io/LinkLiar
MIT License
1.23k stars 84 forks source link

high sierra: mac does not change in "Network Utility" #29

Closed helinwang closed 6 years ago

helinwang commented 6 years ago

Thanks for the project. The UI is really minimal and nice.

ifconfig en0 |grep ether do show changed mac address. However "Network Utility" still shows the original mac address.

The same thing happens when trying to set the mac manually using command line as well:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
sudo ifconfig en0 ether xxx
networksetup -detectnewhardware
halo commented 6 years ago

Hi! Thank you for your kind words!

The behavior you describe is normal. If you look at your interface via System Preferences -> Network, you will always see the original hardware MAC address (see screenshot below). Only ifconfig will tell you which MAC address is actually used for traffic leaving your computer. It's always been like that in macOS.

screen shot 2018-01-26 at 09 17 58

In fact, even when I query the interfaces using the official operating system API in Swift, I will still only get the original hardware-MAC and not the changed soft-MAC. That's why LinkLiar needs to shell out and run ifconfig in a thread to find out the current address for displaying it in the menu bar.

I'll close this issue for now but I added a comment about this in the README. Let me know if you have further thoughts, suggestions or questions.