# 无文件恶意软件

**无文件恶意软件**（fileless malware）是指不把恶意代码写入文件系统、而在计算机内存中运行，或滥用 [PowerShell](https://www.edgepedia.org/zh/powershell)、Windows 管理规范（WMI）等合法可信系统工具的恶意代码。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup><sup> • </sup><sup>[2](https://cyberdefenders.org/cybersecurity-glossary/fileless-malware)</sup> 这个术语之不精确是公认的：无文件恶意软件有时也有文件，而这个标签从 2001 年纯粹驻留内存的蠕虫，一路延伸到 2020 年代那些依赖文件系统来激活或持久化的攻击活动。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 把这些威胁联系在一起的，是对基于文件的特征码检测的规避；正因如此，内存取证与行为分析在相关检测研究中占据主导地位。<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 不在文件系统上放置恶意代码而运作的恶意软件。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup><sup> • </sup><sup>[4](https://www.malwarebytes.com/blog/news/2018/08/fileless-malware-getting-the-lowdown-on-this-insidious-threat)</sup> |
| 首次得名 | 2001 年夏，卡巴斯基实验室援引尤金·卡巴斯基（Eugene Kaspersky）的预测，称“红色代码”（Code Red）这类“无文件”蠕虫将大范围流行。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> |
| 微软的分类 | I 型（无文件活动）、II 型（间接文件活动，如 WMI 存储库）、III 型（运行需要文件，如 Kovter）。<sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup> |
| 特征码难题 | 无文件恶意软件可能避开传统的基于文件的特征码检测，但脚本和驻留内存的载荷仍可通过内存扫描等手段检出。<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)</sup><sup> • </sup><sup>[22](https://www.microsoft.com/en-us/security/blog/2018/09/27/out-of-sight-but-not-invisible-defeating-fileless-malware-with-behavior-monitoring-amsi-and-next-gen-av/)</sup> |
| 普遍程度 | ReliaQuest《2024 年度威胁报告》发现，2023 年与重大事件相关的检出中，无文件恶意软件占 86.2%。<sup>[6](https://www.sciencedirect.com/science/article/pii/S2666281726000697)</sup> |
| 主要分析方法 | 内存取证：捕获并分析易失性内存（RAM），以重建进程活动、注入代码与网络交互。<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)</sup><sup> • </sup><sup>[7](https://www.itpro.com/security/what-is-memory-forensics)</sup> |
| ATT&CK 覆盖 | 无文件存储作为子技术 T1027.011（混淆文件或信息）被跟踪，涵盖 Windows 注册表、事件日志、WMI 存储库和 Linux 共享内存目录。<sup>[8](https://attack.mitre.org/techniques/T1027%2F011/)</sup> |

## 定义与范围

多数研究人员和厂商采用的工作定义是：不在文件系统上放置恶意代码而运作的恶意软件。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 在最纯粹的形式中，载荷被设计为仅驻留内存，却仍可能留下取证痕迹，这使感染后的取证变得困难，也对传统杀毒软件的特征码构成挑战。<sup>[4](https://www.malwarebytes.com/blog/news/2018/08/fileless-malware-getting-the-lowdown-on-this-insidious-threat)</sup><sup> • </sup><sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup> 在实践中，这一术语还涵盖以恶意脚本或磁盘上的良性可执行文件为起点的感染，以及把痕迹存放在 [Windows 注册表](https://www.edgepedia.org/zh/windows-registry)中的样本——尽管注册表内容本身也是保存在磁盘上的。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup>

微软的参考分类把无文件威胁分为三类。I 型不进行任何文件活动：通过网络投递的代码（例如借助“永恒之蓝”漏洞利用程序安装的 DoublePulsar 后门）只驻留在内核内存中；而驻留在 BIOS、USB 外设或网卡固件中的代码，可以经受重启和磁盘格式化而存活。<sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup> II 型间接使用文件：POSHSPY 后门把一条恶意 PowerShell 命令存放在 WMI 存储库中——这是一个物理文件，却是个多用途容器，实际上无法被检测和清除。<sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup> III 型需要文件才能运作：Kovter 在注册表中为一个随机文件扩展名创建外壳“打开”操作处理程序，并释放包含垃圾数据的文件，因此文件系统对于核实这一威胁实际上毫无用处。<sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup>

## 历史

驻留内存的恶意代码这一概念早于这个术语出现，但该说法进入大众语汇是在 2001 年夏，卡巴斯基实验室发布公告，援引[尤金·卡巴斯基](https://www.edgepedia.org/zh/eugene-kaspersky)的预测：像“红色代码”这样的“无文件”蠕虫将成为最普遍的恶意程序形式之一。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> “红色代码”利用微软 IIS Web 服务器的一个漏洞，并且只驻留在受感染主机的内存中。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 2003 年，通过利用微软 SQL 服务器漏洞传播的 [SQL Slammer](https://www.edgepedia.org/zh/sql-slammer) 被描述为“无文件”的，并且“只存在于内存中，与'红色代码'十分相似”。2003 年，当时任职于赛门铁克（Symantec）的彼得·索尔（Peter Szor）提交的一项专利申请，把无文件恶意软件定义为“不以文件为基础、只存在于内存中的恶意代码”。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup>

**持久化改变了局面。** 纯粹驻留内存的样本一重启就消失了。2014 年，Poweliks 展示了无需文件的持久化恶意软件：它的 Run 注册表键调用合法的 Windows 可执行文件 rundll32.exe，传入的参数中包含一段 [JavaScript](https://www.edgepedia.org/zh/javascript) 代码，把 Poweliks 载入内存。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 2015 年引起关注的 Kovter，在把经过混淆的痕迹存入注册表之后删除了自己的初始可执行文件，并用 PowerShell 执行 shellcode。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 2017 年，曼迪昂特（Mandiant）描述了 POSHSPY——一个 APT29 的后门，它同时用 WMI 存放代码和实现持久化，并依靠 PowerShell 承载载荷，因此被利用的只有合法的系统进程，恶意执行只能通过增强日志或在内存中才能识别出来。<sup>[9](https://cloud.google.com/blog/topics/threat-intelligence/dissecting-one-ofap/)</sup>

## 就地取材

无文件攻击与“就地取材”（living off the land）技术高度重叠，后者指滥用系统中已有的合法管理工具，如今由 LOLBAS 项目编目收录。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> 这两个概念并不等同：无文件描述的是恶意代码是否接触过磁盘，而 LOLBin 指的是攻击者滥用了哪一个合法工具。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup>

2019 年的 Astaroth 攻击活动从头到尾展示了这一模式。一个鱼叉式网络钓鱼链接指向一个 LNK 文件，该文件用 /Format 参数运行 WMIC 以下载并执行 JavaScript；JavaScript 用 Bitsadmin 下载载荷；Certutil 对其解码；Regsvr32 加载解码后的 DLL；最终，Astaroth 信息窃取程序被注入 Userinit 进程。正如微软研究人员所指出的，在整个攻击链中，没有任何一个环节运行过非系统工具的文件。<sup>[10](https://www.microsoft.com/en-us/security/blog/2019/07/08/dismantling-a-fileless-campaign-microsoft-defender-atp-next-gen-protection-exposes-astaroth-attack/)</sup> 2023 年 5 月，网络安全和基础设施安全局（CISA）、国家安全局（NSA）、联邦调查局（FBI）及国际合作伙伴发布联合公告，描述一个中国政府支持的行为体如何利用 Windows 内置网络管理工具实施就地取材技术，混入日常活动之中，以避开端点检测与响应产品。<sup>[11](https://www.cisa.gov/news-events/alerts/2023/05/24/cisa-and-partners-release-cybersecurity-advisory-guidance-detailing-prc-state-sponsored-actors?rand=11274)</sup>

PowerShell 是这类技术的主力。无文件恶意软件主要依赖 PowerShell 脚本，借助 Windows 原生能力实施攻击；这类攻击仍可能留下取证痕迹，例如事件日志条目，以及内存、注册表或 WMI 中的痕迹——这一模式自 2017 年以来在挖矿劫持中尤为突出。<sup>[12](https://arxiv.org/abs/2401.07995)</sup><sup> • </sup><sup>[5](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)</sup> WMI 在整个攻击生命周期中被用于侦察、检测杀毒软件与虚拟机、执行代码、横向移动和持久化。<sup>[13](https://link.springer.com/article/10.1186/s42400-019-0043-x)</sup>

## 检测与分析

基于特征码的杀毒软件在结构上就与这类威胁不匹配：无文件恶意软件可能避开传统的基于文件的特征码，但脚本和驻留内存的载荷仍可被检出，包括通过内存扫描。<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)</sup> 实证结果印证了这一点。一项针对名为 JSLess 的无文件 JavaScript 恶意软件的研究发现，它绕过了该研究纳入的全部反恶意软件检测工具。<sup>[14](https://arxiv.org/abs/1911.11276)</sup> 2021 年，巴尔-史密斯（Barr-Smith）及其同事对 10 款有代表性的杀毒产品进行了无文件攻击检测测试，随后又对 70 多篇关于无文件攻击检测的学术文献做了系统综述。<sup>[15](https://www.sciencedirect.com/science/article/pii/S016740482300562X)</sup>

**内存取证是首要的对策。** 由于恶意代码从不接触磁盘，调查人员会抓取易失性内存（RAM）的快照并加以分析。内存取证能回答磁盘取证无法回答的问题，例如在失陷那一刻正在执行哪些命令、正在访问哪些数据；它还能揭露根工具包和无文件恶意软件这类驻留内存的威胁。<sup>[7](https://www.itpro.com/security/what-is-memory-forensics)</sup> 卡拉（Kara）2023 年发表于《专家系统与应用》（*Expert Systems with Applications*）的综述提出了一种基于内存的无文件恶意软件检测与分析方法，并在一个真实案例中作了演示。<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)</sup> 近期研究把机器学习应用于内存：从易失性内存中提取的取证特征与行为特征序列，能够捕捉无文件攻击所特有的瞬时进程活动、驻留内存的模块行为和短时网络交互。<sup>[16](https://ieeexplore.ieee.org/abstract/document/11459092)</sup> 行为检测同样有效：Microsoft Defender ATP 通过 WMIC 使用中的遥测异常、行为监控引擎和攻击面缩减规则，揭露了 Astaroth 攻击活动，这支持了“无文件并不等于无法检测”的论点。<sup>[10](https://www.microsoft.com/en-us/security/blog/2019/07/08/dismantling-a-fileless-campaign-microsoft-defender-atp-next-gen-protection-exposes-astaroth-attack/)</sup>

取证可见性仍不完整。一项对 49 起已确认的无文件入侵的实证分析，把痕迹留存上的缺口追溯到其取证采集机制，并将观察到的留存率与先前的三个检测框架相比较，发现已发布的指南并未转化为实际运行中的采集实践。<sup>[6](https://www.sciencedirect.com/science/article/pii/S2666281726000697)</sup>

## 普遍程度与重要事件

对普遍程度的量化估计因测量方法而异。根据波耐蒙研究所（Ponemon Institute）的《终端安全风险状况报告》，2017 年 77% 的失陷事件涉及无文件技术，而这类攻击的成功率是其他攻击的十倍。<sup>[17](https://www.malwarebytes.com/blog/explained/2021/10/what-is-fileless-malware)</sup> ReliaQuest《2024 年度威胁报告》认为，2023 年与重大事件相关的检出中，无文件恶意软件占 86.2%。<sup>[6](https://www.sciencedirect.com/science/article/pii/S2666281726000697)</sup> 相比之下，Castellum Labs《2025 年度威胁报告》把无文件恶意软件列为其跟踪威胁版图的 6%，这反映出各厂商对这一类别的界定差异之大。<sup>[18](https://www.castellumlabs.com/wp-content/uploads/2026/02/Castellumlabs-Annual-Threat-Report-2025-Executive-Summary.pdf)</sup>

这一技术已从定向攻击和高级持续性威胁扩散到常规恶意软件，包括木马、勒索软件和加密货币挖矿程序。<sup>[19](https://www.sans.org/white-papers/38960)</sup> 2025 年，比特梵德（Bitdefender）报告了 EggStreme——一个此前未见过的无文件恶意软件框架，由与中国有关的威胁行为体用于攻击一家菲律宾军事公司；这套由六个组件构成的工具集把恶意代码直接注入内存并使用 DLL 侧加载，组件从初始加载器一直到支持 58 条命令的后门植入体和键盘记录器。<sup>[20](https://www.techradar.com/pro/security/china-related-threat-actors-deployed-a-new-fileless-malware-against-the-philippines-military)</sup> LevelBlue 2025 年的一份报告记录了一起真实事件：PowerShell 与 [VBScript](https://www.edgepedia.org/zh/vbscript) 链条在不留下磁盘痕迹的情况下投递了 AsyncRAT 远程访问木马，其间使用了 AMSI 和 ETW 绕过，并通过计划任务实现持久化。<sup>[21](https://www.levelblue.com/resources/research-reports/2025-threat-trends-report-edition-one-levelblue/)</sup>

## 这个术语为何长盛不衰

这个术语从“红色代码”纯粹的内存存在，一路被拉伸到 2020 年代的就地取材攻击活动，累积出多个相互重叠的定义，并在 [MITRE ATT&CK](https://www.edgepedia.org/zh/mitre-att-and-ck) 中获得正式收录；尽管如此，作者和厂商仍然觉得它有助于描述那些规避传统检测的威胁。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup> [谷歌趋势](https://www.edgepedia.org/zh/google-trends)（Google Trends）数据显示，人们对这一术语的关注在 2017 年前后出现高峰，到 2026 年初又攀升至新高。<sup>[1](https://zeltser.com/fileless-malware-beyond-buzzword)</sup>

## References

1. [The History of Fileless Malware - Looking Beyond the Buzzword, Lenny Zeltser](https://zeltser.com/fileless-malware-beyond-buzzword)
2. [What Is Fileless Malware?, CyberDefenders glossary](https://cyberdefenders.org/cybersecurity-glossary/fileless-malware)
3. [Ilker Kara (2023). Fileless malware threats: Recent advances, analysis approach through memory forensics and research challenges. Expert Systems with Applications, Vol. 214, Article 119133.](https://www.sciencedirect.com/science/article/abs/pii/S0957417422021510)
4. [Vasilios Hioureas (2018). Fileless malware: getting the lowdown on this insidious threat. Malwarebytes Labs.](https://www.malwarebytes.com/blog/news/2018/08/fileless-malware-getting-the-lowdown-on-this-insidious-threat)
5. [Fileless threats, Microsoft Defender for Endpoint documentation, Microsoft Learn](https://learn.microsoft.com/en-us/defender-endpoint/malware/fileless-threats)
6. [Forensic visibility gaps in fileless malware incidents: An empirical analysis of artefact survival rates across 49 confirmed intrusions, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S2666281726000697)
7. [What is memory forensics?, ITPro](https://www.itpro.com/security/what-is-memory-forensics)
8. [Obfuscated Files or Information: Fileless Storage, Sub-technique T1027.011, MITRE ATT&CK](https://attack.mitre.org/techniques/T1027%2F011/)
9. [Matthew Dunwoody (2017). Dissecting One of APT29's Fileless WMI and PowerShell Backdoors (POSHSPY). Mandiant / Google Cloud Blog.](https://cloud.google.com/blog/topics/threat-intelligence/dissecting-one-ofap/)
10. [Andrea Lelli (2019). Dismantling a fileless campaign: Microsoft Defender ATP's Antivirus exposes Astaroth attack. Microsoft Security Blog.](https://www.microsoft.com/en-us/security/blog/2019/07/08/dismantling-a-fileless-campaign-microsoft-defender-atp-next-gen-protection-exposes-astaroth-attack/)
11. [CISA and Partners Release Cybersecurity Advisory Guidance detailing PRC state-sponsored actors evading detection by "Living off the Land" (May 24, 2023)](https://www.cisa.gov/news-events/alerts/2023/05/24/cisa-and-partners-release-cybersecurity-advisory-guidance-detailing-prc-state-sponsored-actors?rand=11274)
12. [The Pulse of Fileless Cryptojacking Attacks: Malicious PowerShell Scripts, arXiv:2401.07995](https://arxiv.org/abs/2401.07995)
13. [An emerging threat Fileless malware: a survey and research challenges, Cybersecurity (Springer Nature)](https://link.springer.com/article/10.1186/s42400-019-0043-x)
14. [JSLess: A Tale of a Fileless Javascript Memory-Resident Malware, arXiv:1911.11276](https://arxiv.org/abs/1911.11276)
15. [A survey on the evolution of fileless attacks and detection techniques, Computers & Security (ScienceDirect)](https://www.sciencedirect.com/science/article/pii/S016740482300562X)
16. [Detecting Fileless Malware Through Memory Forensics with Recurrent Neural Networks, IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/11459092)
17. [What is fileless malware?, Malwarebytes Labs (2021)](https://www.malwarebytes.com/blog/explained/2021/10/what-is-fileless-malware)
18. [Castellum Labs Annual Threat Report 2025, Executive Summary](https://www.castellumlabs.com/wp-content/uploads/2026/02/Castellumlabs-Annual-Threat-Report-2025-Executive-Summary.pdf)
19. [Hunting for Ghosts in Fileless Attacks, SANS Institute](https://www.sans.org/white-papers/38960)
20. [China-related threat actors deployed a new fileless malware against the Philippines military, TechRadar (2025)](https://www.techradar.com/pro/security/china-related-threat-actors-deployed-a-new-fileless-malware-against-the-philippines-military)
21. [LevelBlue Threat Spotlight Report, AsyncRAT in Action: Evading Defenses with Fileless Malware Techniques](https://www.levelblue.com/resources/research-reports/2025-threat-trends-report-edition-one-levelblue/)
22. [Out of sight but not invisible: Defeating fileless malware with behavior monitoring, AMSI, and next-gen AV, Microsoft Security Blog](https://www.microsoft.com/en-us/security/blog/2018/09/27/out-of-sight-but-not-invisible-defeating-fileless-malware-with-behavior-monitoring-amsi-and-next-gen-av/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Malware and endpoint threats › Malware by platform and type

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fileless-malware

English original: https://www.edgepedia.org/fileless-malware
