In September of last year, our Incident Response team was called to an incident that was identified as an attempt of social engineering an online customer service platform. Due to custom-built rules and extensive employee awareness training, we were able to push back these threats. By ingesting the tactics, techniques & procedures (TTPs) of the incident into our autonomous enrichment technology, Arpia, we were able to detect and respond to three other incidents, preventing our clients from being compromised by the mysterious threat actor.…

Read More
EXECUTIVE SUMMARY Since at least 2019, the Mustang Panda threat actor group has targeted government and public sector organizations across Asia and Europe [3] with long-term cyberespionage campaigns in line with strategic interests of the Chinese government. In November 2022, Mustang Panda shifted from using archive files to using malicious optical disc image (ISO) files containing a shortcut (LNK) file to deliver the modified version of PlugX malware.…
Read More

T1190 – Exploit Public-Facing Application Has been observed to be exploiting the following vulnerabilities for initial access: • Magnitude exploit kit • CVE-2016-0189 • CVE-2018-8174 • CVE-2019-1367• Scripting Engine Memory Corruption Vulnerability (Internet Explorer) • CVE-2020-0968• Internet Explorer Memory Corruption Vulnerability • CVE-2021-26411• Remote code execution vulnerability in MSHTML (Internet Explorer) • CVE-2021-40444• PrintNightmare • CVE-2021-34527

T1059.003 – Command and Scripting Interpreter: Windows Command ShellMagniber uses cmd.exe…

Read More
Reconstructing the Registry Payloads

It is possible to reconstruct the registry payloads depending on where their data resides.

Off Host — Python Script + CSV

The script “GootloaderRegDecode.py”, combined with a CSV registry export, can be used to automatically reconstruct the payloads. The script provides details on how the CSV file must be formatted, one or both registry payloads can be processed at the same time.…

Read More

This post is also available in: 日本語 (Japanese)

Executive Summary

Unit 42 researchers review tens of millions of attack records every month, and most months, attacks targeting a single vulnerability do not exceed 10% of the total number of attacks. However, we discovered that between August and October 2022, the number of attacks attempting to exploit a Realtek Jungle SDK remote code execution vulnerability (CVE-2021-35394) accounted for more than 40% of the total number of attacks.…

Read More

Last updated at Wed, 25 Jan 2023 20:23:13 GMT

Emergent threats evolve quickly, and as we learn more about this vulnerability, this blog post will evolve, too.

Rapid7 is responding to various compromises arising from the exploitation of CVE-2022-47966, a pre-authentication remote code execution (RCE) vulnerability impacting at least 24 on-premise ManageEngine products.…

Read More

Over the past few weeks, the Huntress team has been tracking the recent conversations surrounding supposed ConnectWise Control vulnerabilities and alleged in-the-wild exploitation.

We have been in contact with both the ConnectWise CISO and security team, as well as the security researcher reporting on this. While there has since been some chatter and news articles, we would like to use this article to share our own perspective.…

Read More

At the end of November 2022, experts from Bitdefender Labs started to notice an increase in attacks using ProxyNotShell/OWASSRF exploits chains to target on-premises Microsoft Exchange deployments. SSRF attacks on Microsoft Exchange servers are some of the most popular and routinely exploited vulnerabilities. We decided to release a technical advisory describing these attacks, but also documenting some of the recent attacks that we’ve detected in the wild. …

Read More

Summary

Three key takeaways from our analysis of Vidar infrastructure:

Russian VPN gateways are potentially providing anonymity for Vidar operators / customers, making it more challenging for analysts to have a complete overview of this threat. These gateways now appear to be migrating to Tor.

Vidar operators appear to be expanding their infrastructure, so analysts need to keep them in their sights.…

Read More

After our first report about QNAPWorm dating back from March 2022, this malware made the headlines under the name of Raspberry Robin following a RedCanary blogpost. Since then, several vendors such as Microsoft, Secureworks and Avast investigated this malware and made connections to the infamous Russian cybercrime gang EvilCorp, responsible for the Dridex trojan and other malware, as well as several high profile financially motivated campaigns since at least 2014.…

Read More

Affected Platforms: FortiOSImpacted Users: Government & large organizationsImpact: Data loss and OS and file corruptionSeverity Level: High

Fortinet has published CVSS: Critical advisory FG-IR-22-398 / CVE-2022-42475 on Dec 12, 2022. The following writeup details our initial investigation into this malware and additional IoCs identified during our ongoing analysis.…

Read More

Executive Summary

This paper investigates a recent QakBot phishing campaign’s ability to evade Mark-of-the-Web (MoTW) security features, allowing for escape from the designated security zone and  successful installation of malicious software on victim device.. Key observations:

EclecticIQ analysts investigated QakBot phishing campaigns switching to a Zero-Day Vulnerability to evade Windows Mark of the Web (MoTW).…

Read More

Phylum has uncovered yet another malware campaign waged against PyPI users. And once again, the attack chain is complicated and obfuscated, but it’s also quite novel and further proof that supply chain attackers aren’t going to be giving up any time soon.

Background

On the morning of December 22, 2022 Phylum’s automated risk detection platform flagged a package called pyrologin.…

Read More

2022年10月21日,360Netlab的蜜罐系统捕获了一个通过F5漏洞传播,VT 0检测的可疑ELF文件ee07a74d12c0bb3594965b51d0e45b6f,流量监控系统提示它和IP45.9.150.144产生了SSL流量,而且双方都使用了伪造的Kaspersky证书,这引起了我们的关注。经过分析,我们确认它由CIA被泄露的Hive项目server源码改编而来。这是我们首次捕获到在野的CIA HIVE攻击套件变种,基于其内嵌Bot端证书的CN=xdr33, 我们内部将其命名为xdr33。关于CIA的Hive项目,互联网中有大量的源码分析的文章,读者可自行参阅,此处不再展开。

概括来说,xdr33是一个脱胎于CIA Hive项目的后门木马,主要目的是收集敏感信息,为后续的入侵提供立足点。从网络通信来看,xdr33使用XTEA或AES算法对原始流量进行加密,并采用开启了Client-Certificate Authentication模式的SSL对流量做进一步的保护;从功能来说,主要有beacon,trigger两大任务,其中beacon是周期性向硬编码的Beacon C2上报设备敏感信息,执行其下发的指令,而trigger则是监控网卡流量以识别暗藏Trigger C2的特定报文,当收到此类报文时,就和其中的Trigger C2建立通信,并等待执行下发的指令。

功能示意图如下所示:

Hive使用BEACON_HEADER_VERSION宏定义指定版本,在源码的Master分支上,它的值29,而xdr33中值为34,或许xdr33在视野之外已经有过了数轮的迭代更新。和源码进行对比,xdr33的更新体现在以下5个方面:

添加了新的CC指令 对函数进行了封装或展开 对结构体进行了调序,扩展 Trigger报文格式 Beacon任务中加入CC操作

xdr33的这些修改在实现上来看不算非常精良,再加上此次传播所所用的漏洞为N-day,因此我们倾向于排除CIA在泄漏源码上继续改进的可能性,认为它是黑产团伙利用已经泄漏源码魔改的结果。考虑到原始攻击套件的巨大威力,这绝非安全社区乐见,我们决定编写本文向社区分享我们的发现,共同维护网络空间的安全。

我们捕获的Payload的md5为ad40060753bc3a1d6f380a5054c1403a,它的内容如下所示:

代码简单明了,它的主要目的是:

1:下载下一阶段的样本并将其伪装成/command/bin/hlogd。

2:安装logd服务以实现持久化。

我们只捕获了一个X86 架构的xdr33样本,它的基本信息如下所示:

MD5:ee07a74d12c0bb3594965b51d0e45b6f ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped Packer: None

简单来说,xdr33在被侵入的设备运行时,首先解密所有的配置信息,然后检查是否有root/admin权限,如果没有,则输出Insufficient permissions. Try again...并退出;反之就初始化各种运行时参数,如C2,PORT,运行间隔时间等。最后通过beacon_start,TriggerListen两个函数开启Beacon,Trigger两大任务。

下文主要从2进制逆向的角度出发,分析Beacon,Trigger功能的实现;同时结合源码进行比对分析,看看发生了哪些变化。

解密配置信息

xdr33通过以下代码片段decode_str解密配置信息,它的逻辑非常简单即逐字节取反。

在IDA中可以看到decode_str的交叉引用非常多,一共了152处。为了辅助分析,我们实现了附录中IDAPython脚本 Decode_RES,对配置信息进行解密。

解密结果如下所示,其中有Beacon C2 45.9.150.144,运行时提示信息,查看设备信息的命令等。

Beacon的主要功能是周期性的收集PID,MAC,SystemUpTime,进程以及网络相关的设备信息;然后使用bzip,XTEA算法对设备信息进行压缩,加密,并上报给C2;最后等待执行C2下发的指令 。

0x01: 信息收集

MAC

通过SIOCGIFCON 或 SIOCGIFHWADDR查询MAC

SystemUpTime

通过/proc/uptime收集系统的运行时间

进程以及网络相关的信息

通过执行以下4个命令收集进程,网卡,网络连接,路由等信息

0x02: 信息处理

Xdr33通过update_msg函数将不同的设备信息组合在一起

为了区别不同的设备信息,Hive设计了ADD_HDR,它的定义如下所示,上图中的“3,4,5,6”就代表了不同的Header Type。

typedef struct __attribute__ ((packed)) add_header { unsigned short type; unsigned short length; } ADD_HDR;

那“3,4,5,6”具体代表什么类型呢?这就要看下图源码中Header Types的定义了。xdr33在此基础上进行了扩展,新增了0,9俩个值,分别代表Sha1[:32] of MAC,以及PID of xdr33。

xdr32在虚拟机中的收集到的部分信息如下所示,可以看出它包含了head type为0,1,2,7,9,3的设备信息。

值得一提的是type=0,Sha1[:32] of MAC,它的意思是取MAC SHA1的前32字节。以上图中的的mac为例,它的计算过程如下:

mac:00-0c-29-94-d9-43,remove "-" result:00 0c 29 94 d9 43 sha1 of mac: result:c55c77695b6fd5c24b0cf7ccce3e464034b20805 sha1[:32] of mac: result:c55c77695b6fd5c24b0cf7ccce3e4640

当所有的设备信息组合完毕后,使用bzip进行压缩,并在头部增加2字节的beacon_header_version,以及2字节的OS信息。

0x03: 网络通信

xdr33与Beacon C2通信过程,包含以下4个步骤,下文将详细分析各个步骤的细节。

双向SSL认证 获取XTEA密钥 向C2上报XTEA加密的设备信息 执行C2下发的指令 Step1: 双向SSL认证

所谓双向SSL认证,即要求Bot,C2要确认彼此的身份,从网络流量层面来看,可以很明显看到Bot,C2相互请求彼此证书并校验的过程。

xdr33的作者使用源码仓库中kaspersky.conf,以及thawte.conf…

Read More
USB Spreading

As Mandiant recently wrote about in our blog post, Always Another Secret: Lifting the Haze on China-nexus Espionage in Southeast Asia, USB spreading malware continues to be a useful vector to gain initial access into organizations. In this incident, a USB infected with several strains of older malware was inserted at a Ukrainian organization in December 2021.…

Read More

In late August 2022, we investigated an incident involving Ursnif malware, which resulted in Cobalt Strike being deployed. This was followed by the threat actors moving laterally throughout the environment using an admin account.

The Ursnif malware family (also commonly referred to as Gozi or ISFB) is one of the oldest banking trojans still active today.…

Read More
Italians Users Targeted by PureLogs Stealer Through Spam Campaigns Executive Summary

During a routine threat-hunting exercise, Cyble Research and Intelligence Labs (CRIL) came across a tweet about PureLogs information stealer by TG Soft. This tool is used by the Threat Actor (TA) “Alibaba2044” to launch a malicious spam campaign at targets based in Italy on the 14th of December 2022.…

Read More