Open owiofwm2i opened 3 years ago
Hi,
which iOS version and iPhone model are you using?
Can you attach to bluetoothd
with Frida in general? For example, can you execute frida-trace -U bluetoothd -m '*[CB* *]'
?
I haven't tried ToothPicker since a few iOS versions but have a couple of iPhones over here and can have a look. However, the error that you get seems to be rather generic, indicating that something with the Frida setup seems to be wrong. Might be your Frida setup or changes within Frida regarding the v8 engine.
I haven't tried ToothPicker since a few iOS versions but have a couple of iPhones over here and can have a look. However, the error that you get seems to be rather generic, indicating that something with the Frida setup seems to be wrong. Might be your Frida setup or changes within Frida regarding the v8 engine.
Wow, you're so quick to reply! I've solved it, I'm fuzzing ios14.7 (iphone7), thank you for open source.
There are currently no symbols for iOS 14.7 (see symbols.js). I have two iPhones with iOS 14.7 and 14.8 over here and can diff later this week. You can also try diffing on your own with the existing symbols if you don't want to wait.
I think your issue originates from symbols set to another version. The fuzzing target function is likely set (but to a wrong version) when the prepare() function is called. However, since you are running a different iOS version, you might try to attach to something that is not a function or even invalid memory.
I think your issue originates from symbols set to another version. The fuzzing target function is likely set (but to a wrong version) when the prepare() function is called. However, since you are running a different iOS version, you might try to attach to something that is not a function or even invalid memory.
i find symbol address by using bindiff in IDA, but still 3 symbols not found hci_handle_exists
,btstack_free
and is_internal_build
,I don't know if the lack of these 3 functions has any effect ,I just ran it first, I haven't read the code in detail.I hope to learn binary-only fuzz well through this code, do you have any other recommended reading material?
Hi @n0thing2speak,
took me a bit longer to find some time for diffing and testing, but I just pushed symbols for iOS 14.4, 14.7, and 14.8, which I tested on iPhone 7/8. I might still be on a slightly outdated Frida version on some of these devices, but it worked.
I used BinDiff+IDA against my iOS 13.6 symbols of an iPhone 8, and added some comments to symbols.js
, because there were three false positives, and one function wasn't detected at all.
You can now change the symbol setting here and start fuzzing:
https://github.com/seemoo-lab/toothpicker/blob/master/harness/bluetoothd.js#L6
Please let me know if you still get some errors or not. At least it works on my machine :)
I have the same error, but i pull /usr/sbin/bluetoothd
from iphone without symbols, can you share the way to find the symbols?
my iphone version: iPhone SE with IOS14.4
You need to apply the symbols of one version in this repo to an IDA/Ghidra/... database for that version and then use BinDiff, Ghidra versioning, etc. to the target version. For some functions, this can produce false positive matches, so you also have to check strings in those functions manually if the match confidence is below 90%. It's definitely some manual work, but there's no way around creating a proper database of the bluetoothd
version you're fuzzing, since you also need to verify crashes and their causes later on.
Thanks for your detailed reply!It seems i have to get an IPhone7/8. :)
Hi @n3000, an iPhone 7/8 probably won't get you any closer to having symbols, because you can't downgrade iOS and only upgrade it to currently signed versions. It's very likely that the iPhone 7/8 you buy is on the wrong version and you need to diff again.
Thanks for reminding, i will pay attention to the IOS version.
in
frizzer/fuzzer.py
fileFridaFuzzer.load_script
crashed onself.frida_script.prepare()
it showshere is my frida-compile commands
OS version: macos 11.4 with m1 chip frida version:15.1.1 and frida ios also 15.1.1