Spoofing MAC address of an Apple TV to bypass a WiFi captive portal
Have you ever been stuck trying to log in to your WiFi network on a smart device like your Apple TV, etc. but couldn’t get past the “Log in to YourISP.com” page? Or worse, your device doesn’t have a web browser at all and just stays permanently half-way connected?
That’s called a “Captive Portal” and it’s fairly common to see when you’re connecting to shared internet services like those that are setup for apartment buildings. Freedom Internet is notorious for this in Australia. Occasionally you’re stuck with just that one service provider, or it’s more expensive to switch to a competitor.
So how do you connect up your new Apple TV to the WiFi if you can’t use the built in web browser to log in to the network? How about you log in from your laptop and make the router think it’s the Apple TV? That’s what we’re gonna do!
1. Getting your Apple TV’s MAC address
First of all, you need to get the “Wi-Fi MAC address” of the Apple TV. This is your Apple TV’s fingerprint and is what the router uses to figure out who is connecting. More specifically, this is the fingerprint that’s used to determine if a “device” has already logged in and doesn’t need to do so again. You can find this MAC address on the Network settings page. It looks something like this:
2. Getting your laptop’s MAC address
Now that you have your Apple TV MAC address it’s time to figure out your laptop’s MAC address. On an Apple laptop like a MacBook Pro this can be found under the Wi-Fi settings as well. The format should look similar to the Apple TV MAC address but the numbers and letters will be different. Make sure you have both the Apple TV MAC address and your laptop’s MAC address before continuing.
For a comprehensive guide on the next few steps (if you’re running MacOS) you might want to check out this article which has a few more pictures: https://www.alphr.com/change-mac-address-in-macos/
3. Going offline
Now that you have both MAC addresses noted down it’s time to:
- Disconnect your Apple TV from the Wi-Fi (or just turn it off)
- Disconnect your laptop from the Wi-Fi
4. The old switcheroo
Now we’re going to set your laptop’s MAC address to the Apple TV’s. To do so, you can run the following in the Terminal app (or whatever terminal you like if you’re fancy like that):
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx
where
xx:xx…
is the Apple TV’s MAC address. You’ll need to type in your administrator password to make this system level change.
5. Infiltrating the system
Now that this is done, you can reconnect to the Wi-Fi network from your laptop (make sure to leave your Apple TV off) and you should be presented with the Captive Portal. You can now log in as if you were the Apple TV and once you’ve done that successfully and can connect to the internet you can close the browser.
6. Coming back online
In order to make sure the router doesn’t find out about our nefarious business let’s disconnect the laptop from the router now that we’ve logged the “Apple TV” 😉 into the network. And then let’s switch the MAC address back to the real one which we should have noted down in Step 2. Same command as before but now we’re using the laptop MAC address so:
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx
where
xx:xx…
is the laptop MAC address.
7. Business as usual
Booting your Apple TV and connecting to the Wi-Fi should now allow it to skip the Captive Portal and you can get back to watching your favorite Netflix shows instead of being stuck in the stone age with no internet.