Reverse engineering the Motorola Sensorhub: Part 1
ristovski.github.io
ristovski.github.io
Feel free to ask any questions
(re: weird bug where calling __aeabi_uidiv calls __exidx_end, could be hard fault handler getting invoked due to either div by 0 or incorrect linkage - that M0 has a few caveats around this instruction that I vaguely recall needing specific compiler settings for)
Great write-up BTW - subscribe!
I would say that the possibility is there - imagine a buffer overflow (or something as bad) in the driver running in the kernel.
However, getting the malicious firmware onto the MCU would be the difficult part. But I suppose even a purposefully "bad" batch of MCUs that have an extra core executing malicious code is not exactly science fiction in these times :P
> could be hard fault handler getting invoked due to either div by 0 or incorrect linkage
Interesting! I will look into this, cheers.
> Great write-up BTW - subscribe!
Thank you, much appreciated!
This paper did not introduce the sensorhub concept, but provides a good primer. If anyone has a paper on the actual concept, would be interested to know.
It also mentions "training" and more advanced processing (which would be ideal for the Qualcomm Hexagon DSP, shame it's practically unused on non-Pixel phones).
[0] https://patentimages.storage.googleapis.com/cc/ee/a2/e631f84...
I'm thrilled at the adoption Ghidra has gotten, and glad the NSA used my tax dollars to contribute something useful to the world
I also loved the trick of using objcopy to turn the bytes into an ELF; that's just damn crafty