You’ve got the hash, so it’s time to dive into the actual internal analysis. I think at this stage you can get by with just a
disassembler
-
Ghidra /
IDA / etc, but you can also use other utilities for initial analysis like
pe-bear,
DiE,
CFF Explorer, and so on. I won’t go into details here about dynamic imports, anti-analysis methods, etc. (but you’ll definitely run into them, including in the next tasks). Let’s assume the
import table is fully available and we know that in advance.
To avoid reinventing a billion functions from scratch over and over again, you can simply write a program (a dynamic library https://learn.microsoft.com/en-us/troubleshoot/windows-client/setup-upgrade-and-drivers/dynamic-link-library) that
exports
ready-made functions to any program that wants to
import
them. That’s what a
DLL
is. That’s basically how the
WINAPI
works. But, it would be kind of insane to put everything into one massive DLL and export more than 10,000 functions; that’s why they’re split logically into different programs, usually with intuitive names.
For example, if you see
bcrypt.dll
— the Windows Cryptographic Primitives Library, you can infer that it’s used for encryption/decryption of some data. Maybe it’s a ransomware, maybe it’s encrypting transmitted data, maybe it’s trying to locally decrypt Chrome browser passwords
like this. It’s not exact, but it’s definitely useful info early on.
Or
ws2_32.dll
— the Windows Socket 2.0 32-Bit DLL, which is used for working with sockets to send or receive data over the network.
By looking at the
Imports
in the program you’re analyzing, you can see what functions and libraries it uses, which already gives you some
ideas. The
import table
is also a good indicator for some
packers
, or rather, its
absence is or too few number of functions. But that’s a topic for another task.
It’s also worth mentioning the relationship between hashes and the import table — namely, the
imphash, which provides a unique value for the import table. Sometimes you can use it to look for similar samples.