Live data from Hacker News

Randomize your WiFi MAC address on Ubuntu

paulfurley.com

71–80 of 108 posts

Re: Randomize your WiFi MAC address on Ubuntu

#71
post #57

It’s worth noting that iOS has randomized MAC addresses in WiFi probes since iOS 8.[1] As far as I know your real MAC address is exposed upon connection. I’m curious to what extent other vendors have implemented this strategy. [1] https://arstechnica.com/gadgets/2014/06/ios8-to-stymie-track...

That doesn't address the issue of you being tracked by mac when logginh into a hotel, as you said the real mac is used when connecting.

This only addresses tracking when your phone is in the pocket and sending probe requests to scan for AP's.

Re: Randomize your WiFi MAC address on Ubuntu

#72
post #52

Where would MAC address capture occur on the network? MACs are local to L2 traffic, so once a frame turns into a packet and is routed, the sMAC of your PC is no longer present in the data. If you're on your home network, this has no impact what so ever.

Actually, this is no longer true. An autoconfigured IPv6 address can leak your MAC address, depending on your settings, as one mechanism for autoconfiguration embeds your MAC address right into your IPv6 address.

Re: Randomize your WiFi MAC address on Ubuntu

#74
post #44

Be aware that this technique could be illegal or appear suspicious in some jurisdictions. MAC address randomization was mentioned in Aaron Swartz's indictment for wire fraud. See page 7: https://www.wired.com/images_blogs/threatlevel/2012/09/swart...

Can you show me where changing your MAC address is illegal?

The law cares about intent.

Changing your Mac address, or wearing a fake beard, are both fine.

Changing your Mac address to trick a Wi-Fi hotspot which gives out one hour free per device per day, or using a fake beard to trick a shop keeper into letting you get "one free bagel per person" twice, is a crime.

Re: Randomize your WiFi MAC address on Ubuntu

#75
post #30

NSA MAC address prefix is 00:20:91, you can combine this knowledge with the one from the article to scare your sysadmins.

There's probably a lot more fun ones. Complete list at http://standards-oui.ieee.org/oui.txt. 3.6Mb.

    $ grep 00-20-91 oui.txt 
    00-20-91   (hex)		J125, NATIONAL SECURITY AGENCY
    $ egrep -ic 'army|force|navy|secur|secret|private' oui.txt 
    461

Re: Randomize your WiFi MAC address on Ubuntu

#76
post #57

It’s worth noting that iOS has randomized MAC addresses in WiFi probes since iOS 8.[1] As far as I know your real MAC address is exposed upon connection. I’m curious to what extent other vendors have implemented this strategy. [1] https://arstechnica.com/gadgets/2014/06/ios8-to-stymie-track...

So... this post is about Ubuntu, but if we're going down that road: https://medium.com/@philipn/want-to-see-something-crazy-open...

Re: Randomize your WiFi MAC address on Ubuntu

#77

In OpenBSD, it's just: # ifconfig iwn0 lladdr random Of course, iwn0 is your interface.

There's probably a one-liner in Linux too, but not one which satisfies the three caveats in the post.

The necessary infrastructure exists in wpa_supplicant, but only in a newer version than is distributed with Ubuntu 16.04. OpenBSD is more integrated, so advanced functionality like this tends to be easily accessed through ifconfig.

Re: Randomize your WiFi MAC address on Ubuntu

#78

Earlier quoted context omitted.

Yes and even if you changed your Mac every day, your neighbors probably wouldn’t. So google can still see the three routers around you, look up the gps those routers have been seen concurrently with, and know where you are.

Not sure if I'm missing the point here... if I were using Google Location services, wouldn't that mean I was giving Google my location directly? Why would they need to use my MAC address?

Theoretically you don't need to be using Google location services. You just need a phone with a google app that has permissions to discover nearby wifi hotspots.

Re: Randomize your WiFi MAC address on Ubuntu

#79
post #2

This seems like it should be a default indeed. It does make it harder to assign fixed addresses to your devices in your home network. At least openwrt only seems to have static DHCP leases based on MAC and not on the advertised DHCP name. For most devices this doesn't matter as it does add a DNS entry with whatever IP it assigned. But when you then want to add a firewall rule to port forward something to a device a f…

What makes it easier is having fixed goals in mind, because I am seeing a lot of people in this thread arguing because they're all solving different problems which is obviously going to mean different solutions . If your only concern is passive tracking, then a randomized MAC being used for SSID probes (because whitelist-only hidden SSIDs are rare enough that those people can manually connect) will be sufficient. If…

Your different problems with different solutions have at least a part that everyone agrees on like iOS doing it for probes. We can definitely argue what the right default is but will probably agree that no randomization at all is not a good one and move to at least some. Ubuntu currently does none.

Re: Randomize your WiFi MAC address on Ubuntu

#80
Btw. if you want to use a random mac address just for one specific network you can simply add the following to the [wifi] section of the config file for that network (/etc/NetworkManager/system-connections/):

  cloned-mac-address=random
That way every time you connect to that network you will have a new, valid mac address.
Post reply on HN