Static Malware analysis of TrickBot Trojan using DIE, HashCalc, and Strings tools.
https://www.dhirubhai.net/in/a--mohanraj/

Static Malware analysis of TrickBot Trojan using DIE, HashCalc, and Strings tools.

In this article, I’ll show you how to analyze a malware sample statically.?I use TrickBot trojan for Static malware analysis and I use only DIE, HashCalc, and Strings tools in this article.?


What is TrickBot??

A TrickBot is a banking credential theft trojan. It has persistence capabilities, sophisticated system reconnaissance, cryptomining and is associated with ransomware infections.?

?

How It’s delivered??

A TrickBot is disseminated via malspam campaigns or dropped by other malwares Like Emotet trojan. The most common infection vector is malspam containing malicious macro Microsoft office documents. Once opened and enable content by the user, it executes obfuscated VBA script to install TrickBot binary from the hacker server. Once executed, it writes itself to disk in the %AppData%Roaming% folder. It also attempts to disable anti-virus protection like windows defender.?

?

Static malware analysis of TrickBot trojan:?

In this static analysis, we will gather information about the TrickBot trojan without running it. like suspicious URLs, IP addresses, Imports, Exports, metadata, indicators, references, file signatures, etc.

This sample has no extension.?

No alt text provided for this image
TrickBot trojan file

We don’t know what type of file it is.?So, we need to know the file type.?


Use DIE (Detect It Easy):?

Let’s open the DIE tool. This tool gives some information about file type, entry point, architecture, hashes, strings, signatures, and disassembly view of this malware sample.?

This is the interface of this DIE tool. You can see this in the given image below.?

No alt text provided for this image
The interface of DIE (Detect It Easy)

Then select the malware sample, after loads, it looks like this,?

No alt text provided for this image
DIE after loads TrickBot trojan sample

In the above image, you can see the file type of this sample. It shows PE32, which means it is a portable executable 32-bit version. ?

Then we need to know whether it is packed or not. Packing is a kind of technique used by malware authors to make analysis difficult for malware analysts?

It doesn’t show any packers used by the TrickBot trojan. Then you can use the entropy value to find whether it’s packed or not. Click the Entropy button,?

No alt text provided for this image
Click the Entropy button in DIE

The entropy value is 6.69. If the entropy value is nearly 7-8, it's packed. It shows Packed in the status bar. You can see this in the given image below.?

No alt text provided for this image
Entropy value in DIE

Close it and click the String button, It shows all the strings used by this malware.

No alt text provided for this image
Click the String button in DIE


No alt text provided for this image
Strings in TrickBot trojan

You can see the string “This program cannot run in dos mode”?in the above image. This string shows in the DOS Stub Header of the PE file. We can double confirm it is a .exe file.?

And you can see some encoded strings in the given image below, so we confirm it is packed. ?

No alt text provided for this image
Encoded strings in TrickBot trojan

and also you can see some customized APIs in this strings tab. you can see this in the given image below.

No alt text provided for this image
APIs used by TrickBot trojan

Close this tab.

The bottom of this tool shows the linker and compiler, you can get which compiler was used to compile this sample.?This trojan is compiled by the MinGW compiler.

No alt text provided for this image
Linker and Compiler in DIE

Then click the Hex button to get a binary view of this sample.

No alt text provided for this image
Click the Hex button to get a binary view of this Trickbot trojan


No alt text provided for this image
The binary view of Trickbot trojan

It shows the binary view of Trickbot trojan and also you can see the ASCII column, it shows "MZ", "This program cannot be run in DOS mode", and "PE" strings, so we confirm it is an executable file.

close this tab.

Then click the Hash button to get the hash value of this sample. Some important hashes are MD5, SHA1, and SHA256.?You can use these hash values to check in Virustotal.?

No alt text provided for this image
Click the Hash button in DIE


No alt text provided for this image
MD5, SHA1, SHA256 Hash values of TrickBot Trojan


Use HashCalc:?

Using this tool to get the hash values of this sample. Hashes are?MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512, RIPEMD160, CRC32, PANAMA, ADLER32, TIGER.?

No alt text provided for this image
Interface of HashCalc

Click the calculate button to get hash values for this sample, then go to google and search virtual total then paste the hash values to get the details of this sample. Whether it is malicious or not, which antivirus detects this sample, gives hints of this sample, etc.

No alt text provided for this image
Virus total interface


No alt text provided for this image
55 anti-viruses detect out of 68 anti-viruses


No alt text provided for this image
TrickBoot detected by these anti-viruses


Use String tool:?

It is a command line tool, using this to get strings within the malware sample.?

Press Windows + R key, then type cmd and click ok.?

No alt text provided for this image
Open cmd.exe

It opens a command prompt in our system, just type String [File_name] to get strings within this malware sample.?

No alt text provided for this image
Type Strings Trickbot to get strings within this sample

No alt text provided for this image
Strings within this sample

Also, you can save these strings into another file,

just type Strings [File_name] > [new_file.txt]?and run.

No alt text provided for this image
Save these strings into another file


No alt text provided for this image
Strings are stored in another file called Trickbot_strings.txt


Conclusion:

In this article, I statically analyzed Trickbot trojan with DIE, HashCalc, and Strings tool. I'll show you how to analyze this TrickBot trojan with PeStudio, and the PeBear tool in my upcoming article.

Thanks for sharing, Mohanraj A

回复
Sethupathy K

Security Researcher | VAPT | Cyber Security Enthusiast | Sparking Conversation on digital safety

2 年

Very useful, Mohanraj A

回复

要查看或添加评论,请登录

Mohanraj A的更多文章

社区洞察

其他会员也浏览了