Hashdb-Ida – HashDB API Hash Lookup Plugin For IDA Pro

AVvXsEh5fdgmjgTk44yuDW LE1PsnVaMSsArq8WjLxfLSdlulhRUTXGQoaY80lWP9o 3WtT0C9zQyPDyqXKYP5kKLJnNoQ9tnK8mkD2peGNQ9vXMb9zVnyTev9FnJ bxwgxN4EvvMz3X0V3gwXPzTnhfRUI3akn2HkGRMGJ XO1IuqhkGiWoHUqcNYYdJMU3AQ=w640 h504

HashDB IDA Plugin

Malware string hash lookup plugin for IDA Pro. This plugin connects to the OALABS HashDB Lookup Service.

Adding New Hash Algorithms

The hash algorithm database is open source and new algorithms can be added on GitHub here. Pull requests are mostly automated and as long as our automated tests pass the new algorithm will be usable on HashDB within minutes.

Using HashDB

HashDB can be used to look up strings that have been hashed in malware by right-clicking on the hash constant in the IDA disassembly view and launching the HashDB Lookup client.

Settings

Before the plugin can be used to look up hashes the HashDB settings must be configured. The settings window can be launched from the plugins menu Edit->Plugins->HashDB.

AVvXsEic5C15irTEBb1HFwvabCzAcLg0wWjwx SNnkvbpMzVs6gwlbq1shjZszR v8MiLw4SZUvWqI1Z1V HutWSxAO68KV2UZoIbdFI 

Hash Algorithms

Click Refresh Algorithms to pull a list of supported hash algorithms from the HashDB API, then select the algorithm used in the malware you are analyzing.

Optional XOR

There is also an option to enable XOR with each hash value as this is a common technique used by malware authors to further obfuscate hashes.

API URL

The default API URL for the HashDB Lookup Service is https://hashdb.openanalysis.net/. If you are using your own internal server this URL can be changed to point to your server.

Enum Name

When a new hash is identified by HashDB the hash and its associated string are added to an enum in IDA. This enum can then be used to convert hash constants in IDA to their corresponding enum name. The enum name is configurable from the settings in the event that there is a conflict with an existing enum.

Hash Lookup

Once the plugin settings have been configured you can right-click on any constant in the IDA disassembly window and look up the constant as a hash. The right-click also provides a quick way to set the XOR value if needed.

AVvXsEiDbzSS98Esu8bjWfueuE9opx9Djf5RsSXM7StgBq7ipSSQcmqHnglbdHoRAFxU1MAwoJOfiG9PT5xrAMG99ZWtQeLCH8wVRBUDMY6pB4TOa5jthvhuiBiSrcLmC1LKi5vVhbz5V3GxQ28Dl3zMKm 16q9b7sWFWz WQ9TN5XcTrR2zuPTebyjohKreLg=w640 h76

Bulk Import

If a hash is part of a module a prompt will ask if you want to import all the hashes from that module. This is a quick way to pull hashes in bulk. For example, if one of the hashes identified is Sleep from the kernel32 module, HashDB can then pull all the hashed exports from kernel32.

 

Algorithm Search

HashDB also includes a basic algorithm search that will attempt to identify the hash algorithm based on a hash value. The search will return all algorithms that contain the hash value, it is up to the analyst to decide which (if any) algorithm is correct. To use this functionality right-click on the hash constant and select HashDB Hunt Algorithm.

AVvXsEj6ujHIunz4KrPT8N2UpCyiHlEq3j6sy WsUQQpGwQuERrhQlMIKC8IdBR27fPh UV4hMDZlL1bhApuGyfQxCTv9m4OTNeSQ

 

All algorithms that contain this hash will be displayed in a chooser box. The chooser box can be used to directly select the algorithm for HashDB to use. If Cancel is selected no algorithm will be selected.

AVvXsEjtMGZIGKE4UTehG2TsyK70TCfvEXP2Do mvGCoMX5A8nlb9i Aq8K4zeLvgvovkUEwEeCASlhCh5opwel1ZJa8URPr 1i4XSUdO3y Wqmdwcd0zA7RNyJRxwW7PtnY8YdsZI6bnPb4

Dynamic Import Address Table Hash Scanning

Instead of resolving API hashes individually (inline in code) some malware developers will create a block of import hashes in memory. These hashes are then all resolved within a single function creating a dynamic import address table which is later referenced in the code. In these scenarios the HashDB Scan IAT function can be used.

AVvXsEh1KiGp3e3t t qxkE47Bu bfZCELNtFnDHYyRIEFMNAP8MCzvJhLahbb9e nYL6eILWgrnhHFyq8rq aH1lSiYF5z4prM32Q EYwY lLd32gdJ M8rXdHmqH47weGQcEYgqbs6gP6fIRlsYFQ13jXZ2tZ58zojB1mQJrO WzMlYKS5YUlkezmmpYtXSA=w640 h360

 

Simply select the import hash block, right-click and choose HashDB Scan IAT. HashDB will attempt to resolve each individual integer type (DWORD/QWORD) in the selected range.

Installing HashDB

Before using the plugin you must install the python requests module in your IDA environment. The simplest way to do this is to use pip from a shell outside of IDA.
pip install requests

Once you have the requests module installed simply copy the latest release of hashdb.py into your IDA plugins directory and you are ready to start looking up hashes!

Compatibility Issues

The HashDB plugin has been developed for use with the IDA 7+ and Python 3 it is not backwards compatible.

o e69 Jlipo

click here to read full Article

Read More on Pentesting Tools

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *