Changing MAC on Macs / Mac OSX
Montag, November 23rd, 2009Yes there are some pretty good howtos out there that explain how to temporarily change the MAC address of your ethernet device on a Mac. I’ll just repeat what I learned since a friend of mine seems not to find the sites i did.
I did this on Mac OSX Leopard and Snow Leopard. I don’t know how whether it’s the same on Tiger or older versions – just get a newer Mac pal, you want it anyway!
So here’s how it works for a copper interface (wifi: see below):
- Open a terminal. Personally, I prefer iTerm – but any terminal is fine.
- Become super user. Since I don’t want to type sudo for every freakin’ command I do this by entering:
sudo su
Enter your user password. Enjoy the power you gained for a second and remember: You can really really damage your system configuration as root user, so watch out! - Check your network settings with:
ifconfig
Find your network adapter. On my Mac en0 is the copper wire nic and en1 is wifi.
You recognize your copper interface by checking whether it can do 100baseT or even 1000baseT (it’s written next to it). Yeah, that’s a lame description but it works since there is no wifi that does 1000baseT (yet). - Change the MAC address by entering something like
ifconfig en0 ether af:fe:af:fe:af:fe - Verify changes with
ifconfig | grep en0
So you want to change the MAC address of your wifi device. That’s a little bit more tricky. Here comes:
- Follow steps 1-3 of the above guide to gain godlike powers and identifiy your wifi interface
- Make sure your wifi device is running (Check wifi symbol in top right corner in Finder). It has to be running, you can’t change the mac of a device that is down.
- Disassociate the device from all networks. There is a tool to do so called airport. No worries, you already have that tool – you just didn’t know. It’s actually located here /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport. So that’s very unhandy – let’s change that.
ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport /usr/bin/airport - Change the MAC address by entering something like
ifconfig en1 ether af:fe:af:fe:af:fe - Verify with a look at the output of
ifconfig
Now you can just type the airport command from wherever you want. Nice huh? Well anyway. Disassociate all wifi networks now. Type
airport -z
or
airport --disassociate
So you’re all set. Get crackin’ … I never said you should – but it would be wise to change your MAC before doing so, since the MAC is a unique identifier to your device.
Use the comment function if something doesn’t work as you wished or if you just find me awesome and want to tell me exactly that.
One more thing: I used af:fe:af:fe:af:fe as MAC address. This is very unwise since it looks nothing like a MAC address. Most MAC addresses start with 00:01 or something like that. Just be creative but not fancy. Fancy gets you feds – and you don’t want ‘em.






