Skip to content
BlogPaper
Go back

Malware Analyst #02 : AgentTesla

Edit page

AgentTesla

File Information

Key Takeaways

Case Summary

11.png

Analysis indicates the execution of a Loader malware on the host system. This loader established an endanger connection to Command and Control (C2) server to download additional payloads that may be malware. In conclusion, the process dropped two malicious files as legitimate Windows system file, winmmdll and winmm.exe, to achieve defense evasion.

Analyst

Static Analyst

13.png

This 32bit-file was written by Delphi which language is based on Object Pascal.

12.png

First and foremost, I have checked some strings in this binary file. I realized that there were some popular APIs which the malware usually uses as VirtualAlloc/Ex, WriteProcessMemory, CreateProcess, LoadLibraryA, ResumeThread, GetModuleHandle..e.g…

Dynamic Analyst

2.png The first step was to examine the provided file, it seemed like the loader was trying to make process injection technique which target is svhost.exe. After injecting the payload into target process, the loader killed itself.

3.png

With those information, I decided to debug this loader and put breakpoint at CreateProcessA, so I get that target process. Additionally, the loader load the library ntdll.dll which has some Nt (New technology) API.

5.png

WriteProcessMemory() was called plenty of times in order to let the loader inject payload into Virtual Memory that was 0x490000 (maybe different with other cases). Now, let’s dump. 7.png 8.png

6.png Upon dumping and fixing PE format, I am aware of WININET.dll file which includes some Network APIs, that means the payload might create C2 connection if running.

9.png

It was said that the PAYLOAD connect to 91[.]92[.]241[.]242:80 and sent request to download file malicious DLL.

10.png

Lastly, there were two malicious files dropped in last stage because it is a name of legitimate Windows.

Advanced Analyst

14.png

Firstly, from OEP to Create folder in temp which includes two malicious files. It called GetTempPathA to take the temp directory and CreateDirectoryA. 15.png Then, It will decrypt the ciphertext with XOR 0x2F and we got the winmm.dll files. 17.png 16.pngAt two points, it is directory of C2 that we have analyzed.

19.png 18.png

At these codes, it is actually a IP address that will store in memory when executing.

20.png 21.png

Last, It will send request a lot of times, if failed, it will call again, we call that Beacon Interval.


Thank you for reading. This is the second time I have analyzed the malware so If you see any problems. Please do not be hesitate to contact me ^^.


Edit page
Share this post on:

Next Post
Malware Persistence in Window Operating System 101