Wednesday, May 27, 2015
Tuesday, May 12, 2015
Changing MAC Address on Windows
In testing wireless across a conference center, I do a few different things.
- Scanning tools like Vistumbler (laptop) and Wifi Analyzer (Android phone) to discover access points
- Throughput testing with Speedtest
- Connecting the wireless card on the laptop to the network to force splash screen authentication
The last part is challenging as after the first connection, repeated disconnects and reconnects will provide the same IP address through DHCP and bypass the splash screen. This is because most systems cache MAC addresses so repeated authentication isn't required for the duration of the lease.
Changing MAC addresses will present as a new device and thus a new IP address is issued and authentication via the splash screen is required. But how to easily change a MAC address in Windows?
Thankfully, it can be done. Unfortunately, it's a bit of obsured registry hacking that does it.
Enter MACChanger.bat. This Windows batch file uses 'reg', 'wmic' and 'netsh' to query the registry and set the appropriate keys to change the MAC address of the specified adapter. It's pretty easy, but does require Administrator privileges.
If you set the wireless network to automatically connect, then a simple:
C:\> macchanger.bat "Wireless Network Connection" -r
Changes the MAC address to a random value and reconnects to the network.
MACChanger.bat can be found on my Software page.