-
-
[原创]ReverseRAT远控分析
-
2021-6-26 16:06 12125
-
近日,Lumen 的 Black Lotus Labs 检测到一种新的远控木马并将其命名为ReverseRat。安全研究员在对其进行深入的关联分析之后表明,该远控木马背后应该是针对南亚和中亚地区政府机构发起攻击的南亚APT组织。
此类攻击主要分为两个阶段,第一阶段,攻击者会将恶意的LNK文件和包含正常PDF的诱饵ZIP文件上传到被他们控制的网站后台,接着向受害者发送钓鱼链接诱导受害者下载并执行LNK文件。第二阶段,LNK文件会下载并执行恶意的HTA文件,由HTA文件加载后续的远控组件,HTA加载的远控组件可能是AllaKore或ReverseRat。安全研究员通过对感染链和远控组件的关联分析发现该组织的TTP和已经披露的SideCopy有部分重合,包括远控组件的加载方式、pdb路径的相似性以及C2地址的分布情况
针对该实验室文章中的ReverseRAT详细分析如下。
文件名称 | officetool.exe |
文件功能及家族 | RAT/ReverseRAT |
文件类型 | exe |
文件大小 | 18192 bytes |
文件开发语言 | C#/Dotnet |
编译时间(utc0) | 2021-03-04 06:40:40 |
PDB | / |
VT首次提交时间 | 2021-06-19 |
VT首次提交方式及国家 | / |
MD5 | 1fb1b37bdf355e20a7b62d636a59c3d7 |
初始化环境,设置url以及key
获取主机基本信息包括网卡MAC地址、用户名、系统信息、内存信息、CPU信息、反病毒软件名称信息等。(通过环境变量获取用户名及系统信息)
通过wmi获取主机网卡地址
通过wmi获取主机内存容量信息
通过wmi获取主机CPU信息
通过wmi获取主机杀毒软件名称
接着该远控将收集的信息进行拼接加密后通过POST方式发送给C2,在传递的信息中其还通过http://checkip.dyndns.org/获取主机的IP地址。其加密方式为先通过gzip对数据进行压缩,再通过RC4对压缩后的数据进行加密。
传递新信息后,接收并解析C2命令,根据对应指令执行对应的动作
该远控组件一共有15个命令,命令详细信息如下表
命令ID | 命令功能 | |
0 | downloadexe | 下载文件并执行 |
1 | download | 下载文件,功能未编写 |
2 | upload | 上传文件 |
3 | run | 执行文件 |
4 | delete | 删除文件 |
5 | rename | 重命名文件 |
6 | creatdir | 创建目录 |
7 | list | 列出目录 |
8 | process | 获取进程信息 |
9 | pkill | 杀死进程 |
10 | clipboard | 获取剪切板数据 |
11 | clipboardset | 设置剪切板数据 |
12 | screen | 获取屏幕截图 |
13 | shellexec | cmd命令执行 |
14 | close | 退出控制 |
IOC:
IOC类型 | 详细信息 |
hash | 1fb1b37bdf355e20a7b62d636a59c3d7 |
domain | / |
ip | 207.180.230.63 |
url | http://207.180.230.63/htt_p |
yara检测规则
rule ReverseRAT : reverserat rat
{
meta:
description = "ReverseRAT"
date = "20210626"
author = "binlmmhc"
hash = "939a1d74b0902662fd1575ad7fef8c09f8a4291674cd0c721e2d79efbdb3b584"
ref = "https://blog.lumen.com/suspected-pakistani-actor-compromises-indian-power-company-with-new-reverserat/"
strings:
$dotnet = ".NETFramework"
$guid1 = "98cc6540-0472-4ca7-bee2-36009edfdee0" nocase
$guid2 = "849E77A5-16BA-4DCD-A814-7D6B6954BD01" nocase
$command1 = "downloadexe" wide nocase
$command2 = "download" wide nocase
$command3 = "upload" wide nocase
$command4 = "run" wide nocase
$command5 = "delete" wide nocase
$command6 = "rename" wide nocase
$command7 = "createdir" wide nocase
$command8 = "list" wide nocase
$command9 = "process" wide nocase
$command10 = "pkill" wide nocase
$command11 = "clipboard" wide nocase
$command12 = "clipboardset" wide nocase
$command13 = "shellexec" wide nocase
$wmi1 = "SELECT * FROM Win32_NetworkAdapter" wide nocase
$wmi2 = "SELECT maxclockspeed, datawidth, name, manufacturer FROM Win32_Procsessor" wide nocase
$wmi3 = "SELECT * FROM AntivirusProduct" wide nocase
$name1 = "gzip"
$name2 = "RC4"
$name3 = "getID"
$name4 = "getMemory"
$name5 = "getProcessor"
$name6 = "Getans"
$name7 = "loadPage"
condition:
(uint32(0) == 0x905a4d) and filesize < 50KB and $dotnet and
(
1 of ($guid*) or
6 of ($command*) or
3 of ($wmi*) or
5 of ($name*)
)
}
ref:
https://blog.lumen.com/suspected-pakistani-actor-compromises-indian-power-company-with-new-reverserat/
https://mp.weixin.qq.com/s/o4U2a0wt5SNsZPer7UyjbA
附件密码:infected