Picking a MAC address for a FreedomBox
An interface's MAC address is a unique number identifying the interface to any other devices it may communicate directly with. Ethernet-style MAC addresses are six-byte quantities; half of those bytes identify the manufacturer while the other half are meant to be a unique serial number. The MAC address for the Ethernet interface on the system where this article being typed is:
18:03:73:be:76:4a
This MAC address identifies the relevant system as having been manufactured by Dell. If Dell has done its job properly (and there is no evidence to the contrary), no other Ethernet interface on the planet should have that same MAC address.
FreedomBox developer Nick Daly recently started pondering the question of how a FreedomBox should set its MAC address. The hardware will come with an address provided by the manufacturer, of course, but that address can be changed by the kernel and there may well be good reasons for doing so. Many of those were outlined in this lengthy message from John Gilmore, which is well worth reading in its entirety; it forms the basis of this summary.
One obvious problem is that a static MAC address is a unique number identifying a particular system. Most interfaces never operate with anything but the vendor-supplied address; if a hostile party learns that address, they can quickly identify the system it belongs to. So, while a FreedomBox device might move around, a suitably informed observer will always know which device it is. That allows the correlation of activities over time and the monitoring of specific devices.
Current technologies make things worse. Quoting John:
In other words, a hostile entity might not have to drive around a city in an attempt to detect a device with a specific MAC address; instead, it is just a matter of asking Apple, which has a widespread surveillance network in place and can simply say where that device is to be found. Similar information is maintained by other parties — Google, for example.
John also pointed out that it is often trivial to determine which IP address is assigned to a device; it is often just a matter of sending a DNS query to the MAC address of interest. That can enable the identification of the location from which specific network activity has been generated.
Finally, there is the matter of that manufacturer identification number found in every MAC address. If FreedomBox becomes a widely used and effective system, certain authorities might develop a strong interest in knowing where DreamPlug systems are to be found. The identifying information found in the MAC address makes that identification a relatively simple task. Turning on a DreamPlug could be a way of painting a target on a specific location — not the sort of dream the owner may have been looking for.
The obvious conclusion is that FreedomBox systems should not normally run with the default MAC address provided by the vendor. They should, instead, generate a new address, and that address should be changed frequently. Fortunately, much of this is easy to do; any even remotely contemporary hardware will allow the host system to provide a new MAC address, and the data link layer (and above) protocols are pretty good about responding to MAC address changes. So there is no obvious technical barrier preventing frequent changing of a system's MAC address.
But there is still the question of what that address should be. Nick had suggested defaulting to 00:00:00:00:00:00 by default, a choice that would clearly prevent the identification of specific FreedomBoxes. But there are problems with that choice, starting with the fact that confusion would result as soon as two FreedomBoxes appeared on the same network. So something a little smarter is needed.
One obvious possibility is to simply generate a six-byte random number and use that. Care would have to be taken to avoid MAC address collisions on any given net, but that is not a particularly hard problem to solve. There are also the usual issues with having enough entropy available to generate a proper random number at boot time; without an adequate level of care, that random address might be far less random than people expect. Once again, that is a problem that should be amenable to a proper solution.
But, as John pointed out, there is another problem: real-world MAC addresses follow a specific pattern; a random address, being unlikely to fit that pattern, would probably stand out like a neon sign to anybody who is looking for it. To be convincing, a system-chosen MAC address cannot be completely random. It should have a recognized manufacturer number, preferably a manufacturer that actually makes contemporary wireless network interfaces. The serial number also needs to fit into a range that was actually shipped by that manufacturer. In other words, a random MAC address will only blend in if it makes the device look like some other random piece of real-world hardware.
These problems are all tractable, but the solution requires a great deal of
due care if it is not to expose its users to unwanted consequences.
Indeed, the whole system must be designed and implemented with that level
of care; that is part of why the FreedomBox has not come to fruition as
quickly as many would have liked. Privacy is a surprisingly difficult
problem, with many pitfalls for those who try for a quick solution.
| Index entries for this article | |
|---|---|
| Security | Home network |
| Security | Internet |
Posted Dec 6, 2012 6:16 UTC (Thu)
by smoogen (subscriber, #97)
[Link] (4 responses)
====
Is that meant to be true anymore? I know it used to be, but I have seen a lot of collisions from various vendors. Usually we were told that they only tried to keep the probability down to no MAC collisions in say a Class A network, but that they couldn't guarantee more than that.
====
I remember trying that on a couple of networks and that caused all kinds of issues with routers that used 00:00:00.. as a sort of 0.0.0.0 in broadcasts and such.
Posted Dec 6, 2012 6:35 UTC (Thu)
by jreiser (subscriber, #11027)
[Link] (2 responses)
Posted Dec 7, 2012 15:58 UTC (Fri)
by shane (subscriber, #3335)
[Link] (1 responses)
I checked here:
http://standards.ieee.org/develop/regauth/oui/oui.txt
The MAC address starts with d2:a1:42, which is not present.
Posted Dec 7, 2012 16:48 UTC (Fri)
by TomH (subscriber, #56149)
[Link]
Posted Dec 6, 2012 12:36 UTC (Thu)
by lkundrak (subscriber, #43452)
[Link]
Well, there surely are vendors that use addresses that they should not. According to [1], following ones are using locally administered address (& 0x020000). Also, note the "not registered" ones.
[1] http://www.cavebear.com/archive/cavebear/Ethernet/vendor.html
Posted Dec 6, 2012 6:35 UTC (Thu)
by dw (subscriber, #12017)
[Link] (3 responses)
Posted Dec 6, 2012 21:18 UTC (Thu)
by jimparis (guest, #38647)
[Link] (2 responses)
Posted Dec 8, 2012 15:36 UTC (Sat)
by felixfix (subscriber, #242)
[Link] (1 responses)
Posted Dec 8, 2012 15:41 UTC (Sat)
by felixfix (subscriber, #242)
[Link]
Posted Dec 6, 2012 8:27 UTC (Thu)
by oever (guest, #987)
[Link] (5 responses)
Posted Dec 6, 2012 12:30 UTC (Thu)
by njwhite (guest, #51848)
[Link] (2 responses)
One could also imagine such a database being a worthwhile target for skilled attackers.
But yes, John was talking about sending MAC addresses and getting locations back. Which would certainly be useful for tracking the movement of devices. Posted Dec 6, 2012 19:45 UTC (Thu)
by dlang (guest, #313)
[Link]
However, Apple devices tend to use the MAC address as a device identifier (it is after all a unique value for each device), and they make extensive use of that unique value in their apple proprietary infrastructure.
One of the 'hacks' that has happened 'recently' was someone noticed that accessing iDevice info on the ATT website used the MAC address in the URL, changing the MAC address provided gave you access to other people's information.
I don't know anyone other than Apple that does this same thing.
Posted Dec 9, 2012 16:08 UTC (Sun)
by bboissin (subscriber, #29506)
[Link]
Looking at the freedombox website, it's not even clear they can be used as a wireless access point.
Posted Dec 6, 2012 15:26 UTC (Thu)
by rahulsundaram (subscriber, #21946)
[Link] (6 responses)
http://www.alobbs.com/macchanger
It can do the job of emulating an address that looks it is coming from a particular vendor. I have a NM script in my Fedora box that changes MAC address every time I connect to my wireless network. It is rather trivial to do.
Posted Dec 8, 2012 6:31 UTC (Sat)
by mathstuf (subscriber, #69389)
[Link] (5 responses)
Posted Dec 8, 2012 17:24 UTC (Sat)
by rahulsundaram (subscriber, #21946)
[Link] (4 responses)
--
#! /bin/bash
/bin/macchanger -r wlan0 2>&1 > /dev/null
--
That's all it takes.
Posted Jan 21, 2013 16:52 UTC (Mon)
by mcortese (guest, #52099)
[Link] (3 responses)
Posted Jan 21, 2013 19:00 UTC (Mon)
by rahulsundaram (subscriber, #21946)
[Link]
Posted Jan 22, 2013 0:32 UTC (Tue)
by dlang (guest, #313)
[Link] (1 responses)
Posted Jan 22, 2013 1:04 UTC (Tue)
by ABCD (subscriber, #53650)
[Link]
No it isn't. To see the difference, compare the following:
Posted Dec 6, 2012 15:43 UTC (Thu)
by raven667 (subscriber, #5198)
[Link] (2 responses)
Posted Dec 6, 2012 20:43 UTC (Thu)
by Fats (guest, #14882)
[Link] (1 responses)
Posted Dec 6, 2012 21:44 UTC (Thu)
by raven667 (subscriber, #5198)
[Link]
Another poster pointed out that there is a large range set aside for locally generated addresses which is widely used that the FreedomBox could safely use without giving itself away.
Posted Dec 6, 2012 16:15 UTC (Thu)
by brouhaha (subscriber, #1698)
[Link] (1 responses)
By using a locally administered MAC address you avoid both having everyone that sees the MAC address able to determine what entity assigned the address, and the possibility of collision with any other device on your network that uses a "normal" MAC address (globally unique). You still have the possibility of collision with a locally administered MAC address on your local network.
There also seems to be a lot of confusion in general (but not in this article) about how MAC addresses are used. When you use your web browser to get a web page from a server off in the internet somewhere, that server generally does not get your MAC address, but only your IP address. The MAC address is only used on your Local Area Network (LAN), which is Ethernet or Wifi. However, as stated in the article, other devices on your same LAN, including iPhones and such using Wifi, do get to see your MAC address.
Posted Dec 6, 2012 18:46 UTC (Thu)
by BenHutchings (subscriber, #37955)
[Link]
Posted Dec 6, 2012 18:17 UTC (Thu)
by marcH (subscriber, #57642)
[Link] (2 responses)
I don't understand why a random (and obviously changing) MAC address should look not random. Could someone summarize the problem here?
Posted Dec 6, 2012 18:42 UTC (Thu)
by BenHutchings (subscriber, #37955)
[Link] (1 responses)
However, randomised MAC addresses are normally flagged as 'locally-assigned', per the IEEE 802 standard, which could become an indicator of 'something to hide' if most devices use fixed globally-assigned addresses. (I don't know how true that is; quite a few Linux network device drivers support boards without NVRAM fitted, for which they generate a random address at boot.) Even if you decide to violate the standard and 'steal' a globally-assigned address, you'd then want to be sure to pick an OUI (22-bit manufacturer ID) that has actually been assigned.
Posted Dec 6, 2012 23:53 UTC (Thu)
by marcH (subscriber, #57642)
[Link]
In the context of these articles (randomizing a MAC address) the address should obviously not be randomized just once but be changed on a regular basis, otherwise it could be followed just like a factory address can.
This is just the main point of the article.
> it's the only thing identifying your hardware so without some sophisticated fingerprinting at a higher level there is nothing to tie the old and new addresses together as being a single device.
... so changing it on regular basis works. Violent agreement?!
> However, randomised MAC addresses are normally flagged as 'locally-assigned', per the IEEE 802 standard, which could become an indicator of 'something to hide'
This does not really seem to match what Jon wrote above, but it is clearer and does answer my question; thanks.
Posted Dec 6, 2012 22:25 UTC (Thu)
by hpa (guest, #48575)
[Link]
If you care about stealth you probably need to reassign the MAC with some regularity.
Posted Dec 7, 2012 0:48 UTC (Fri)
by docwhat (guest, #40373)
[Link] (1 responses)
If the goal is to blend in, then why not:
This should cause it to blend in better.
Alternatively, get a list of vendor codes to emulate (based on region or something similar), and randomize based on those vendor codes.
I suppose in some places, owning a DELL Laptop would spell as much trouble as owning a FreedomBox; so picking a good list of vendor codes would be needed.
Posted Dec 16, 2012 15:24 UTC (Sun)
by ekj (guest, #1524)
[Link]
This should make you blend in nicely with whatever other devices are on the network-segment you connect to.
Posted Dec 7, 2012 14:09 UTC (Fri)
by NRArnot (subscriber, #3033)
[Link] (1 responses)
I once saw the consequence of two PCs on the same LAN with the same MAC address. (How? Some foul-up by the NIC manufacturer. I suspect a whole batch of boards out there with that same MAC; we'd bought two of them).
It wasn't pretty. Looked somewhat like an intermittent NIC failure or cabling fault. One went down whenever the other came up ...
Anyway, it occurs to me that causing a MAC collision in some environments might be regarded as an actively hostile act ... espionage, or even sabotage. Even if not, it will most certainly attract attention if one's random address just happens to be the same address that some local system will try to use in a few minutes time.
Is there a way to detect this and back off as soon as it happens, before the other system's owner gets annoyed?
Posted Dec 7, 2012 14:49 UTC (Fri)
by etienne (guest, #25256)
[Link]
You send a RARP, reverse ARP request, asking for who has this ARP to reply with its own IP, if no response nobody has such a MAC.
Posted Dec 14, 2012 14:24 UTC (Fri)
by Felix_the_Mac (guest, #32242)
[Link]
A random (or semi-random) MAC address would not be a give away if enough other devices used the same scheme.
Therefore:
1. submit patch to Linux kernel for random MAC address assignment.
Problem solved!
Picking a MAC address for a FreedomBox
This MAC address identifies the relevant system as having been manufactured by Dell. If Dell has done its job properly (and there is no evidence to the contrary), no other Ethernet interface on the planet should have that same MAC address.
00:00:00:00:00:00
I have seen a lot of collisions from various vendors.
Data, please. I have seen duplicates, too, but they were twenty years ago in the early 1990s, and they were from deliberate reproduction by cloners who were producing counterfeit boxes.
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
020406 BBN internal usage (not registered)
020701 Interlan [now Racal-InterLAN] DEC (UNIBUS or QBUS), Apollo, Cisco
020701 Racal-Datacom
026060 3Com
026086 Satelcom MegaPac (UK)
02608C 3Com IBM PC; Imagen; Valid; Cisco; Macintosh
02A0C9 Intel
02AA3C Olivetti
02CF1F CMC Masscomp; Silicon Graphics; Prime EXL
02E03B Prominet Corporation Gigabit Ethernet Switch
02E6D3 BTI (Bus-Tech, Inc.) IBM Mainframes
2E2E2E LAA (Locally Administered Address) for Meditech Systems
475443 GTC (Not registered!) (This number is a multicast!)
525400 Realtek (UpTech? also reported)
52544C Novell 2000
5254AB REALTEK (a Realtek 8029 based PCI Card)
565857 Aculab plc audio bridges
AA0000 DEC obsolete
AA0001 DEC obsolete
AA0002 DEC obsolete
AA0003 DEC Global physical address for some DEC machines
AA0004 DEC Local logical address for DECNET systems
E20C0F Kingston Technologies
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
s/sending a DNS query to the MAC address/sending an ARP request to the MAC address/
Actually, while this LWN sentence was confusingly brief, the original post *was* talking about DNS queries. ARP on the LAN will just get you the LAN IP address. John's original post was suggesting:
Now you've correlated victim's public IP address with location.
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
The redirection looks weird: stdout goes to null, while stderr goes to stdout! ;-)
/bin/macchanger -r wlan0 2>&1 > /dev/null
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
command 2>&1 >/dev/null first copies fd 1 to fd 2 (thus sending stderr to where stdout is currently going), then sets fd 1 (stdout) to /dev/null. The standard "show me nothing" line is command >/dev/null 2>&1, which sets fd 1 to /dev/null, then copies fd 1 to fd 2.
$ to_stderr() { echo "$@" >&2; }
$ to_stderr test 2>&1 >/dev/null
test
$ to_stderr test >/dev/null 2>&1
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
You'd be able to tell that the device _was_ a FreedomBox but you wouldn't be able to track _which_ one it was.
I think the FreedomBox people want to avoid exactly that. Giving away the FreedomBox identity is in certain places enough to draw attention.
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
Picking a MAC address for a FreedomBox
You can also change your MAC by sending an unsolicited gratuitous ARP with your IP address and your new MAC, without breaking TCP or UDP connections.
Unfortunately these systems fails if one of the PC on the subnet is not listening, in a deep sleep mode or temporarily disconnected from the wire (a HUB maintains LINK-UP to the PC but the upstream HUB link goes down).
Then, next time the PC wakes up and try to continue using the old MAC address to continue a TCP connection, it will talk to an unrelated PC and receive a RST packet, without checking that this MAC address is still valid for the TCP IP address.
Picking a MAC address for a FreedomBox
2. Get feature turned on by default.
3. Get Google to use feature in Android - millions of phones with random MAC addresses
