shakevsky / keybuster

Apache License 2.0
112 stars 31 forks source link

failed to load km_get_ASN1_INTEGER #1

Open jdup-web opened 2 years ago

jdup-web commented 2 years ago

Hello, I'm trying to run the script on a Galaxy S8 (non rooted atm) and I've got this error :

./keybuster_test
logging stderr to /data/local/tmp/test_stderr
failed to load km_get_ASN1_INTEGER
Total tests passed: 0 out of 18

I followed the steps bellow, did the chmod on the files but can't go past that..

I'm about to root it but I read in the document that root could be optional? I'll try again after rooting but I wanted to let know of that error

shakevsky commented 2 years ago

Please note that the code and scripts were tested on S9, S10 and S21, not S8. As we show in our paper, S8 is not immediately vulnerable to the IV reuse attack.

The error you get means that the symbol km_get_ASN1_INTEGER is not exported in libkeymaster_helper.so. This function can be implemented directly to overcome the issue. keybuster assumes that several utility functions are exported in the shared library - this assumption holds for the latest S9, S10, S20, and S21 devices (as well as related variants).

Finally, please note that keybuster requires sufficient privileges to read key blobs, and appropriate SELinux permissions to communicate with the TZOS drivers. Rooting the device can achieve those requirements (alternatively, one can use a development model if available, or exploit a privilege escalation vulnerability if applicable).

ghost commented 2 years ago

Tried in on a S7 with the same results. waiting now for my S9 to come in. btw i had root acces.

monat78 commented 3 months ago

First of all, great job.,,, It would be a lot of trouble to implement km_get_ASN1_INTEGER or some example that I have no idea about??? at least we could use the old S8 device.

monat78 commented 3 months ago

The S9 has a SW revision UP (bootfast), i can't downgrade ... :/