随机化Mac地址蓝牙LE广播 [英] Randomize Mac Address Bluetooth LE Broadcast

查看:468
本文介绍了随机化Mac地址蓝牙LE广播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,今天的一些android手机可以充当BLE信标(此功能通常在大多数设备中都被禁用).当android设备充当信标并且可被发现时,它的MAC地址是随机的吗?当设备可发现时,我们可以以任何方式不显示实际的MAC ID吗?

As far as I know some android phones today can act as BLE beacon (this feature is usually disabled in most devices ) . When an android device is acting as a beacon and is discoverable , is it's MAC address randomised ? Can we in any way not show the actual MAC id when the device is discoverable ?

推荐答案

大多数具有5.0+版本的较新的Android设备均支持Bluetooth LE外围设备模式,这意味着它们可以作为信标进行传输.该功能存在于Android 5.0+中,但是一些制造商选择禁用某些型号(特别是旧型号)的支持.您可以在此处查看已知支持和不支持此功能的设备列表:

Most newer Android devices with 5.0+ have support for Bluetooth LE peripheral mode, meaning they can transmit as beacons. The feature is present in Android 5.0+, but some manufacturers have chosen to disable support on certain models, especially older models. You can see a list of devices known to support and not support this feature here: http://altbeacon.github.io/android-beacon-library/beacon-transmitter-devices.html

启用此功能后,MAC地址在传输过程中不会被随机分配,并且传输中包含设备的实际蓝牙MAC地址,从而使接收设备可以读取此MAC地址.

后来的测试向我证明了以上说法是不正确的.每次重启变送器后,MAC地址都会被随机化.您可以在此处看到证明.

Subsequent testing has proven to me that the above statement is incorrect. The MAC address is randomized each time the transmitter is restarted. You can see a proof of this here.

Android中没有机制可以对此进行更改.

There is no mechanism in Android to change this.

在Android上扫描时,将返回传输中的实际MAC地址.为了证明这一点,我在装有iOS 8.3的iPod Touch第5代上使用Locate应用程序启动了iOS信标发射器,并同时在Linux设备和带有Android 6.0的Nexus 5X上扫描了该设备:

When scanning on Android, the actual MAC address from the transmission is returned. To prove this, I started an iOS beacon transmitter using the Locate app on an iPod Touch 5th Generation with iOS 8.3, and simultaneously scanned for the device on both a Linux device as well as a Nexus 5X with Android 6.0:

具有Android 6.0的Nexus 5X上的Android查找信标应用程序: MAC地址:60:35:48:79:D8:08

Android Locate Beacon App on Nexus 5X with Android 6.0: MAC address: 60:35:48:79:D8:08

Linux Bluez sudo hcitool lescan: MAC地址:60:35:4B:79:D8:0B

Linux Bluez sudo hcitool lescan: MAC address: 60:35:4B:79:D8:0B

如您所见,两个设备都读取相同的MAC地址,证明在Android或Linux上扫描时都不会欺骗它.

As you can see, both devices read the same MAC address, proving that it is not spoofed on scan in either Android or Linux.

还有两个注意事项:

  • 在设置->常规->蓝牙报告2C:FF:EE:xx:xx:xx(最后三个八位字节为空白)中,带有iOS 8.3的iPod Touch报告的蓝牙MAC地址与发送的地址不同.这表明iOS在传输时会随机分配MAC地址.

  • The Bluetooth MAC address reported by the iPod Touch with iOS 8.3 in Settings -> General -> Bluetooth reports 2C:FF:EE:xx:xx:xx (last three octets blanked out) differs from the address transmitted. This suggests that iOS randomizes the MAC address when transmitting.

当您停止并重新启动iOS设备上的广告时,Linux和Android检测到的Bluetooth MAC地址不会更改,这表明iOS在重新启动期间保留了相同的随机地址.重新启动iOS设备并重新开始传输后,Linux和Android都检测到另一个MAC地址:46:59:C9:CB:0C:D5.这表明随机传输的MAC是iOS重启时发生的变化.

The Bluetooth MAC address detected by Linux and Android does not change when you stop and restart advertising on the iOS device, suggesting iOS retains the same randomized address across restarts. After rebooting the iOS device and restarting transmission, both Linux and Android detected a different MAC address: 46:59:C9:CB:0C:D5. This suggests that the randomized transmitted MAC is changes across restarts on iOS.

这篇关于随机化Mac地址蓝牙LE广播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆