Skip to content

Commit 04209f2

Browse files
committed
in network tab, detect and display "Private MAC" addresses/labels
RFC7042 section 2.1 defines the “Local bit”: when the bit is set (first octet bit 1, value 0x02), the identifier is not a globally assigned EUI-48 address but a locally administered one. Modern mobile operating systems, including iOS and Android, use locally-administered (randomized) MACs as part of their anti-tracking mechanisms. Labeling these addresses helps administrators understand which clients are using private/randomized identifiers and avoid misinterpreting them as hardware-assigned vendor MACs. Signed-off-by: Robin Getz <rgetz503@gmail.com>
1 parent 62c55dc commit 04209f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/js/network.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ $(() => {
183183
$("td:eq(1)", row).html(
184184
utils.escapeHtml(data.hwaddr) + "<br>" + utils.escapeHtml(data.macVendor)
185185
);
186+
} else if (data.hwaddr && data.hwaddr.includes(":")) {
187+
const firstOctet = Number.parseInt(data.hwaddr.split(":")[0], 16);
188+
// Check whether the 2 (0x02) bit is set using arithmetic to avoid bitwise operators:
189+
if (Math.floor(firstOctet / 2) % 2 === 1) {
190+
$("td:eq(1)", row).html(utils.escapeHtml(data.hwaddr) + "<br>Private MAC");
191+
}
186192
}
187193

188194
// Make mock MAC addresses italics and add title

0 commit comments

Comments
 (0)