Function identification #414
-
Some backends, such as IDA, already associate names with functions that they recognize. Others, such as viv, do not. It seems that capa rules could use this information, e.g. to match Some points of discussion:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
IDA FLIRTdocumentation: https://www.hex-rays.com/products/ida/tech/flirt/in_depth/ community signatures: https://github.com/Maktm/FLIRTDB signature generator: https://github.com/fireeye/flare-ida/blob/master/python/flare/idb2pat.py open source parser and matcher: https://github.com/williballenthin/lancelot/tree/master/flirt potential issue: its probably not ok to distribute FLIRT signatures, since Hex-Rays spends a lot of effort generating them to distribute to customers. so we should either rely on public data sets for our signatures or avoid relying on FLIRT as the only matching technology. |
Beta Was this translation helpful? Give feedback.
-
vivisect vampsource: https://github.com/vivisect/vivisect/tree/master/vivisect/vamp example sigs: https://github.com/vivisect/vivisect/blob/master/vivisect/vamp/msvc/__init__.py#L9 currently the signature format is relocation-masked exact byte match.
|
Beta Was this translation helpful? Give feedback.
-
capa-native matchingidea: use the features extracted by capa to match functions. this would be portable across backends. for example:
potential issue: if one rule per signature, and there are 10s of thousands of signatures, that's a lot of rules, which may slow down analysis/matching. |
Beta Was this translation helpful? Give feedback.
-
Ghidracommunity signatures: https://github.com/threatrack/ghidra-fidb-repo In summary, its a cryptographic hash of masked instructions and code flow. potential issue: it may be quite hard to mimic ghidra's logic on other backends. |
Beta Was this translation helpful? Give feedback.
-
PE exportsTrivial case: should use the name provided by the export table when present. |
Beta Was this translation helpful? Give feedback.
IDA FLIRT
documentation: https://www.hex-rays.com/products/ida/tech/flirt/in_depth/
community signatures: https://github.com/Maktm/FLIRTDB
signature generator: https://github.com/fireeye/flare-ida/blob/master/python/flare/idb2pat.py
open source parser and matcher: https://github.com/williballenthin/lancelot/tree/master/flirt
open source parser and matcher (old): https://github.com/radareorg/radare2/blob/master/libr/anal/flirt.c
potential issue: its probably not ok to distribute FLIRT signatures, since Hex-Rays spends a lot of effort generating them to distribute to customers. so we should either rely on public data sets for our signatures or avoid relying on FLIRT as the only matching tec…