RCayre / mirage

Mirage is a powerful and modular framework dedicated to the security analysis of wireless communications.

Home Page:https://homepages.laas.fr/rcayre/mirage-documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to connect to devices which are using random addressing

whoot opened this issue · comments

If the device is using random addressing, it is not possible for mirage to connect to the device:

mirage ble_connect TARGET=AA:BB:CC:DD:EE:FF CONNECTION_TYPE=random

[INFO] Module ble_connect loaded !
[SUCCESS] BTLEJack device #0 successfully instantiated (firmware version : 3.14)
[INFO] Custom Mirage Firmware used ! Advertisements sniffing and jamming will be supported.
[FAIL] Interface provided (microbit0) is not able to initiate connection.
[FAIL] Execution of module ble_connect failed !
[INFO] Mirage process terminated !

However, using hcitool and gatttool works flawless:

hcitool -i hci0 lecc --random AA:BB:CC:DD:EE:FF

Connection handle 70
gatttool -I -b AA:BB:CC:DD:EE:FF -i hci0 -t random

[AA:BB:CC:DD:EE:FF][LE]> connect
Attempting to connect to AA:BB:CC:DD:EE:FF
Connection successful
[AA:BB:CC:DD:EE:FF][LE]> 

Hello,
Your problem is not linked to the random addressing: you are trying to use a microbit device which is not able to initiate a ble connection as a master. You should use an HCI device instead.
That's also the reason why it's not relevant to provide a global option in the configuration file: some modules cannot be used with all the supported devices.

Nope, this doesnt work either:

mirage ble_connect TARGET=AA:BB:CC:DD:EE:FF CONNECTION_TYPE=random INTERFACE=hci0

[INFO] Module ble_connect loaded !
[SUCCESS] HCI Device (hci0) successfully instanciated !
[INFO] Trying to connect to : AA:BB:CC:DD:EE:FF (type : random)
[FAIL] Error during connection establishment !
[FAIL] Execution of module ble_connect failed !
[INFO] Mirage process terminated !

Have you tried to increase the TIMEOUT parameter ?

Worked! Thank you for your support.