Is it possible to run CWE_Checker with an already analyzed binary file? #373
-
Hello, As stated in the question, we have a binary file that was already analyzed using Ghidra and we would like to know if it is possible to run CWE_Checker using a Ghidra Project. We have identified that CWE_Checker uses the binary to process some data (RuntimeMemoryImage, among other things). Can this process be bypassed to only check the already generated Ghidra project? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
At the moment this is not possible, but this is mostly only an implementation detail. What the cwe_checker does is to run Ghidra headless with the binary in question and then run a script in Ghidra to extract all necessary information for the analysis. One could also configure the call to Ghidra headless so that it uses an existing project as a basis and run the script for that project. One would have to modify the Ghidra invocation in However, this is only enough as long as you still use the binary as an additional input. Otherwise, you would need to rewrite the logic of parsing the RuntimeMemoryImage, so that it is also generated from the Ghidra project (this is possible, but needs some effort). As far as I remember, this is currently the only part not parsed from Ghidra. |
Beta Was this translation helpful? Give feedback.
At the moment this is not possible, but this is mostly only an implementation detail.
What the cwe_checker does is to run Ghidra headless with the binary in question and then run a script in Ghidra to extract all necessary information for the analysis. One could also configure the call to Ghidra headless so that it uses an existing project as a basis and run the script for that project. One would have to modify the Ghidra invocation in
src/cwe_checker_lib/src/utils/ghidra.rs
accordingly (which should be easy).However, this is only enough as long as you still use the binary as an additional input. Otherwise, you would need to rewrite the logic of parsing the RuntimeMemoryImage, so that it…