MAC Address Spoofing on Mac OS X for unlimited free hour passes on xfinitywifi and CableWiFi networks

Alec Jacobson

July 08, 2016

weblog/

From what I gather, xfinity charges people to "rent" wifi routers and then uses that hardware to host pay-per-use public wifi networks. These networks are usually named xfinitywifi or CableWiFi. Every 24 hours each MAC Address is granted a "$0.00 Complimentary Free Pass":

  1. CLICK I am not an XFINITY customer
  2. CLICK Sign Up
  3. CHOOSE $0.00 for a Complimentary Hour Pass
  4. CLICK Start Session

To "spoof" a new wifi MAC Address on MAC OS X, one can issue:

ifconfig en0 | grep ether

This will spit out a number like: 70:51:81:c1:3f:6e. Record this number. To set your MAC address to a random yet valid address use:

sudo ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`

Then, later, if you want to return to your old address issue:

ifconfig en0 ether 70:51:81:c1:3f:6e

It seems that System Preferences > Network > Advanced > Hardware will reveal your original MAC address in case you forget it.

You can also place these commands as aliases in your ~/.profile:

alias random_mac="ifconfig en0 ether \`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'\`"
alias reset_mac="ifconfig en0 ether 70:56:81:c0:3f:6d"
alias sudo='sudo '

This all assumes en0 is your wifi location. It might be en1 on other macs.