Getting MORE! Free Airport / Hotel Free Wi-Fi

KB ID 0001278 

Problem

I was at the Airport the other day, and was pleased to find they had free Wi-Fi. So I opened my Email and started doing some work. The problem was, it was only free for 45 minutes and, (as is usually the case) I was going to be in the airport for a couple of hours.

Free Airport and Hotel WiFi

Not only that, you are expected to sign up for airport related spam and marketing materials?

Sign up for Spam

So 45 minutes later, I was dumped off the WiFi, and was asked to pay? With a sigh I fired up VLC and watched a film, (productivity over). Though I did notice there was a reference to my ‘device ID’ on the captive portal page that was asking for money, (not shown on diagram).

More Free WiFi

How was the system maintaining my ‘device ID’ to stop me simply reconnecting and getting more free WiFi? This turned out to be a moot point, because my flight was cancelled, but on the drive home I resolved to work out how it was done, and see if it could be bypassed.

Solution

Well when I returned to the Airport the next day it let me have more time so either it was keeping a hash of my laptop name and MAC address, (this would seem to be the most secure method,) or was it simply caching my MAC address? If it was the latter then that’s painfully easy to defeat (On a Windows Laptop you can change your MAC address on the advanced properties of your network card, or with a registry key). With my MackBook, (which is essentially Linux in a pretty dress. I just need to drop to command line.

Spoofing / Changing macOSX MAC address

Open a terminal session and generate a RANDOM MAC address with the following command.

openssl rand -hex 6 | sed ‘s/\(..\)/\1:/g; s/./0/2; s/.$//’

Take a copy of the MAC address it gives you;

Generate a Random MAC Address

Now, for you own piece of mind, take a look at your actual current MAC address, (so you know when it’s changed).

ifconfig en0 | grep ether

Note: On some macOSX machines your wireless network card may be en1.

macOSX show MAC address

The next bit tripped me up for  a while, you CAN’T change your MAC address while its associated with a wireless network. So you need to disassociate, change the MAC address then rescan the interface. Execute each of these three commands one at time, after the first one, you will need to enter your password.

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
{ENTER PASSWORD}
sudo ifconfig en0 ether f0:99:80:a1:b4:d6
networksetup -detectnewhardware

To prove its changed simply run, the following command again;

ifconfig en0 | grep ether

Connect back to the wireless and enjoy.

Related Articles, References, Credits, or External Links

NA

Author: PeteLong

Share This Post On

2 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *