新变种Emotet恶意样本分析

样本信息

表1.1 样本信息表

文件

1.doc

大小

 190976 字节

修改时间

 2021年12月2日, 10:30:02

MD5

2EFBE18F2ED8AE0D4648B68596DFA00C

SHA1

0954D1E4BC63EB075703FB3D40B5CDB06F57E61E

CRC32

8969E72E

运行效果如图,很熟悉。

简介:本恶意样本为变种Emotet是一种典型的恶意木马,最早发现是于2014年6月份,传播至今,已经出现了多个版本的迭代。主要通过垃圾邮件进行传播,在早期的版本中通过JavaScript文件传播,后期版本通过office文档文件携带混淆代码的宏病毒,并嵌套PowerShell脚本等手段从C2服务器下载后进行传播。该恶意代码原本是一种窃取银行登录凭证的木马,当受害者感染后,恶意代码进而收集用户凭据、浏览器历史记录及重要文档信息,然后打包并发送至攻击者控制的存储服务器中,后来用来分发其他恶意软件。

样本分析

执行流程

 

分析工具:

  • 监控工具:Process Monitor/火绒剑  
  • 分析工具:olevba IDA OD hash
  • 编辑工具: 010Editor

分析思路:

遇到rtf文档,通常可能会怀疑office漏洞利用和宏病毒,olevba查看发现宏代码。

 

恶意行为分析

开发工具-->Visual Basic(alt+F11)查看宏代码,发现有密码。

 

首先解决密码保护,010Editor修改字段DPB为DPX,保存,再次打开Visual Basic右键添加保护密码为自己设置的(不设置会影响代码调试,调试过程报异常)

恶意宏代码

 单步调试,创建uvdhx.bat执行TextBox2中BoundValue内容。

 cmd脚本内容如下

 Cmd执行进程树,通过访问下载恶意PE文件(.dll后缀)

 调用Powershell命令执行脚本。

 

释放恶意dll文件。执行重命名

修改后的文件名添加注册表自启动,实现持久化。

 

DllEntryPoint主模块

 Powershell calls rundll32.exe for the first time to execute dll, and DllRegisterServer is the execution function module

 The main function of this sample is to load malicious PE files into the memory to perform external connections, apply for memory space, and load memory horses.

 The memory is loaded immediately, I was lazy and did not analyze the specific execution, experience tells me that it is remote control. Ha ha

 Trojan visit 209.239.112.82 has been marked as remote control CS, bank stealing Trojan Dridex.

 

Host troubleshooting

1. Check whether there is a randomly generated malicious file name in the startup item and the suffix is ​​also randomly generated

 2. Rundll32.exe accesses remote connections.

Some external IPs are marked by the intelligence database.

 By matching threat intelligence and traffic characteristics into a remote control program, in addition to deleting the malicious program itself, the host should be fully detected. Prevents the use of remote control programs to add more persistent operations.

Guess you like

Origin blog.csdn.net/qq_37431937/article/details/121789915