reverseame/winesap

GitHub: reverseame/winesap

Winesap 是一个 Volatility 3 内存取证插件,用于在 Windows 内存转储中系统化地检测和分析基于注册表的自动启动可扩展点(ASEP),以发现恶意软件的持久化痕迹。

Stars: 10 | Forks: 0

# Winesap — 用于 Windows ASEP 的 Volatility 插件 `Winesap` 在 Windows 内存转储中搜索 **自动启动可扩展点 (ASEP)**:这是 OS 和应用程序可扩展点的一个子集,允许程序在无需任何显式用户调用的情况下自动启动。它会检查恶意软件通常滥用以实现持久化的基于注册表的 ASEP,并标记出看起来可疑的条目。 [![License: AGPL v3](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) ## 背景 此插件是作为学术论文的一部分开发的: 该论文提出了一种基于恶意软件用于(或滥用以)实现持久化的特性的 Windows ASEP 分类法,将其分为四大类 —— *系统持久化机制*、*程序加载器滥用*、*应用程序滥用*和*系统行为滥用* —— 并通过其写入权限、执行权限、内存取证中的可检测性以及执行/配置范围来表征每个可扩展点。`Winesap` 实现了对该分类法中基于注册表的 ASEP 的检测。 📄 作者的论文副本:[webdiis.unizar.es/~ricardo/files/papers/UR-DIIN-19.pdf](http://webdiis.unizar.es/~ricardo/files/papers/UR-DIIN-19.pdf) ![Windows ASEP 分类法](img/taxonomy.png "A taxonomy of Windows ASEPs and a summary of their characteristics") ## 覆盖范围 `Winesap` 检查以下基于注册表的 ASEP: - 位于 `HKCU` 和 `HKLM` 下的 **Run / RunOnce / RunOnceEx** 键,包括 *Terminal Server\Install* 变体。 - **Active Setup** *Installed Components* (`StubPath`)。 - 当前控制集下的 **Services** (`ImagePath`)。 - **Image File Execution Options** (`Debugger`)。 - **Winlogon** (`Shell`, `Userinit`)。 - **AppInit_DLLs**(原生和 `Wow6432Node`)。 每个 `NTUSER.DAT` hive 都会被扫描,因此会报告转储中存在的**所有**用户配置文件的按用户(`HKCU`)自动启动条目,而不仅仅是一个。 当一个条目的值数据匹配到已知的可疑模式时,它会被标记上警告,例如从 `AppData`/`Roaming`/`Temp` 运行的可执行文件、通过 `regsvr32`/`rundll32` 加载的备用数据流 (ADS)、通过 `shell32.dll` 执行的 shell,或者嵌入的 PE 文件。 ## 用法 使用 `-p`(插件目录)选项将此项目的路径添加到 Volatility 3 中。然后该插件即可作为 `winesap.Winesap` 使用: ``` $ python3 vol.py -p /path/to/winesap -f /path/to/memory.dump winesap.Winesap [--match] ``` | 选项 | 描述 | | --- | --- | | `--match` | 仅显示可疑条目(带有警告的条目)。 | 示例(感染了 Alina PoS 恶意软件的 Windows 7 转储): ``` $ python3 vol.py -p /path/to/winesap -f infected.elf winesap.Winesap --match Volatility 3 Framework 2.28.1 RegType RegName RegKey RegValue Warning REG_SZ ALINAhuahs HKCU [Usuario]\Software\Microsoft\Windows\CurrentVersion\Run C:\Users\Usuario\AppData\Roaming\ALINA_CJLXYJ.exe Suspicious path file ``` 输出是一个 `TreeGrid`,因此它也适用于标准的 Volatility 3 渲染器(`-r csv`、`-r json`、`-r pretty`)。按用户的 `HKCU` 行会用原始配置文件进行标记(例如 `HKCU [Usuario]`)。 ## 如何引用 如果您在研究中使用了 `Winesap`,请引用该论文: ``` @article{Uroz2019Winesap, title = {Characteristics and detectability of {Windows} auto-start extensibility points in memory forensics}, author = {Uroz, Daniel and Rodr{\'i}guez, Ricardo J.}, journal = {Digital Investigation}, volume = {28}, pages = {S95--S104}, year = {2019}, issn = {1742-2876}, doi = {10.1016/j.diin.2019.01.026}, publisher = {Elsevier}, note = {Proceedings of the Sixth Annual DFRWS Europe (DFRWS EU 2019)} } ``` ## 许可证 根据 [GNU AGPLv3](LICENSE) 许可证授权。
标签:API接口, SecList, Volatility插件, 内存取证, 安全, 超时处理, 逆向工具