The SOC Files 5: Ghost in the pipeline, or a fileless SharePoint breach by Storm-2603SOC 文件 5:管道中的幽灵,还是 Storm-2603 发起的无文件 SharePoint 入侵?
Kaspersky researchers analyze a complex fileless cyberattack by Storm-2603 involving ToolShell exploitation and subsequent runtime subversion, and discuss how to detect such intrusions.

SOC, TI and IR posts
Intrusion timeline: Strategic latency and exploitation
Initial access validation phase
Vulnerability fingerprinting
Active exploitation: Santa took your data and left a backdoor
Attack originated from an SPN node
Webshell architecture
“G.cs” pipeline control and C2
Command and control layer (in-memory transport)
“Prog.cs”: Execution entry point and task dispatcher
Host interaction modules
Privilege escalation
Post-exploitation activity
EDR-killing attempts
Ransomware deployment attempt
What defenders really need to look for
ToolPane deserialization and CLR artifacts
Detecting deserialization exploitation
Detecting a VPP-based webshell/runtime implant
Indicator of compromise
In 2025, several threat actors exploited CVE-2025-53770 and CVE-2025-53771 (ToolShell vulnerabilities) in on-premises Microsoft SharePoint to achieve remote code execution through crafted HTTP requests. One of the threat actors deployed ransomware on the target’s systems after successful exploitation. Microsoft attributed this ransomware-related ToolShell activity to Storm-2603, distinguishing it from other actors whose observed activity was primarily focused on credential theft, espionage, and data exfiltration.
In December, our retrospective analysis identified activity consistent with Storm-2603’s TTPs. This activity involved the attacker using the IIS worker process as an in-memory bridge to the customer’s infrastructure, keeping the access and control layer entirely within w3wp.exe without writing anything to disk. Although subsequent post-exploitation activity generated disk artifacts, the bridge used to maintain access remained memory-resident.
Let’s look in more detail at this attack.
The attack chain, from reconnaissance to infrastructure compromise
The intrusion analyzed in this report occurred in two stages, with a temporal gap between initial access and subsequent exploitation activity. The attack timeline was as follows:
Dec 20 – Vulnerability fingerprinting: A single HTTP request targeted a SharePoint administrative endpoint associated with the ToolPane component to determine whether the host was vulnerable to CVE-2025-53770.
Dec 21-23 – Tactical latency: A three-day period of silence followed the initial probe, separating the vulnerability fingerprinting from subsequent malicious activity and potentially reducing the likelihood of immediate detection.
Dec 24 – High-intensity re-engagement: On Christmas Eve, when security staffing at many companies is reduced, the full RCE chain was executed through the IIS worker process (w3wp.exe) on the same endpoint as the initial probe.
Dec 26 – Incident discovery: The three-day gap initially prevented the December 20 probe from being correlated with subsequent malicious activity, marking the event as low priority. Retrospective analysis established that the probe was the initial phase of the subsequent intrusion.
A vulnerability fingerprinting request on December 20 marked the first observed interaction with the target. The request originated from infrastructure associated with ONYPHE, an internet-scale attack surface discovery and management platform for identifying exposed assets, vulnerabilities, and cyberthreats. Unlike widely used tools such as Shodan and Censys, which merely provide a list of internet-facing assets correlated with the open-source data about known vulnerabilities, ONYPHE actually checks if the target system is vulnerable.
Fingerprinting with ONYPHE
The request characteristics were consistent with ONYPHE’s vulnerability checks, which use active, non-intrusive probes to identify internet-exposed systems vulnerable to specific CVEs. For ToolShell, ONYPHE adopted the approach used by Niels Hofmans (hazcod). Namely, it attempts to inject a harmless marker into the target server to find out if it is vulnerable.
OFFICIAL ONYPHE CVE CHECKER (TOOLSHELL)
This phase served as a validation step against the SharePoint execution surface exposed over HTTP:
The target processed structured requests through the ASP.NET pipeline without rejection.
The request path reached application logic capable of handling serialized input.
No defensive controls interrupted or altered the execution flow at the application boundary.
Approximately 12 minutes later, a second inbound connection originated from infrastructure associated with Pfcloud UG, a provider operating under a bulletproof hosting (BPH) model. Given the timing and the IP’s documented history of scanning and abusive activity, the connection may represent follow-on reconnaissance against the newly identified target. No exploitation was attempted at this stage.
A connection from an IP address belonging to Pfcloud UG BPH
The main malicious activity occurred on December 24. The actor targeted the same SharePoint host with a crafted request from 45.91.94.204 (45.91.92.0/22, ASN 63473, HostHatch, LLC). This resulted in a webshell execution within the IIS worker process (w3wp.exe). The payload was not written to disk; rather, it was loaded directly into the ASP.NET runtime and used during subsequent request processing. The implant remained resident for the lifetime of the affected application domain. This runtime state was lost when the application pool was recycled or IIS was restarted.
The IP address 45.91.94.204 is a Safing Privacy Network (SPN) node. SPN routes each connection through a multilayer VPN path with multiple relay nodes that can obscure the originating IP.
SPN promotes itself as a network that offers strong privacy protection for internet traffic. Its infrastructure resembles Tor’s in many ways, but with some differences. It features the following capabilities:
Speed: Near-VPN performance for high-speed data transfer.
Layer 3 support: Supports multiple protocols like TCP, UDP, ICMP (unlike Tor, which only supports TCP).
App-routing: Direct tunneling without a browser.
Multi-identity: Simultaneous exit nodes to bypass IP rate limits.
Fixed-size packets and padding make it harder to analyze its traffic.
It is less common than Tor, and frequently bypasses standard Tor blocklists.
The webshell the attackers injected into the w3wp.exe runtime is a multi-module in-memory framework, where execution is orchestrated through the main component (G.cs) and extended via multiple functional units across namespaces.
The implementation follows a modular C# project structure in which each capability is isolated into its own compilation unit and invoked dynamically at runtime.
The main webshell component is G.cs. It orchestrates the implant’s execution context, lifecycle, C2 and session management.
To ensure persistence within the runtime, G.cs performs the following actions:
Registers a custom VirtualPathProvider using the non-public RegisterVirtualPassProviderInternal method from the ASP.NET HostingEnvironment class so that ASP.NET uses it for virtual-path processing. The provider is automatically added to the chain of registered virtual path providers.
Delegates the provider’s .NET Remoting lifetime policy to the previous provider in the chain, preserving the existing lifetime behavior.
Additionally, to evade defenses and enable the VirtualPathProvider to be registered even if the application in whose AppDomain the webshell is running is precompiled, the module implements the trust control subversion (T1553) technique:
Uses reflection to check if the application is precompiled.
Extracts pointers for internal state fields for the BuildManager class, which manages application compilation, and modifies them at runtime.
Uses reflection once again to force runtime injection.
G.cs uses the GetCacheKey() function as the interception point for the virtual path processing flow. It processes incoming requests to the SharePoint server and checks their headers to filter out requests from the attacker.
The specific User-Agent in the request headers triggers the webshell execution. If the request doesn’t match this condition, the implant remains dormant, making its traffic harder to recognize.
The same core module (G.cs) implements the communication layer.
Instead of relying on external frameworks or standard beacons, it uses a custom binary protocol with XOR-based obfuscation to exchange data with the C2. These communications blend into normal application traffic. The module uses the GetCacheKey() hook to intercept standard HTTP requests. When a specific User-Agent is detected in the request headers, the module parses it, extracts the payload, and establishes a TCP connection to a target host inside the target’s network if needed.
Bidirectional TCP tunnel initialization
G.cs establishes a full-duplex proxy tunnel to support interactive control. It stores active target sockets in memory to pair concurrent HTTP read and write channels.
TCP connections from the C2 server to arbitrary hosts inside the target network are supported for pivoting and lateral movement. The traffic is proxied through the SharePoint host.
Target-to-attacker data channel
Attacker-to-target data channel
As can be seen in the screenshots, the attackers used the suo5 tool to implement traffic proxying. Its authors promote it as a stable forward-proxying tool for scenarios where outbound internet connections are prohibited.
To increase its performance, G.cs manipulates ThreadPool by raising its limits for concurrent operations and maximum timeout.
ThreadPool manipulation
Prog.cs is the entry point that receives command-line arguments and passes them to uk/London.cs. The latter acts as the orchestrator, handling command parsing and privilege escalation (via named pipe impersonation). We’ll review it in more detail later. If the “suo5” command is provided, London.cs triggers G.cs to hook into the ASP.NET runtime as a memory shell. Once active, G.cs independently processes incoming web traffic inside the web server memory.
The following modules provide direct system interaction capabilities, each implemented as a separate unit. London.cs triggers these modules when it receives a corresponding command from Prog.cs.
The FileDownloader.cs module downloads arbitrary files from external URLs provided by the C2. It stores the downloaded files in the Program Data directory without any user interaction.
This module enumerates logged-on users and identifies their session types (interactive, service, remote). The results are stored in memory. The attackers can retrieve them using the proxy and tunneling capabilities provided by G.cs.
This module lists running processes with full paths to the corresponding executables on the disk. The results are stored in memory and the attackers can retrieve them via G.cs.
This module extracts information about existing network connections, including protocols, local and remote IPs and ports, and connection state. It also enumerates network interfaces and headers. The results are stored in memory and can be retrieved by the attackers via G.cs.
This module silently installs and executes MSI packages previously downloaded by FileDownloader.cs.
This module creates administrative accounts using the native SAM RPC subsystem (SAMRPCNative namespace) rather than standard command-line tooling. This may indicate an attempt to evade detection and provide the attackers with privileged stealthy access to target systems that persists after the webshell has finished its work.
The SAMRPCNative namespace implements a low-level C# P/Invoke wrapper for the native Windows samlib.dll library, comprising three types: SAMStructs.cs, SAMMethods.cs, and SAMEnums.cs.
Implements structured bitwise lists and constant flags mapping numeric codes to their security meaning in SAM, and translates system status return codes.
Defines native data structures required for P/Invoke memory alignment and for marshalling. It securely formats and aligns data structures.
Contains external API declarations (P/Invoke) imported from samlib.dll to perform actions such as connecting to the SAM server, creating users and opening domains.
This layer is crucial for the attackers because it enables account operations.
The uk namespace contains offensive primitives for privilege escalation. To elevate privileges to SYSTEM, it uses a local token impersonation technique via the Encrypting File System Remote Protocol (EFSRPC) interface adopted from the EfsPotato tool.
This functionality is implemented in the uk/London class. It creates a malicious named pipe while the EfsrTiny class (a tiny version of the EfsPotato tool) connects to the LSASS.exe RPC server. Then it’s London.RpcThread function calls the EfsRpcEncryptFileSrv function from EfsrTiny with a crafted \\localhost path. This tricks LSASS.exe into connecting back to the attacker’s named pipe. Finally, the London.Exp function uses ImpersonateNamedPipeClient to coerce and impersonate the LSASS.exe token and spawn a new process via CreateProcessAsUser with SYSTEM privileges. As the webshell resides in the IIS worker process, it has the necessary SeImpersonatePrivilege to perform this technique.
The uk namespace also implements a minimal MSRPC client layer by explicitly defining structures such as RPC_CLIENT_INTERFACE and MIDL_STUB_DESC , thereby spoofing an interface stub. This enables direct interaction with the Windows RPC runtime (Rpcrt4.dll) without relying on MIDL-generated stubs or higher-level RPC abstractions. This provides direct control over binding and marshaling that goes beyond the constraints of standard client APIs.
Shortly after the webshell injection, the infected worker process spawned msiexec.exe to install a remote MSI payload hosted in Supabase cloud storage. The payload was Velociraptor, an open-source digital forensics and incident response tool – namely version 0.73.4.0 vulnerable to CVE-2025-6264 – that the attackers abused for command execution on the target network.
In October 2025, Cisco Talos reported Velociraptor being leveraged by threat actors as a post-compromise execution framework and attributed this activity to Storm-2603. This tool enables arbitrary command execution, and can be used for various purposes. In our case, it was used for persistence, discovery, data collection and payload execution.
The threat actor used Velociraptor to deploy multiple independent tunneling mechanisms, including Zoho Assist-Unattended Support for unauthorized remote access, VS Code CLI tunneling, Cloudflare Tunnel, and a lightweight reverse proxy utility. By doing so, they attempted to maintain access even if some of their tools were detected and deleted. At this stage, they also no longer depended on the IIS worker process lifecycle and ToolShell vulnerability.
Once the threat actor had access to the target system, they were able to upload a vulnerable driver that is used by many attackers to terminate EDR solutions. We were able to detect the main driver at C:\programdata\rsndispot.sys (054a32d6033b1744dca7f49b2e466ea2). In addition, the adversary used a malicious DLL (2d9ebf9c042f596f435865b40edad928) in a sideloading attack. This DLL was identified as Warlock ransomware’s AV killer. It was possibly intended to kill security solutions using the vulnerable rsndispot.sys driver.
The attackers made attempts to launch ransomware on the compromised system. However, the Proactive Defense Module in Kaspersky Endpoint Security blocked the ransomware process, effectively preventing this activity. The malware DLL we obtained was identified as Warlock ransomware.
When the attackers tried to access ToolPane, both the dynamically compiled App_Web_toolpane.aspx assembly and the Microsoft.GeneratedCode helper assembly were present within the same application domain.
Both assemblies are used in legitimate scenarios. App_Web_* assemblies are generated during normal ASP.NET page compilation, while Microsoft.GeneratedCode is typically produced by the XmlSerializer during legitimate serialization workflows. However, a request to the ToolPane endpoint that results in immediate loading of Microsoft.GeneratedCode within the same execution window indicates that the runtime is processing serialized data supplied through the request.
First, it is highly recommended to read this article (in Russian) on how deserialization exploit attempts in the CLR should be detected, with examples of YARA rules and monitoring recommendations. A summary of the main idea of the detection logic is provided below.
Deserialization vulnerabilities should be treated as a distinct class of exploitation events. In the CLR, deserialization is not merely the conversion of bytes into values – it is the reconstruction of an object graph from an incoming stream. Serialization and deserialization are performed by formatters. One of the most widely used formatters is BinaryFormatter . It uses the NRBF format, which defines the stream as a sequence of records describing classes, arrays, primitives, and references between objects. The shape of the resulting graph is determined by the data supplied to the deserializer. This means that the input stream defines not only the values but also the specific types, relationships, and lifecycle points that the runtime must materialize.
Microsoft states explicitly that BinaryFormatter is unsafe and cannot be made safe; beginning with .NET 9, the in-box implementation is effectively removed from ordinary use. However, Microsoft continues to use it in its products, including SharePoint, because it is powerful and easy to use. To fix BinaryFormatter-related issues, architectural changes are needed. Similar warnings also apply to related unsafe mechanisms, including LosFormatter (used in the vulnerable page).
The primary risk of unsafe deserialization is that the CLR may resolve unexpected types, instantiate objects outside normal constructor invariants, and invoke special lifecycle mechanisms such as ISerializable , IObjectReference , IDeserializationCallback , and methods marked [OnDeserialized] . In other words, the attacker-controlled data can force the runtime to construct a graph containing types with executable side effects.
A practical detection strategy should therefore focus on graph-construction artifacts. CLR loader events identify the relevant assemblies and application domains. Memory and metadata inspection then reveal the type names and generated serializer structures associated with the suspected gadget chain. In ToolShell-like scenarios, unsafe deserialization usually produces helper assemblies (evidence in loader events) with metadata containing fully qualified type names, gadget class names, and string representations of the constructed generic types (just scan via YARA for it). In our case, the artifacts to look for include Microsoft.GeneratedCode , App_Web_toolpane.aspx* (evidence of deserialization in loader events) as well as strings identifying ObjectDataProvider , ExpandedWrapper , and LosFormatter (evidence that the input stream was deserialized into dangerous objects). Note that these indicators are not significant in isolation; their value lies in the fact that they show the runtime has already received data requiring helper code generation to reconstruct a dangerous object graph.
Gadget objects that exploit vulnerabilities like those associated with ToolShell are conveniently represented in corpus-style tooling such as ysoserial.net/YSoNet, which aggregate known gadget chains for unsafe .NET deserialization. For defensive purposes, the value of these projects lies not in their offensive capability but in the catalog of types and structures that can be searched for in streams, memory, and helper assemblies. The presence of any of them in memory or in a helper assembly should be treated as a strong indicator of exploitation.
To simplify deserialization exploit detection, we created a tool named CLRDeserializationExploitFinder . It can detect ToolShell exploitation attempts, as well as other gadget chains covered by ysoserial.net.
A mechanism based on VirtualPathProvider should be treated as a separate class of runtime implant (no files involved). In ASP.NET, HostingEnvironment.RegisterVirtualPathProvider registers a new virtual-path provider (VPP) in the application’s compilation system. Once registered, the application can serve virtual paths during dynamic compilation as though they were ordinary on-disk pages. Dynamic compilation does not require the payload to exist as a file in the filesystem. It operates entirely within the trust boundary of the application itself. During the compilation process, temporary files may be generated, but they cannot be treated as reliable forensic artifacts. Because VPPs can also be used for legitimate purposes, the defensive model should begin with an inventory of the legitimate VirtualPathProvider implementations. In all other cases, the registration or use of a new VPP should be considered anomalous.
To see how the dynamic generation of virtual pages using ASP.NET, IIS, and the CLR works, and to learn how to detect such activity, use our project VirtualPathProvider Lab .
The most useful telemetry source for this technique is the Microsoft-Windows-IIS-Configuration ETW provider. To detect virtual paths, events 25 and 47 are of primary value. Event 25 records the mapping of ConfigPath to PhysicalPath , and event 47 records the mapping of the configuration path to a directory. In the case of a VPP-backed path, these events create an inconsistency: IIS and ASP.NET behave as if the path has a physical representation, while the corresponding file does not exist on disk. In the example provided by VirtualPathProvider Lab, this appears as a mapping of the virtual resource googlecheck.aspx to a physical path where no real file is present. This discrepancy between configuration resolution and filesystem reality is the primary indicator of virtual content.
The second indicator is more negative than positive. For disk-backed files, IIS normally creates a FileChangeNotificationMonitor chain, as reflected in events 17, 18, 19, and 21 . For virtual paths served by a custom VirtualPathProvider , this chain is absent or does not match the normal profile of an ordinary file because there is no physical object or corresponding on-disk change lifecycle. Consequently, the presence of positive events 25 and 47 combined with the absence of the expected events 17, 18, 19, and 21 for the same path forms a reliable detection pattern: the path exists for IIS as a configuration-resolved resource, yet it is not backed by the filesystem and is not accompanied by normal file-change monitoring.
To sum up, the hunting target here is the discrepancy between how IIS/ASP.NET resolves a resource and what is actually present on the disk and in the change-monitoring chain. For known applications, such cases can be filtered through an allowlist of legitimate VirtualPathProvider implementations. Anything else should be treated as a potential runtime implant and examined using ETW, filesystem verification, and memory inspection of the w3wp.exe process.
Microsoft tracks Storm-2603 as a standalone threat actor with no known links to other groups. While they are careful about assessing the actor’s motivation, they mention that it has previously deployed Warlock and LockBit ransomware following active exploitation of on-premises SharePoint vulnerabilities. In the analyzed incident, we observed similar SharePoint exploitation activities, as well as an EDR killer associated with Warlock ransomware and unsuccessful Warlock launch attempts.
Other documented intrusions have identified Storm-2603 as leveraging known flaws within perimeter mail gateways to achieve initial access, subsequently staging the Velociraptor framework with elevated privileges and establishing persistent encrypted tunnels via commercial remote management software to orchestrate secondary lateral movement. This aligns with the post-exploitation behavior we observed in our case. Together with the ToolShell exploitation scenario, this allows us to attribute this case to Storm-2603 with moderate confidence.
From the incident analyzed in this article, the main defensive lesson is that exploiting an internet-facing SharePoint server can enable fileless code execution directly inside the application trust boundary. Storm-2603 did not require a conventional dropper, persistent service, or exposed C2 endpoint; instead, it deployed a webshell inside w3wp.exe, from which tunneling, privilege escalation, credential access, and lateral movement could be orchestrated. Detection therefore needs to move beyond file-based webshell hunting toward runtime behavior, such as anomalous w3wp.exe activity, unexpected outbound connections, RPC coercion, token impersonation, and the introduction of remote-management or DFIR tooling after application compromise.
To correctly attribute malicious activity and develop appropriate response measures, defenders should reconstruct execution chains and temporal relationships across application, host, and identity layers. They should also preserve memory and IIS telemetry, and correlate low-signal reconnaissance with subsequent privileged activity rather than evaluating events in isolation. A confirmed SharePoint exploit with code execution should trigger host-level containment, persistence hunting, credential and exposed MachineKey rotation, and TTP-driven investigation rather than remediation limited to the initial exploit or known IOCs.
Kaspersky products detect the threats mentioned in this article as:
Trojan.MSIL.Agent.gen
Trojan.Win64.DLLhijack.cdp
Microsoft Sharepoint
Vulnerabilities and exploits
The SOC Files 5: Ghost in the pipeline, or a fileless SharePoint breach by Storm-2603
This site uses Akismet to reduce spam. Learn how your comment data is processed.
From the same authors
Anomaly detection in certificate-based TGT requests
Detection evasion in CLR and tips on how to detect such attacks
In the same category
Angry Birds: Toy Ghouls’ new toys
An analysis of incidents at Brazilian educational institutions
Risk reduction redefined: How compromise assessment helps strengthen cyberdefenses
Whispers from the Dark Web Cave. Cyberthreats in the Middle East
A deep dive into the most interesting incident response cases of last year
SOC、TI 和 IR 职位
入侵时间线:战略性延迟和利用
初始访问验证阶段
漏洞指纹识别
主动攻击:圣诞老人窃取了你的数据并留下了后门。
攻击源自SPN节点
Webshell架构
“G.cs”管道控制和C2
命令与控制层(内存传输)
“Prog.cs”:执行入口点和任务分发器
主机交互模块
权限提升
开发后活动
试图杀死EDR
勒索软件部署尝试
防守队员真正需要注意什么
ToolPane 反序列化和 CLR 工件
检测反序列化漏洞利用
检测基于 VPP 的 webshell/运行时植入程序
妥协的迹象
2025年,多个攻击者利用本地部署的Microsoft SharePoint中的CVE-2025-53770和CVE-2025-53771(ToolShell漏洞)通过精心构造的HTTP请求实现远程代码执行。其中一名攻击者在成功利用漏洞后,在目标系统上部署了勒索软件。微软将此次与勒索软件相关的ToolShell攻击活动归因于Storm-2603,并将其与其他主要从事凭证窃取、间谍活动和数据泄露等攻击活动的攻击者区分开来。
12 月,我们的回顾性分析发现了与 Storm-2603 的 TTP(战术、技术和程序)相符的活动。该活动涉及攻击者利用 IIS 工作进程作为内存中的桥梁连接到客户的基础架构,将访问和控制层完全保留在 w3wp.exe 中,而无需将任何内容写入磁盘。尽管后续的渗透后活动产生了磁盘痕迹,但用于维持访问的桥梁仍然驻留在内存中。
让我们更详细地了解一下这次攻击。
从侦察到基础设施入侵的攻击链
本报告分析的入侵事件分两个阶段进行,初始访问和后续利用活动之间存在时间间隔。攻击时间线如下:
12 月 20 日 – 漏洞指纹识别:一个 HTTP 请求针对与 ToolPane 组件关联的 SharePoint 管理端点,以确定主机是否容易受到 CVE-2025-53770 的影响。
12 月 21 日至 23 日 – 战术延迟:在最初的探测之后,出现了三天的沉默期,将漏洞指纹识别与随后的恶意活动分开,并可能降低立即检测到的可能性。
12 月 24 日 – 高强度重新攻击:在圣诞前夜,许多公司减少了安全人员配备,攻击者通过 IIS 工作进程 (w3wp.exe) 在与初始探测相同的端点上执行了完整的 RCE 链。
12月26日——事件发现:由于三天的时间差,12月20日的探测最初未能与后续恶意活动关联起来,因此该事件被标记为低优先级。事后分析表明,该探测是后续入侵的初始阶段。
12月20日的一次漏洞指纹识别请求标志着首次观察到与目标系统的交互。该请求源自与ONYPHE相关的基础设施。ONYPHE是一个互联网规模的攻击面发现和管理平台,用于识别暴露的资产、漏洞和网络威胁。与Shodan和Censys等广泛使用的工具不同,后者仅提供与已知漏洞的开源数据关联的面向互联网的资产列表,而ONYPHE则会实际检查目标系统是否存在漏洞。
使用 ONYPHE 进行指纹识别
请求特征与 ONYPHE 的漏洞检查方法一致,该方法使用主动式、非侵入式探测来识别易受特定 CVE 漏洞影响的互联网暴露系统。对于 ToolShell,ONYPHE 采用了 Niels Hofmans (hazcod) 使用的方法。也就是说,它尝试向目标服务器注入一个无害的标记,以确定其是否存在漏洞。
官方 Onyphe CVE 检查器(工具外壳)
此阶段是对通过 HTTP 公开的 SharePoint 执行界面进行验证的步骤:
目标系统通过 ASP.NET 管道处理结构化请求,没有出现拒绝的情况。
请求路径到达了能够处理序列化输入的应用程序逻辑。
在应用程序边界,没有任何防御控制措施中断或改变执行流程。
大约 12 分钟后,第二个入站连接来自与 Pfcloud UG 相关的基础设施,Pfcloud UG 是一家采用防弹托管 (BPH) 模式的服务提供商。鉴于连接时间以及该 IP 地址已知的扫描和滥用活动记录,该连接可能代表对新发现目标的后续侦察。目前尚未尝试进行任何攻击。
来自属于 Pfcloud UG BPH 的 IP 地址的连接
主要的恶意活动发生在12月24日。攻击者使用精心构造的请求攻击了同一台SharePoint主机,该请求来自45.91.94.204(45.91.92.0/22,ASN 63473,HostHatch, LLC)。这导致在IIS工作进程(w3wp.exe)中执行了一个Web Shell。有效载荷并未写入磁盘,而是直接加载到ASP.NET运行时环境中,并在后续请求处理过程中使用。该植入程序在受影响的应用程序域的生命周期内一直驻留。当应用程序池被回收或IIS重启时,这种运行时状态会丢失。
IP地址45.91.94.204是一个安全隐私网络(SPN)节点。SPN通过多层VPN路径路由每个连接,该路径具有多个中继节点,可以隐藏原始IP地址。
SPN 自称是一个能够为互联网流量提供强大隐私保护的网络。它的基础设施在很多方面与 Tor 类似,但也存在一些差异。它具备以下功能:
速度:接近 VPN 的性能,实现高速数据传输。
第 3 层支持:支持 TCP、UDP、ICMP 等多种协议(与仅支持 TCP 的 Tor 不同)。
应用路由:无需浏览器即可直接传输数据。
多身份:同时存在多个出口节点以绕过 IP 速率限制。
固定大小的数据包和填充使得分析其流量变得更加困难。
它不如 Tor 常见,并且经常绕过标准的 Tor 封锁列表。
攻击者注入到 w3wp.exe 运行时的 webshell 是一个多模块内存框架,其执行通过主组件 (G.cs) 进行协调,并通过跨命名空间的多个功能单元进行扩展。
该实现遵循模块化的 C# 项目结构,其中每个功能都被隔离到自己的编译单元中,并在运行时动态调用。
主要的 webshell 组件是 G.cs。它负责协调植入程序的执行上下文、生命周期、C2 和会话管理。
为了确保运行时持久性,G.cs 执行以下操作:
使用 ASP.NET HostingEnvironment 类中的非公开 RegisterVirtualPassProviderInternal 方法注册一个自定义的 VirtualPathProvider,以便 ASP.NET 使用它进行虚拟路径处理。该提供程序会自动添加到已注册的虚拟路径提供程序链中。
将提供程序的 .NET Remoting 生命周期策略委托给链中的前一个提供程序,从而保留现有的生命周期行为。
此外,为了规避防御措施,即使运行 webshell 的应用程序所在的 AppDomain 是预编译的,也能注册 VirtualPathProvider,该模块实现了信任控制子版本控制 (T1553) 技术:
使用反射来检查应用程序是否已预编译。
提取 BuildManager 类(用于管理应用程序编译)的内部状态字段的指针,并在运行时修改它们。
再次利用反射来强制运行时注入。
G.cs 使用 GetCacheKey() 函数作为虚拟路径处理流程的拦截点。它处理传入 SharePoint 服务器的请求,并检查请求头以过滤掉攻击者的请求。
请求头中的特定 User-Agent 会触发 webshell 的执行。如果请求不符合此条件,植入程序将保持休眠状态,使其流量更难被识别。
同一个核心模块(G.cs)实现了通信层。
该模块不依赖外部框架或标准信标,而是使用基于异或(XOR)混淆的自定义二进制协议与C2服务器交换数据。这些通信会融入正常的应用程序流量中。该模块使用GetCacheKey()钩子拦截标准的HTTP请求。当在请求头中检测到特定的User-Agent时,该模块会解析请求头,提取有效载荷,并在需要时与目标网络内的目标主机建立TCP连接。
双向 TCP 隧道初始化
G.cs 建立了一个全双工代理隧道以支持交互式控制。它将活动的目标套接字存储在内存中,以配对并发的 HTTP 读取和写入通道。
支持从 C2 服务器到目标网络内任意主机的 TCP 连接,以实现横向移动和枢轴攻击。流量通过 SharePoint 主机进行代理。
目标到攻击者的数据通道
攻击者到目标的数据通道
从截图中可以看出,攻击者使用了 suo5 工具来实现流量代理。该工具的开发者将其宣传为一款稳定的前向代理工具,适用于禁止出站互联网连接的场景。
为了提高性能,G.cs 通过提高线程池的并发操作限制和最大超时时间来操控线程池。
线程池操作
Prog.cs 是入口点,它接收命令行参数并将其传递给 uk/London.cs。后者充当协调器,负责处理命令解析和权限提升(通过命名管道模拟)。我们稍后会详细介绍它。如果提供了“suo5”命令,London.cs 会触发 G.cs 以内存 shell 的形式接入 ASP.NET 运行时。一旦激活,G.cs 便会在 Web 服务器内存中独立处理传入的 Web 流量。
以下模块提供直接的系统交互功能,每个模块都作为独立的单元实现。当 London.cs 从 Prog.cs 接收到相应的命令时,它会触发这些模块。
FileDownloader.cs 模块从 C2 提供的外部 URL 下载任意文件。它将下载的文件存储在程序数据目录中,无需任何用户交互。
该模块枚举已登录用户并识别其会话类型(交互式、服务、远程)。结果存储在内存中。攻击者可以利用 G.cs 提供的代理和隧道功能检索这些信息。
该模块列出正在运行的进程及其在磁盘上对应的可执行文件的完整路径。结果存储在内存中,攻击者可以通过 G.cs 检索这些信息。
该模块提取现有网络连接的信息,包括协议、本地和远程 IP 地址及端口以及连接状态。它还会枚举网络接口和报头。结果存储在内存中,攻击者可以通过 G.cs 检索这些结果。
该模块静默安装并执行之前由 FileDownloader.cs 下载的 MSI 包。
该模块使用原生 SAM RPC 子系统(SAMRPCNative 命名空间)而非标准命令行工具创建管理员帐户。这可能表明攻击者试图规避检测,并使其获得对目标系统的特权隐蔽访问权限,即使 Webshell 完成其工作后,这种访问权限仍然存在。
SAMRPCNative 命名空间实现了一个底层 C# P/Invoke 包装器,用于原生 Windows samlib.dll 库,包含三种类型:SAMStructs.cs、SAMMethods.cs 和 SAMEnums.cs。
实现结构化位列表和常量标志,将数字代码映射到 SAM 中的安全含义,并转换系统状态返回代码。
定义了 P/Invoke 内存对齐和封送所需的本地数据结构。它能够安全地格式化和对齐数据结构。
包含从 samlib.dll 导入的外部 API 声明(P/Invoke),用于执行诸如连接到 SAM 服务器、创建用户和打开域之类的操作。
这一层对攻击者至关重要,因为它能够进行账户操作。
uk 命名空间包含用于权限提升的攻击性原语。它使用本地令牌模拟技术,通过加密文件系统远程协议 (EFSRPC) 接口(该接口源自 EfsPotato 工具)将权限提升至 SYSTEM 级别。
此功能在 uk/London 类中实现。它会创建一个恶意命名管道,同时 EfsrTiny 类(EfsPotato 工具的精简版)连接到 LSASS.exe RPC 服务器。然后,London.RpcThread 函数会使用精心构造的 \\localhost 路径调用 EfsrTiny 中的 EfsRpcEncryptFileSrv 函数。这会诱使 LSASS.exe 连接回攻击者的命名管道。最后,London.Exp 函数使用 ImpersonateNamedPipeClient 强制并模拟 LSASS.exe 令牌,并通过 CreateProcessAsUser 创建一个具有 SYSTEM 权限的新进程。由于 Webshell 位于 IIS 工作进程中,因此它拥有执行此技术所需的 SeImpersonatePrivilege 权限。
英国命名空间还通过显式定义诸如 RPC_CLIENT_INTERFACE 和 MIDL_STUB_DESC 之类的结构,实现了一个最小化的 MSRPC 客户端层,从而模拟了一个接口存根。这使得可以直接与 Windows RPC 运行时 (Rpcrt4.dll) 交互,而无需依赖 MIDL 生成的存根或更高级别的 RPC 抽象。这提供了对绑定和封送的直接控制,超越了标准客户端 API 的限制。
在 Webshell 注入后不久,受感染的工作进程会生成 msiexec.exe 来安装托管在 Supabase 云存储中的远程 MSI 有效载荷。该有效载荷是 Velociraptor,一款开源的数字取证和事件响应工具——具体版本为 0.73.4.0,存在 CVE-2025-6264 漏洞——攻击者利用该漏洞在目标网络上执行命令。
2025年10月,思科Talos报告称,攻击者利用Velociraptor作为入侵后执行框架,并将此活动归因于Storm-2603。该工具能够执行任意命令,可用于多种用途。在本案例中,它被用于持久化、目标发现、数据收集和有效载荷执行。
攻击者利用 Velociraptor 部署了多个独立的隧道机制,包括用于未经授权远程访问的 Zoho Assist 无人值守支持、VS Code CLI 隧道、Cloudflare Tunnel 以及一个轻量级反向代理工具。通过这种方式,即使部分工具被检测并删除,他们也试图维持访问权限。此时,他们也不再依赖 IIS 工作进程生命周期和 ToolShell 漏洞。
一旦攻击者获得目标系统的访问权限,他们便能够上传一个存在漏洞的驱动程序,该驱动程序被许多攻击者用于终止 EDR 解决方案。我们在 C:\programdata\rsndispot.sys (054a32d6033b1744dca7f49b2e466ea2) 处检测到了该主驱动程序。此外,攻击者还通过侧载攻击使用了一个恶意 DLL (2d9ebf9c042f596f435865b40edad928)。该 DLL 被识别为 Warlock 勒索软件的杀毒程序。其目的可能是为了利用存在漏洞的 rsndispot.sys 驱动程序来终止安全解决方案。
攻击者试图在受感染的系统上运行勒索软件。然而,卡巴斯基安全软件的主动防御模块阻止了勒索软件进程,有效阻止了此次攻击。我们获取的恶意软件DLL文件被鉴定为Warlock勒索软件。
当攻击者尝试访问 ToolPane 时,动态编译的 App_Web_toolpane.aspx 程序集和 Microsoft.GeneratedCode 辅助程序集都存在于同一个应用程序域中。
这两个程序集在正常场景中都会被使用。App_Web_* 程序集是在正常的 ASP.NET 页面编译过程中生成的,而 Microsoft.GeneratedCode 通常由 XmlSerializer 在合法的序列化工作流程中生成。但是,如果向 ToolPane 终结点发出的请求导致在同一执行窗口中立即加载 Microsoft.GeneratedCode,则表明运行时正在处理通过该请求提供的序列化数据。
首先,强烈建议阅读这篇关于如何检测 CLR 中反序列化攻击尝试的文章(俄语),其中包含 YARA 规则示例和监控建议。检测逻辑的主要思想概述如下。
反序列化漏洞应被视为一种独特的攻击事件。在 CLR 中,反序列化不仅仅是将字节转换为值,而是从传入的数据流中重建对象图。序列化和反序列化由格式化程序执行。BinaryFormatter 是最常用的格式化程序之一。它使用 NRBF 格式,该格式将数据流定义为描述类、数组、基本类型以及对象之间引用的记录序列。最终对象图的形状取决于提供给反序列化程序的数据。这意味着输入数据流不仅定义了值,还定义了运行时必须实现的具体类型、关系和生命周期节点。
微软明确指出 BinaryFormatter 不安全且无法使其安全;从 .NET 9 开始,其内置实现实际上已从常规使用中移除。然而,由于 BinaryFormatter 功能强大且易于使用,微软仍然在其产品(包括 SharePoint)中继续使用它。要修复与 BinaryFormatter 相关的问题,需要进行架构更改。类似的警告也适用于其他相关的不安全机制,例如 LosFormatter(在存在漏洞的页面中使用)。
不安全反序列化的主要风险在于,CLR 可能会解析出意外类型,在常规构造函数不变量之外实例化对象,并调用特殊的生命周期机制,例如 ISerializable、IObjectReference、IDeserializationCallback 以及标记为 [OnDeserialized] 的方法。换句话说,攻击者控制的数据可以强制运行时构建一个包含具有可执行副作用的类型图。
因此,实用的检测策略应侧重于图构建工件。CLR 加载器事件可以识别相关的程序集和应用程序域。内存和元数据检查随后会揭示与可疑小工具链关联的类型名称和生成的序列化器结构。在类似 ToolShell 的场景中,不安全的反序列化通常会生成辅助程序集(加载器事件中的证据),其元数据包含完全限定的类型名称、小工具类名称以及已构建泛型类型的字符串表示形式(只需通过 YARA 扫描即可找到)。在本例中,需要查找的工件包括 Microsoft.GeneratedCode、App_Web_toolpane.aspx*(加载器事件中反序列化的证据)以及标识 ObjectDataProvider、ExpandedWrapper 和 LosFormatter 的字符串(输入流被反序列化为危险对象的证据)。请注意,这些指标单独来看意义不大;它们的价值在于表明运行时已接收到需要生成辅助代码来重建危险对象图的数据。
利用 ToolShell 等漏洞的 Gadget 对象可以通过 ysoserial.net/YSoNet 等语料库式工具轻松表示,这些工具聚合了已知的用于不安全 .NET 反序列化的 Gadget 链。出于防御目的,这些项目的价值不在于其攻击能力,而在于其类型和结构目录,这些类型和结构可以在流、内存和辅助程序集中进行搜索。内存或辅助程序集中存在的任何此类对象都应被视为漏洞利用的强烈信号。
为了简化反序列化漏洞利用检测,我们创建了一个名为 CLRDeserializationExploitFinder 的工具。它可以检测 ToolShell 漏洞利用尝试,以及 ysoserial.net 涵盖的其他 gadget 链。
基于 VirtualPathProvider 的机制应被视为一种独立的运行时植入程序(不涉及任何文件)。在 ASP.NET 中,`HostingEnvironment.RegisterVirtualPathProvider` 方法会在应用程序的编译系统中注册一个新的虚拟路径提供程序 (VPP)。注册后,应用程序可以在动态编译期间像处理普通磁盘页面一样处理虚拟路径。动态编译不需要有效负载以文件的形式存在于文件系统中。它完全在应用程序自身的信任边界内运行。编译过程中可能会生成临时文件,但这些文件不能作为可靠的取证证据。由于 VPP 也可用于合法用途,因此防御模型应首先对合法的 VirtualPathProvider 实现进行清点。在所有其他情况下,注册或使用新的 VPP 都应被视为异常行为。
要了解使用 ASP.NET、IIS 和 CLR 动态生成虚拟页面的工作原理,以及如何检测此类活动,请使用我们的 VirtualPathProvider Lab 项目。
对于此技术而言,最有用的遥测数据源是 Microsoft-Windows-IIS-Configuration ETW 提供程序。要检测虚拟路径,事件 25 和 47 至关重要。事件 25 记录 ConfigPath 到 PhysicalPath 的映射,事件 47 记录配置路径到目录的映射。对于 VPP 支持的路径,这些事件会造成不一致:IIS 和 ASP.NET 的行为如同该路径具有物理表示,而相应的文件实际上并不存在于磁盘上。在 VirtualPathProvider Lab 提供的示例中,这表现为将虚拟资源 googlecheck.aspx 映射到一个物理路径,但该路径上并不存在实际文件。配置解析与文件系统实际情况之间的这种差异是虚拟内容的主要指标。
第二个指标负面多于正面。对于磁盘支持的文件,IIS 通常会创建一个 FileChangeNotificationMonitor 链,如事件 17、18、19 和 21 所示。对于由自定义 VirtualPathProvider 服务的虚拟路径,由于没有物理对象或相应的磁盘更改生命周期,因此该链不存在或与普通文件的正常情况不符。因此,对于同一路径,如果存在正面事件 25 和 47,而预期事件 17、18、19 和 21 缺失,则构成一个可靠的检测模式:该路径作为配置解析资源存在于 IIS 中,但它没有文件系统支持,也没有正常的磁盘文件更改监视。
总而言之,此处的搜索目标是 IIS/ASP.NET 解析资源的方式与磁盘上和变更监视链中实际存在的资源之间的差异。对于已知应用程序,可以通过合法的 VirtualPathProvider 实现的允许列表来筛选此类情况。任何其他情况都应视为潜在的运行时植入程序,并使用 ETW、文件系统验证和 w3wp.exe 进程的内存检查进行调查。
微软将Storm-2603追踪为一个独立的威胁组织,目前尚未发现其与其他组织存在关联。尽管微软在评估该组织动机方面持谨慎态度,但他们提到该组织此前曾利用本地SharePoint漏洞部署Warlock和LockBit勒索软件。在本次分析的事件中,我们观察到了类似的SharePoint漏洞利用活动,以及与Warlock勒索软件相关的EDR清除程序和Warlock勒索软件的未成功启动尝试。
其他已记录的入侵案例表明,Storm-2603 利用边界邮件网关中的已知漏洞获取初始访问权限,随后部署具有提升权限的 Velociraptor 框架,并通过商业远程管理软件建立持久加密隧道,从而协调后续的横向移动。这与我们在本案例中观察到的后渗透行为相符。结合 ToolShell 的利用场景,我们可以较为肯定地将此案例归因于 Storm-2603。
本文分析的事件表明,主要的防御教训是,利用面向互联网的 SharePoint 服务器可以直接在应用程序信任边界内执行无文件代码。Storm-2603 不需要传统的投放器、持久服务或暴露的 C2 端点;相反,它在 w3wp.exe 内部部署了一个 webshell,攻击者可以利用该 webshell 进行隧道传输、权限提升、凭据访问和横向移动。因此,检测策略需要超越基于文件的 webshell 检测,转向运行时行为,例如 w3wp.exe 的异常活动、意外的出站连接、RPC 强制执行、令牌模拟以及应用程序被攻破后引入远程管理或数字取证与事件响应 (DFIR) 工具。
为了正确归因恶意活动并制定适当的应对措施,防御者应重建跨应用程序、主机和身份层的执行链和时间关系。他们还应保留内存和 IIS 遥测数据,并将低信号侦察与后续特权活动关联起来,而不是孤立地评估事件。一旦确认 SharePoint 漏洞利用并执行了代码,则应触发主机级隔离、持久性查找、凭据和暴露的 MachineKey 轮换以及基于 TTP 的调查,而不是仅限于初始漏洞利用或已知 IOC 的修复。
卡巴斯基产品能够检测到本文中提到的威胁,具体如下:
Trojan.MSIL.Agent.gen
Trojan.Win64.DLLhijack.cdp
微软 SharePoint
漏洞和利用
SOC 文件 5:管道中的幽灵,还是 Storm-2603 发起的无文件 SharePoint 入侵?
本网站使用 Akismet 来减少垃圾邮件。了解您的评论数据如何处理。
出自同一作者之手
基于证书的 TGT 请求中的异常检测
CLR 中的检测规避以及如何检测此类攻击的技巧
同一类别
愤怒的小鸟:玩具总动员的新玩具
对巴西教育机构事件的分析
风险降低新定义:入侵评估如何帮助加强网络防御
来自暗网洞穴的低语:中东的网络威胁
深入剖析去年最有趣的事件响应案例