Replies: 2 comments 3 replies
-
I have no advice regarding patterns, if it does turn out to be a go binary and the go analyzer is failing, please start a issue for that. |
Beta Was this translation helpful? Give feedback.
-
Usually int3 (0xcc) are filler bytes if the function start isn't aligned. There is the ability to specify that the patterns must be aligned. Also that the pattern can start after the matched bytes, in this case a 0xCC. Having such a loose pattern is fairly dangerous and can find alot of bad code. Does Ghidra find any code at all? There currently isn't a local pattern file extension mechanism. We tend to try and use the pattern files only for very strong function end/start patterns. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a binary from some weird compiler (probably Go), where Ghidra completely fails to find functions. With manual inspection it's clear that a reliable pattern to identify function starts is "
int3
(0xcc) instructions before a 32 byte aligned address implies function start". But the actual first byte of a function isn't reliable, so I don't see how I could encode this in a_patterns.xml
file. Skimming the existing ones I could not find anything about alignment constraints in general, so my first question is: How would I specify a pattern like this?The second question that derives from this scenario is: How can I add those patterns without having to edit the processor files in a Ghidra fork, i.e. how could I ship these in an extension?
SpecExtension
doesn't seem to include such patterns, and I think that these patterns are not a feature of the processor, but of a compiler and a processor, but I don't know what the implications would be to make that possible.Beta Was this translation helpful? Give feedback.
All reactions