Wednesday, January 25, 2012

Spoof Your MAC Address in Snow Leopard and Lion OS X 10.6 / 10.7

MAC address, sometimes also refereed to as "physical address" is a unique identifier assigned to every network device. Contrarily to the IP address, which can change dynamically, a MAC address is a bit like a serial number intended todifferentiate every network device on the planet. Here's what it looks like : 01:23:45:67:89:ab.

Changing or "spoofing" your MAC address can be desired for multiple reasons and is quite simple to do in Snow Leopard.

In this tutorial, we'll assume you want to change your wireless adapter's physical address.

To find out what is your AirPort card's current MAC address, type this in the Terminal.

ifconfig en1 | grep ether

This means to disconnect all current wireless network connections while leaving AirPort enabled.

Open the Terminal and paste this command :

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

You will be asked for your password to execute this command.

The airport command is part or Apple's Apple80211 framework. Essentially, it's what connects you to Wifi networks. The -z option disassociates from any network.

Tip: You can set up a simpler access to the airport command by creating a symbolic link. To do this, paste the following command in the Terminal:

sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport

Next time, you will simply need to type ariport -z to disassociate. You may also use airport -I to get information on your current connection.Once disassociated from the wireless network. You can change the MAC address with:

sudo ifconfig en1 ether 00:00:00:00:00:00

You can of course enter what ever you want as long as it is in the correct format. You can verify with ifconfig en1 | grep ether that your address is changed.

To revert your MAC address back to its default, simply reboot your machine.


No comments: