Basic Static Analysis
1. Hashing
. Collect sha256sum
. Collect md5sum of sample
2. Malware hash search
Submit hash on virustotal search to see if this sample is seen before in past
3. Extract Strings
extract strings that can be useful for getting better understanding. two utilities
strings
floss (better version of string, which can programatically try to decode deobfuscate strings and present that )
4. PEView
After opening file in peview check
IMAGE_NT_HEADERS
>IMAGE_FILE_HEADER
for compilation time of executable. this time sometime can be fake too like some compiler set date to 1992. (delphi compiler)IMAGE_SECTION_HEADER.txt
can be used to check virtual size or raw size which can give away if ts packed malwarefrom
section.rdata
we can checkoutimport address table
. Which can be used to identify which win32 api this binary calls. which tells what this malware capability is
5. Packed or Unpacked
Packing of malware is done to obfuscate malware code so it looks different from original code. This can lead to difference in raw size and virtual size.
a packed malware won't have Import address table(IAT) like unpacked malware. In packed mwalware IAT
will be very small. All win API calls won't be listed. Instead something like Getprocaddress
and Loadlibrary
api calls will be there only which loads other win api calls dynamically in memory at runtime.
Packing is done for size reduction, or AV evasion. UPX is one famous packer. In packed malware there is stub which unloads all packed code at run time.
6. PEStudio
PeStudio is great tool which can do most of basic static analysis for us. It highlights features and behvaiour that can be used maliciously as balcklist.
7. CAPA tool by mandiant
THis tool can also be used for basic static analysis.
capa detects capabilities in executable files.
Malware Behavioral Catalog (MBC)
The next output is the Malware Behavioral Catalog (MBC) Objectives and Behaviors. This is a similar classification system to MITRE ATT&CK but focuses on malware specifically.
MITRE ATT& CK is also mapped alsong with capa's own rule based matching to detect malware capabilities.
Last updated