Karneades/awesome-malware-persistence
GitHub: Karneades/awesome-malware-persistence
一个系统收录跨平台恶意软件持久化技术、检测与清除工具的精选资源列表。
Stars: 279 | Forks: 20
# 恶意软件持久化精选列表 [](https://github.com/sindresorhus/awesome)
恶意软件持久化包含 adversaries(攻击者)用来在系统重启、更改凭据以及其他可能切断其访问的中断情况下保持对系统访问权限的技术。用于持久化的技术包括任何让他们能够在系统上保持立足点的访问、操作或配置更改,例如替换或劫持合法代码,或添加启动代码。
[关于恶意软件持久化的主要文章](https://github.com/Karneades/malware-persistence/blob/master/README.md)提供了更多背景和信息。
## 目录
* [技术](#techniques)
* [通用](#generic)
* [Linux](#linux)
* [macOS](#macos)
* [Windows](#windows)
* [云](#cloud)
* [固件](#firmware)
* [数据库](#databases)
* [持久化清除](#persistence-removal)
* [通用](#generic-1)
* [Windows](#windows-1)
* [检测测试](#detection-testing)
* [通用](#generic-2)
* [Linux](#linux-1)
* [macOS](#macos-1)
* [Windows](#windows-2)
* [预防](#prevention)
* [macOS](#macos-2)
* [收集](#collection)
* [通用](#generic-3)
* [Linux](#linux-2)
* [macOS](#macos-3)
* [Windows](#windows-3)
## 技术
_持久化技术与检测。_
### 通用
* [MITRE ATT&CK 战术 "TA0003 - 持久化"](https://attack.mitre.org/tactics/TA0003/) - MITRE ATT&CK 框架中的持久化战术信息。
* [取证工件仓库](https://github.com/ForensicArtifacts/artifacts) - 一个免费的、社区 sourced 的、机器可读的数字取证工件知识库。
* [Sigma 规则](https://github.com/Neo23x0/sigma/tree/master/rules) - 检测规则仓库,也涵盖了持久化技术。你甚至可以使用过滤器,如 `--filter tag=attack.persistence` 或专门针对某项技术的 `tag=attack.t1084`。
### Linux
* [使用 Cron 的 Linux 恶意软件持久化](https://www.sandflysecurity.com/blog/linux-malware-persistence-with-cron/) - 关于使用 cron jobs 实现 Linux 持久化的博客文章。
* [Linux 持久化技术](https://research.splunk.com/stories/linux_persistence_techniques/) - 持久化技术列表。
* [Linux 红队持久化技术](https://www.linode.com/docs/guides/linux-red-team-persistence-techniques/) - 持久化技术列表。
* [PANIX - 针对 *NIX 的持久化 - 特性](https://github.com/Aegrah/PANIX?tab=readme-ov-file#features) - 持久化技术列表。
* [Linux 检测工程 - 持久化机制入门](https://www.elastic.co/security-labs/primer-on-persistence-mechanisms) - Linux 持久化机制列表。
* [ebpfkit](https://github.com/Gui774ume/ebpfkit) - 利用 eBPF 的 Rootkit。
* [TripleCross](https://github.com/h3xduck/TripleCross) - 利用 eBPF 的 Rootkit。
* [Linux LKM 持久化](https://righteousit.com/2024/11/18/linux-lkm-persistence/) - 利用 Linux 可加载内核模块 (LKM) 的 Rootkit。
### macOS
* [theevilbit 的系列 "超越传统的 LaunchAgents"](https://theevilbit.github.io/tags/beyond/) - 超越 LaunchDaemons 或 LaunchAgents 的 macOS 持久化技术列表。
* [KnockKnock](https://github.com/objective-see/KnockKnock/blob/main/Plugins) - 用于扫描 macOS 上持久化机制的 macOS 持久化检测工具。特定的持久化位置可以在 [plugins](https://github.com/objective-see/KnockKnock/tree/main/Plugins) 文件夹中找到,例如 [LaunchItems](https://github.com/objective-see/KnockKnock/blob/main/Plugins/LaunchItems.m#L21) 或 [StartupScripts](https://github.com/objective-see/KnockKnock/blob/main/Plugins/StartupScripts.m#L22)。
* [PoisonApple](https://github.com/CyborgSecurity/PoisonApple/blob/master/poisonapple/techniques.py) - 通过查看 PoisonApple 的源代码来了解各种 macOS 持久化技术。
* [恶意软件如何在 macOS 上持久化](https://www.sentinelone.com/blog/how-malware-persists-on-macos/) - macOS 持久化机制列表。
### Windows
* [Hexacorn 的博客](http://www.hexacorn.com/blog/category/autostart-persistence/) - 博客系列 "超越传统的 Run 键",涵盖了大量 Windows 持久化机制。
* [Autoruns](https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns) - 你可以通过查看你自己客户端上 Autoruns 的输出来了解检查了哪些 Windows 持久化机制。输出中会显示类别和发现内容的不同位置。Autoruns 的反汇编列出了所扫描条目的一个子集。
* [Autoruns 的 PowerShell 实现](https://github.com/p0w3rsh3ll/AutoRuns/blob/master/AutoRuns.psm1) - 查找 Windows 持久化位置的另一种方法是查看 Autoruns PowerShell 版本的源代码。额外福利:在每个 Autoruns 版本涵盖的持久化位置的历史记录可以在模块文件的末尾找到,这真是太棒了!
* [常见的恶意软件持久化机制](https://resources.infosecinstitute.com/common-malware-persistence-mechanisms/) - 描述了不同向量的不同持久化机制。
* [恶意软件持久化技术](https://www.andreafortuna.org/2017/07/06/malware-persistence-techniques/) - 对多种持久化机制的良好总结,从多个注册表键到更高级的机制,如 COM 劫持。
* [检测和移除攻击者的 WMI 持久化](https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96) - 关于检测和移除 WMI 持久化的博客文章。
* [使用 WinLogon 的 Windows 持久化](https://www.hackingarticles.in/windows-persistence-using-winlogon/) - 关于滥用 WinLogon 的博客文章。
* [理清 Kovter 的持久化方法](https://blog.malwarebytes.com/threat-analysis/2016/07/untangling-kovter/) - 关于 Kovter 持久化方法的博客文章,其中包括隐藏在注册表中。另一篇是 [威胁聚焦:Kovter 恶意软件无文件持久化机制](https://threatvector.cylance.com/en_us/home/threat-spotlight-kovter-malware-fileless-persistence-mechanism.html)。
* [在映像文件执行选项中使用 GlobalFlags 实现持久化 – 对 Autoruns.exe 隐藏](https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/) - 关于滥用 GlobalFlag 进行进程执行的博客文章。
* [通过托管检测和响应 uncovering 具有引导程序持久化的 MyKings 变体](https://blog.trendmicro.com/trendlabs-security-intelligence/uncovering-a-mykings-variant-with-bootloader-persistence-via-managed-detection-and-response/) - 关于引导程序持久化的博客文章。
* 关于 COM/CLSID 劫持的各种博客文章
* [COM 对象劫持:隐蔽的持久化方式,2014](https://www.gdatasoftware.com/blog/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence)
* [持久化 – COM 劫持,2020](https://pentestlab.blog/2020/05/20/persistence-com-hijacking/)
* [结合计划任务滥用 COM 劫持,2016](https://enigma0x3.net/2016/05/25/userland-persistence-with-scheduled-tasks-and-com-handler-hijacking/)
* [通过 Microsoft Exchange Server 或 Outlook 寻找持久化](https://speakerdeck.com/heirhabarov/hunting-for-persistence-via-microsoft-exchange-server-or-outlook) - 关于 Microsoft Exchange 服务器持久化的博客文章。
### 云
* [影子链接:SaaS 身份威胁的持久化向量](https://www.obsidiansecurity.com/blog/shadow-linking-the-persistence-vector-of-saas-identity-threat/) - 滥用附加身份提供商以在环境中持久化。
* [使用联合凭据在 Entra ID 应用程序和用户托管标识上持久化](https://dirkjanm.io/persisting-with-federated-credentials-entra-apps-managed-identities/) - 使用联合凭据在 Entra ID 应用程序和用户托管标识上持久化。
* [AWSDoor:AWS 上的持久化](https://github.com/OtterHacker/AWSDoor) - AWS 的访问持久化工具。[相关文章](https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/)描述了 adversaries 可用来将自己隐藏在云环境中的技术,以及其 AWSDoor 实现,以简化和自动化在 AWS 环境中部署持久化技术。
### 固件
* [MoonBounce:UEFI 固件的黑暗面](https://securelist.com/moonbounce-the-dark-side-of-uefi-firmware/105468) - 关于一种特定 UEFI bootkit 的深入分析文章。
### 数据库
* [作为持久化机制的数据库触发器](https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/the-attack-vector-database-triggers-as-persistence-mechanisms/) - 关于提供持久化的数据库触发器的深入分析文章。
## 持久化清除
_用于清除持久化机制的工具和命令。除了下面提到的工具外,使用标准的 OS 命令来清除持久化。_
### 通用
* [Awesome Incident Response](https://github.com/meirwah/awesome-incident-response) - 使用这些用于安全事件响应的工具和资源,旨在帮助安全分析师和 DFIR 团队。
### Windows
* [PowerSponse](https://github.com/swisscom/PowerSponse) - 一个事件响应工具,也包含用于清理持久化机制的各种命令。
* [移除后门 – Powershell Empire 版](https://www.n00py.io/2017/01/removing-backdoors-powershell-empire-edition/) - 各种处理 WMI 植入物移除的博客文章。
* [RegDelNull](https://docs.microsoft.com/en-us/sysinternals/downloads/regdelnull) - 移除带有空字节的注册表键 - 例如用于运行键以进行规避。
## 检测测试
_用于测试检测的工具。使用 [持久化技术](#persistence-techniques) 中描述的技术来创建这些文件,或手动添加配置更改以测试你的检测。_
### 通用
* [Atomic Red Team](https://github.com/redcanaryco/atomic-red-team) - 一个红队攻击技术框架,也支持 MITRE ATT&CK 持久化技术,参见例如 [T1044 "文件系统权限弱点"](https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1044/T1044.yaml)。
### Linux
* [PANIX](https://github.com/Aegrah/PANIX) - 一个高度可定制的 Linux 持久化工具。针对 Linux 系统执行各种持久化技术,其中包括 Debian 和 RHEL。
* [Diamorphine](https://github.com/m0nad/Diamorphine) - 适用于 Linux 内核 (x86/x86_64 和 ARM64) 的可加载内核模块 (LKM) rootkit。
### macOS
* [PoisonApple](https://github.com/CyborgSecurity/PoisonApple) - 在 macOS 上执行各种持久化技术。
### Windows
* [hasherezade 持久化演示](https://github.com/hasherezade/persistence_demos) - 恶意软件使用的各种(也包括非标准的)持久化方法,用于测试自己的检测,仓库中包含了 COM 劫持演示等。
## 预防
_用于预防恶意持久化的工具。_
### macOS
* [BlockBlock](https://github.com/objective-see/BlockBlock) - 通过监控持久化位置并相应地对其进行保护来提供持续保护的工具。类似于 KnockKnock,但用于阻止。
## 收集
_用于持久化收集的工具。_
### 通用
* [Awesome Forensics](https://github.com/Cugu/awesome-forensics) - 使用此列表中的工具,其中包含了很棒的免费(主要是开源的)取证分析工具和资源。它们有助于大规模收集持久化机制,例如通过使用远程取证工具。
* [osquery](https://osquery.readthedocs.io) - 在客户端上查询持久化机制。
* [OSSEC](https://github.com/ossec/ossec-hids) - 使用来自 HIDS 的规则和日志来检测配置更改。
### Linux
_据我所知,目前没有专门的 Linux 持久化收集工具。请使用 #General 中的一些工具或标准的 OS 命令进行收集。感谢您贡献 Linux 特定的持久化收集工具的链接。_
* [Linux 安全和监控脚本](https://github.com/sqall01/LSMS) - 你可以使用安全和监控脚本来监控你的 Linux 安装是否存在与安全相关的事件或用于调查。其中包括发现用于恶意软件持久化的 systemd 单元文件。
### macOS
* [KnockKnock](https://www.objective-see.com/products/knockknock.html) - 一个用于揭示持久安装的软件以通用地揭示此类恶意软件的工具。参见 [GitHub 仓库获取源代码](https://github.com/objective-see/KnockKnock)。
* [Dylib 劫持扫描器或 DHS](https://www.objective-see.com/products/dhs.html) - 一个简单的实用程序,用于扫描你的计算机以查找容易受到 dylib 劫持或已被劫持的应用程序。参见 [GitHub 仓库获取源代码](https://github.com/objective-see/DylibHijackScanner)。
### Windows
* [Autoruns](http://technet.microsoft.com/en-us/sysinternals/bb963902) - Windows 上强大的持久化收集工具是 Autoruns。它从实时系统以及[以有限的方式从离线映像](https://www.sans.org/blog/offline-autoruns-revisited-auditing-malware-persistence/)中收集不同的类别和持久化信息。它有一个 UI 和一个命令行程序,输出格式可以设置为 CSV,然后可以将其导入到你选择的日志收集系统中。
* [AutorunsToWinEventLog.ps1](https://github.com/palantir/windows-event-forwarding/blob/master/AutorunsToWinEventLog/AutorunsToWinEventLog.ps1) - 你可以不使用 CSV 输出并将这些文件复制到服务器,而是使用 AutorunsToWinEventLog 脚本将 Autoruns 输出转换为 Windows 事件日志,并依赖标准的 Windows 事件日志转发。
* [PowerShell Autoruns](https://github.com/p0w3rsh3ll/AutoRuns) - Autoruns 的 PowerShell 版本。
* [PersistenceSniper](https://github.com/last-byte/PersistenceSniper) - 用于搜寻 Windows 机器中植入的持久化的 Powershell 模块。
* [RegRipper](https://github.com/keydet89/RegRipper2.8) - 直接从注册表文件中提取各种持久化机制。
* [RECmd](https://github.com/EricZimmerman/RECmd) - 提取各种持久化机制,例如通过使用配置文件 [UserClassesASEPs](https://github.com/EricZimmerman/RECmd/blob/master/BatchExamples/UserClassesASEPs.reb) 来提取用户的 CLSID 信息。
* [KAPE](https://www.kroll.com/en/insights/publications/cyber/kroll-artifact-parser-extractor-kape) - 该工具允许使用目标和模块收集各种预定义的工件,请参见包含持久化机制的 [KapeFiles](https://github.com/EricZimmerman/KapeFiles),其中包括 [LNK 文件](https://github.com/EricZimmerman/KapeFiles/blob/master/Targets/Windows/LNKFilesAndJumpLists.tkape)、[计划任务文件](https://github.com/EricZimmerman/KapeFiles/blob/master/Targets/Windows/ScheduledTasks.tkape)和[计划任务列表](https://github.com/EricZimmerman/KapeFiles/blob/master/Modules/LiveResponse/schtasks.mkape)或 [WMI 存储库审计](https://github.com/EricZimmerman/KapeFiles/blob/master/Modules/LiveResponse/WMI-Repository-Auditing.mkape)模块的集合。
* [PyrsistenceSniper](https://github.com/Hexastrike/PyrsistenceSniper) - 基于 Python 的离线 Windows 持久化检测工具。将其指向 KAPE 转储、Velociraptor 收集或挂载的磁盘映像,即可获得离线 Windows 持久化检测。可在 Windows、Linux 和 macOS 上运行。
## 贡献
欢迎贡献!请先阅读[贡献指南](CONTRIBUTING.md)。
标签:AMSI绕过, awesome-list, Conpot, EDR, macOS安全, Sigma规则, Windows安全, ZAP项目解析, 嗅探欺骗, 固件安全, 威胁检测, 库, 应急响应, 恶意代码分析, 恶意软件, 数字取证, 权限维持, 目标导入, 网络安全, 脆弱性评估, 自动化脚本, 资源合集, 配置文件, 隐私保护