oneiroi
01/30/2025, 2:22 PMinterface_details in Sequoia or later; returns the randomized HWAddress and not the actual hardware HWAddress; is anyone aware of an alternative method for gaining the underlying hardware address for macOS deployments (thanks! and I'll updating in comment thread if I find this whilst researching myself).oneiroi
01/30/2025, 2:39 PM/usr/sbin/networksetup -getmacaddress Wi-Fi
Ethernet Address: 5c:<redacted> (Hardware Port: Wi-Fi)
osquery> SELECT * FROM interface_details where mac like '5c%';
osquery>
osquery> .mode lines
osquery> SELECT mac FROM interface_details where interface = 'en0';
mac = 02:<redacted>
As can be seen the returned interface_details is the randomized address, and not the underlying hardware_address 🤔oneiroi
01/31/2025, 1:24 PMSELECT
key,
subkey,
UPPER(
SUBSTR(hex(from_base64(value)), 1, 2) || ':' ||
SUBSTR(hex(from_base64(value)), 3, 2) || ':' ||
SUBSTR(hex(from_base64(value)), 5, 2) || ':' ||
SUBSTR(hex(from_base64(value)), 7, 2) || ':' ||
SUBSTR(hex(from_base64(value)), 9, 2) || ':' ||
SUBSTR(hex(from_base64(value)), 11, 2)
) AS mac_address
FROM plist
WHERE path = '/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist'
AND subkey = 'IOMACAddress';
Produces an output with the mac addresses of all interfaces within the plist file, no elevated permissions required.