Changing your MAC address can give you many security advantages when hacking wireless networks or connecting to public services. Not only can it help to “untrace” you to your laptop but it can also serve in getting past some hotel and public wifi networks allowing consistent free access to their network.
Last summer i stayed in a hotel just outside of London City (Premier Inn). I noticed when i connected to their wireless network that they offered complimentary WiFi for 30 minutes (after which it was £7 for 24 hour access). After doing a bit of snooping around I found that their router used mac address logging to time the user on the network. With this in mind i fired up Terminal on my Macbook and I spoofed my MAC address and to my joy it reconnected me as a new user giving me all the free internet i could have ever wanted.
So what is a MAC address? A MAC address (Media Access Control address) is a unique 12 character string that is used to identify any device that connects to a network or has networking properties. From modems to routers, wifi cards, ethernet ports and even bluetooth devices all these devices have a unique MAC address used to identify and communicate information.
Below i’ve included short tutorials to change your MAC address in the 2 major operating systems i work with and links to change it within Windows. The newly assigned address will default back to the original address upon a full system reboot.
Mac OSX Lion 10.7
Open up Terminal in Mac OSX and type the command below with “|” being the “pipe” symbol:
ifconfig en1 | grep ether
ifconfig en1 | grep “ether”
It is important to understand what we are typing because we will be using similar commands in future articles to query other information and print it to the screen. (print meaning show)
- “ifconfig” is a unix command line utility used to query your TCP/IP network interfaces such as ethernet ports or wireless network cards.
- “en1″ is your interface ID (this name can change pending on your interface chipset and amount of interfaces you have running, both virtual and real and the type of interfaces they are) Do a quick google search to find out how to view all your existing interface ID’s if your not sure what your networks ID is. In Mac OSX & Linux Backtrack you can query your devices by using the command “ifconfig -a”
- “| grep ether” is to pipe the data you are querying from the interface ID via the “ifconfig” utility and print it to the screen so that we can see the data visually.
sudo ifconfig en1 ether aa:bb:cc:dd:ee:ff
Please note the “sudo” command will require you to enter your root password.
If all goes well that that’s it, your MAC address should be changed. Before we make any attempts at hacking our annoying neighbors network let’s do another MAC address query as we done above to verify the change has happened.
In Terminal type the following:
ifconfig en1 | grep ether
ifconfig en1 | grep “ether”
Grep should now print the following to your screen:
You can also check your MAC address on some routers. Using Eircom’s ZyXEL P-660HW-T1 v3 modem/router we can check the MAC address by heading over to http://192.168.1.254 and entering our network password (default is broadband1) then heading to Network/LAN/Client List and viewing our MAC address and local DNS IP.
Im one of those people who claims Mac and Linux are both far more better then Windows. Don’t get me wrong, i still use Windows for writing some .exe’s, playing some games and doing other things but when it comes to network cracking, exploiting and general hacking I tend to stay far away from Windows. If your finding Windows to be very challenging then i suggest you try out some Linux operating systems or switch to the Mac OS. You can try out Linux via Live CD’s or run it virtually within Windows through an application called “Virtual Box” (google it for more info). I liked Windows 98 & XP even though they were seriously sluggish and full of spyware and malware however i moved to Mac when i seen the appalling operating system that Microsoft made called “Vista”. Now i know Windows 7 is a milestone improvement and i have played around with it but i strongly feel that any company who pushes out a shit OS like vista doesn’t deserve much of my time.
Anyway that’s my rant over. Below are some links to help you change your Windows MAC address in Windows.
First lets query the interface to see the existing MAC address. Open up a new shell and type in the command below:
You will now see a list of network interfaces, chipset details and their mac addresses. Pick the ID which corresponds to your network card you want to spoof the MAC address on. In this example we will be using “eth1″
First we need to bring our interface down. To do this we type the following command into the shell:
ifconfig eth1 down
To change your MAC address type the following command into the shell window swapping out 11:22:33:44:55:66 for the MAC address you want to use:
macchanger –mac 11:22:33:44:55:66
Now we need to bring our interface back up. To do this we type the following command into the shell:
ifconfig eth1 up
To verify our newly assigned MAC address we can query the interface again using:
We can also verify our new MAC address via our router if it supports it. Details on how to do this can be found in the end of the Mac OSX instructions.
If you’ve pushed through this little tutorial then pat yourself on the back. You’ve learned some basic Unix commands, You’ve learned how those commands work and you’ve learned about MAC addresses. Like i said at the start of this article its important to know how to change your MAC address if you want to spoof routers into thinking your somebody else. When I’m doing some wireless hacking i tend to change my MAC address to something very close to the router/modem’s MAC address. If the network administrator was to see this they might mistake it for an error or a dummy loop and not cause suspicion on the network.
In the following weeks i will be posting articles about cracking WEP, WPA & WPA2 using cheap hardware in both Mac OSX and Backtrack. If you plan to follow my blog and practice some of the articles i’ve posted about then i suggest that maybe you partition your hard drive with about 10gb’s and run Linux Backtrack locally or if you have a nice powerful machine run a virtual version of the operating system.
If you have any comments, tips or ideas on new articles i would love to hear from you so use the comment section below each article to express yourself.