CuriosidadesDeHackers/VelociraptorForge

GitHub: CuriosidadesDeHackers/VelociraptorForge

为 Velociraptor DFIR 平台提供的一组覆盖 Windows、Linux 及内存取证场景的自定义 VQL artifact,用于事件响应中的快速分类、深度调查与证据获取。

Stars: 0 | Forks: 0

# VelociraptorForge 用于 [Velociraptor](https://docs.velociraptor.app/) 的自定义 artifact 集合,专注于 Windows 和 Linux 环境下的 **DFIR、取证分类和证据获取**。 由 [Curiosidades de Hackers](https://www.curiosidaddehackers.com) 开发和维护,作为事件响应日常工作的一部分。 ## 这是什么? Velociraptor 允许通过使用 VQL (Velociraptor Query Language) 编写的自定义 artifact 来扩展其功能。本仓库汇集了为真实 DFIR 案例开发的 artifact:从快速的初始分类到深度收集、内存获取以及 NTFS artifact(如 MFT)的提取。 每个 artifact 都旨在**直接导入到你的 Velociraptor 实例中**,并可以通过 GUI 或大规模 hunt 启动。 ## 仓库结构 ``` VelociraptorForge/ │ ├── windows/ │ ├── Custom.Windows.FullTriage.yaml # Triage rápido: procesos, servicios, red, EVTX │ ├── Custom.Windows.FullTriage.Zip.yaml # Triage básico empaquetado en ZIP y subido a VR │ ├── Custom.Windows.DeepTriage.yaml # Triage profundo: Prefetch, Amcache, Shimcache │ ├── Custom.Windows.Chupona.yaml # Recolector amplio de ficheros con manifest y ZIP │ ├── Custom.Windows.EvtxStageLocally.PS.yaml # Copia EVTX a directorio local y genera ZIP │ └── Custom.Windows.MFT.Upload.yaml # Extrae y sube la MFT completa del volumen C: │ ├── linux/ │ ├── Custom.Linux.FullTriage.yaml # Triage Linux: logs, procesos, red, usuarios │ └── Custom.Linux.Triage.StageLocally.yaml # Triage Linux empaquetado en tarball local │ ├── memory/ │ ├── Custom.Memory.Windows.AcquisitionPrep.yaml # Contexto y tooling previo a captura de RAM en Windows │ └── Custom.Memory.Linux.AcquisitionPrep.yaml # Contexto y tooling previo a captura de RAM en Linux │ └── README.md ``` ## 可用的 artifact ### 🪟 Windows #### `Custom.Windows.FullTriage` 快速且稳定的分类设计,旨在从 GUI 启动且没有超时风险。收集 EVTX(Security、System、Application、PowerShell、Defender、Sysmon)、进程、服务、计划任务、启动项、用户、本地管理员、网络连接和接口。繁重的来源(Prefetch、Amcache、Shimcache)已包含在内,但与轻量级部分分开。 | 参数 | 默认值 | 描述 | |---|---|---| | — | — | 无可配置参数 | #### `Custom.Windows.FullTriage.Zip` 使用纯 PowerShell 生成包含基本分类的 ZIP 包,并将其上传到 Velociraptor 以便直接从 *Uploaded Files* 下载。当原生的 VQL artifact 在 endpoint 上运行缓慢或不稳定时非常有用。 收集内容:进程、服务、任务、用户、组、管理员、TCP/UDP 连接、网络适配器、注册表 Run 键、`systeminfo`、`ipconfig /all`、`netstat -ano` 和 `whoami /all`。 | 参数 | 默认值 | 描述 | |---|---|---| | `WorkDir` | `%TEMP%` | 临时工作目录 | #### `Custom.Windows.DeepTriage` 具有历史执行来源的深度分类。当快速分类已经提供了足够的上下文,并且你想深入了解高级持久化和取证缓存时,请将其用作第二阶段。 来源:**Prefetch**、**Amcache**、**Shimcache** (AppCompatCache) 以及 Amcache 异常检测。 | 参数 | 默认值 | 描述 | |---|---|---| | — | — | 无可配置参数 | #### `Custom.Windows.Chupona` 广泛的文件收集器。遍历可配置的根路径,复制所有可读文件并保持目录结构,生成包含 SHA256 哈希值的 `manifest.csv`,并将所有内容打包成一个 ZIP 上传至 Velociraptor。 专为特定文件夹(用户配置文件、应用程序目录、完整驱动器)的精准取证收集而设计。 | 参数 | 默认值 | 描述 | |---|---|---| | `RootPath` | `C:\` | 要收集的根路径 | | `WorkDir` | `C:\Windows\Temp` | 临时暂存目录 | | `OutputZip` | `C:\Windows\Temp\Chupona_CaseForge.zip` | 输出 ZIP 的路径 | | `MaxFileMB` | `1024` | 每个文件的最大大小,单位为 MB(0 = 无限制) | | `IncludeRegex` | `.*` | 要包含路径的正则表达式 | | `ExcludeRegex` | `` | 要排除路径的正则表达式 | #### `Custom.Windows.EvtxStageLocally.PS` 将系统中的所有 EVTX 复制到临时目录,并生成本地 ZIP 以供后续收集。当日志非常庞大或与 VR 服务器的连接受限时,这是直接上传的替代方案。 | 参数 | 默认值 | 描述 | |---|---|---| | `WorkDir` | `%TEMP%` | 目标目录 | | `EvtxGlob` | `C:\Windows\System32\winevt\Logs\*.evtx` | 要复制的 EVTX 的 Glob | #### `Custom.Windows.MFT.Upload` 使用 Velociraptor 的 `ntfs` accessor 提取 C: 卷的完整 MFT,并将其直接上传到 *Uploaded Files*。在需要进行完整时间线分析或恢复已删除文件的调查中至关重要。 | 参数 | 默认值 | 描述 | |---|---|---| | `MFTPath` | `C:/$MFT` | 要提取的 MFT 路径 | ### 🐧 Linux #### `Custom.Linux.FullTriage` 使用 Velociraptor 原生 artifact 进行完整的 Linux 分类。收集系统日志(`auth.log`、`secure`、`syslog`、`messages`)、systemd journal、SSH 登录、进程、服务、crontab、`bash_history`、用户、组、最后登录、`netstat` 和网络地址。 | 参数 | 默认值 | 描述 | |---|---|---| | — | — | 无可配置参数 | #### `Custom.Linux.Triage.StageLocally` 收集基本的 Linux 分类,并将日志和主机上下文打包成本地 tarball。当与 VR 服务器没有稳定的连接,或者在提取之前想要进行暂存时非常有用。 收集内容:`uname`、日期、`id`、`ps auxww`、`ss`/`netstat`、journal 的最后 5000 行以及 `/var/log` 的完整副本。 | 参数 | 默认值 | 描述 | |---|---|---| | `WorkDir` | `/tmp` | 工作目录 | | `OutputName` | `linux_triage` | 输出 tarball 的前缀 | ### 🧠 内存 #### `Custom.Memory.Windows.AcquisitionPrep` 在部署工具之前,检查系统上下文并检测 Windows 中可用于获取内存 (RAM) 的工具。收集内容:`ComputerInfo`、按 RAM 使用量排名前 200 的进程、物理内存模块信息,并在 PATH 中检测 `winpmem`、`DumpIt` 或 `MagnetRAMCapture`。 | 参数 | 默认值 | 描述 | |---|---|---| | `WorkDir` | `%TEMP%` | 暂存目录 | #### `Custom.Memory.Linux.AcquisitionPrep` 与前一个 artifact 等效的 Linux 版本。检查 kernel、已加载模块、可用内存,并检测获取工具,如 `avml`、`lime` 或 `insmod`。 | 参数 | 默认值 | 描述 | |---|---|---| | `WorkDir` | `/tmp` | 暂存目录 | ## 如何导入 artifact 1. 在 Velociraptor 的 GUI 中,转到 **View Artifacts → Upload Artifact**。 2. 选择相应的 `.yaml` 文件。 3. 该 artifact 将以其 `Custom.*` 的名称出现在目录中。 4. 从目标客户端上的 **New Collection** 启动它,或者创建一个 **Hunt** 以针对多个 endpoint。 你还可以在启动服务器时使用配置中的 `--definitions` 选项或通过 `velociraptor config repack` 加载 artifact。 ## 事件中推荐的工作流 ``` 1. Custom.Windows.FullTriage → visión inicial rápida 2. Custom.Windows.MFT.Upload → timeline NTFS completo 3. Custom.Windows.DeepTriage → ejecución histórica (Prefetch, Amcache) 4. Custom.Memory.Windows.AcquisitionPrep → verifica tooling antes de capturar RAM 5. Custom.Windows.Chupona → recolección quirúrgica de rutas concretas ``` 对于 Linux: ``` 1. Custom.Linux.FullTriage → visión inicial 2. Custom.Linux.Triage.StageLocally → empaqueta logs para extracción 3. Custom.Memory.Linux.AcquisitionPrep → verifica tooling de memoria ``` ## 要求 - Velociraptor **0.7.x** 或更高版本。 - Agent 权限:根据 artifact 的不同,需要 `EXECVE`、`FILESYSTEM_READ`(在每个 YAML 中均有说明)。 - PowerShell artifact 要求 agent 在 endpoint 上以足够的权限运行(推荐:SYSTEM)。 ## 作者 **Curiosidades de Hackers** DFIR · CSIRT · Bug Bounty · 数字取证 [curiosidaddehackers.com](https://www.curiosidaddehackers.com) ## 许可证 MIT — 使用、修改并分享它们。如果你改进了某些内容,欢迎提交 PR。
标签:AI合规, Velociraptor, VQL, 内核研究, 库, 应急响应, 数字取证, 用户态调试, 自动化脚本