Add Export Hash Method (exphash)#1795
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Minor update and all tests are passing. |
|
The function description should read "Generate a hash of the imports".
LGTM, otherwise. |
Thanks! This is how the This function is also now present in the pefile library. |
As described in this blog post (from which someone links this PR) and in your implementation in pefile, exphash is calculated using SHA256. Is there a reason why md5 would be used in Yara over SHA256? |
Much like an imphash, an exphash is simply a MD5 hash of the exports defined in the Export Address Table. This is helpful for comparing PE files which export functions, which can then be compared to others. Found this useful when hunting for DLLs used in DLL-hijacking etc.
If no exports are found,
YR_UNDEFINEDsimply returned.