Replies: 1 comment 1 reply
-
|
I assume you dont know what compiler version and what compiler and linker options were used to build that firmware. Ideally you need to use the same setup to build a FID DB, otherwise if there is even a slight difference (e.g. because of different optimization levels), your functions wont match. The compiler version is especially important in case of Rust binaries, as different If you want tools resistant to changes, either use BSim: or BinDiff: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to analyze a firmware for a device based on the ESP32 SoC (Xtensa ISA).
I've converted the firmware to ELF format, loaded it in Ghidra 11.3, and after some initial work I've discovered that it extensively uses the
mbedtlslibrary. I've been able to identify some of thembedtlsfunctions manually, but it's quite tedious.As I understand it, I should be able to use the Function ID feature to identify
mbedtlsfunctions more quickly, if I had a database containing labeled representations of these functions.Fortunately, precompiled libraries of
mbedtls3.6.2 for this SoC already exist, over in https://github.com/esp-rs/esp-mbedtls/tree/main/esp-mbedtls-sys/libs/xtensa-esp32-none-elf for example, so I have been trying to build and use a Function ID database ofmbedtlsbuilt for this SoC to match against.This is what I've tried:
ESP32-mbedtls, and loading xtensa-esp32-none-elf/libmbedtls.ambedtlsfunctions show up in the symbol tableListFunctions.javascript on the newly-created .fidb, I get the expected list of functions in the output, so this looks good: 👍ESP32-mbedtlsproject, restart Ghidra entirely because of the bug (?) described in I can't find the Function ID option #2796 (reply in thread), and reload the project for the "target" firmware.mbedtlsis attached:What am I doing wrong?
Can anyone give me any tips on what am missing here, and need to be doing differently in order for Function ID matching to work? (And, ideally, to get some kind of output showing what it is doing?)
Beta Was this translation helpful? Give feedback.
All reactions