implementing-velociraptor-for-ir-collection
在事件响应中部署和配置 Velociraptor,使用 VQL 查询、Hunt 和预置产物包,在 Windows、Linux 和 macOS 环境中进行可扩展的端点取证产物采集。
Best use case
implementing-velociraptor-for-ir-collection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
在事件响应中部署和配置 Velociraptor,使用 VQL 查询、Hunt 和预置产物包,在 Windows、Linux 和 macOS 环境中进行可扩展的端点取证产物采集。
Teams using implementing-velociraptor-for-ir-collection should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/implementing-velociraptor-for-ir-collection/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How implementing-velociraptor-for-ir-collection Compares
| Feature / Agent | implementing-velociraptor-for-ir-collection | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
在事件响应中部署和配置 Velociraptor,使用 VQL 查询、Hunt 和预置产物包,在 Windows、Linux 和 macOS 环境中进行可扩展的端点取证产物采集。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 使用 Velociraptor 进行事件响应采集(Implementing Velociraptor for IR Collection)
## 概述
Velociraptor 是由 Rapid7 开发的高级开源端点监控、数字取证和事件响应平台。它使用 Velociraptor 查询语言(Velociraptor Query Language,VQL)创建自定义产物,可采集、查询和监控端点的几乎所有方面。Velociraptor 使事件响应团队能够快速从整个网络采集和检查取证产物,支持对性能影响极小的大规模部署。基于 Fleetspeak 通信的客户端-服务器架构可同时从数千个端点实时采集数据,离线端点在重新连接后也会自动补充执行 Hunt 任务。
## 架构
### 组件
- **Velociraptor Server**:具有 Web UI 和 API 的中央管理控制台
- **Velociraptor Client(Agent)**:部署到端点的轻量级 Agent
- **Fleetspeak**:客户端与服务器之间的通信框架
- **VQL Engine**:用于产物采集的查询语言引擎
- **Filestore**:服务器端已采集产物的存储
- **Datastore**:Hunt、Flow 和客户端信息的元数据存储
### 支持平台
- Windows(7+,Server 2008R2+)
- Linux(Debian、Ubuntu、CentOS、RHEL)
- macOS(10.13+)
## 部署
### 服务器安装
```bash
# 下载最新版本
wget https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor-linux-amd64
# 生成服务器配置
./velociraptor-linux-amd64 config generate -i
# 启动服务器
./velociraptor-linux-amd64 --config server.config.yaml frontend
# 或作为 systemd 服务运行
sudo cp velociraptor-linux-amd64 /usr/local/bin/velociraptor
sudo velociraptor --config /etc/velociraptor/server.config.yaml service install
```
### 客户端部署
```bash
# 重新打包 Windows 部署的客户端 MSI
velociraptor --config server.config.yaml config client > client.config.yaml
velociraptor config repack --msi velociraptor-windows-amd64.msi client.config.yaml output.msi
# 通过 Group Policy、SCCM 或 Intune 部署
# 客户端作为 Windows 服务运行:"Velociraptor"
# Linux 客户端部署
velociraptor --config client.config.yaml client -v
# macOS 客户端部署
velociraptor --config client.config.yaml client -v
```
### Docker 部署
```bash
docker run --name velociraptor \
-v /opt/velociraptor:/velociraptor/data \
-p 8000:8000 -p 8001:8001 -p 8889:8889 \
velocidex/velociraptor
```
## 核心 IR 产物采集
### Windows 取证产物
```sql
-- 采集 Windows 事件日志
SELECT * FROM Artifact.Windows.EventLogs.EvtxHunter(
EvtxGlob="C:/Windows/System32/winevt/Logs/*.evtx",
IDRegex="4624|4625|4648|4672|4688|4698|4769|7045"
)
-- 采集 Prefetch 文件(执行证据)
SELECT * FROM Artifact.Windows.Forensics.Prefetch()
-- 采集 Shimcache 条目
SELECT * FROM Artifact.Windows.Registry.AppCompatCache()
-- 采集 Amcache 条目
SELECT * FROM Artifact.Windows.Forensics.Amcache()
-- 采集 UserAssist 数据
SELECT * FROM Artifact.Windows.Forensics.UserAssist()
-- 采集 NTFS MFT 时间戳
SELECT * FROM Artifact.Windows.NTFS.MFT(
MFTFilename="C:/$MFT",
FileRegex=".(exe|dll|ps1|bat|cmd)$"
)
-- 采集计划任务
SELECT * FROM Artifact.Windows.System.TaskScheduler()
-- 采集带哈希的运行中进程
SELECT * FROM Artifact.Windows.System.Pslist()
-- 采集网络连接
SELECT * FROM Artifact.Windows.Network.Netstat()
-- 采集 DNS 缓存
SELECT * FROM Artifact.Windows.Network.DNSCache()
-- 采集浏览器历史
SELECT * FROM Artifact.Windows.Applications.Chrome.History()
-- 采集 PowerShell 历史
SELECT * FROM Artifact.Windows.Forensics.PowerShellHistory()
-- 采集自启动/持久化
SELECT * FROM Artifact.Windows.Persistence.PermanentWMIEvents()
SELECT * FROM Artifact.Windows.System.Services()
SELECT * FROM Artifact.Windows.System.StartupItems()
```
### Linux 取证产物
```sql
-- 采集认证日志
SELECT * FROM Artifact.Linux.Sys.AuthLogs()
-- 采集 bash 历史
SELECT * FROM Artifact.Linux.Forensics.BashHistory()
-- 采集 crontab 条目
SELECT * FROM Artifact.Linux.Sys.Crontab()
-- 采集运行中的进程
SELECT * FROM Artifact.Linux.Sys.Pslist()
-- 采集网络连接
SELECT * FROM Artifact.Linux.Network.Netstat()
-- 采集 SSH 授权密钥
SELECT * FROM Artifact.Linux.Ssh.AuthorizedKeys()
-- 采集 systemd 服务
SELECT * FROM Artifact.Linux.Services()
```
### 分类采集(一体化)
```sql
-- Windows 分类采集产物
-- 采集事件日志、Prefetch、注册表、浏览器数据等
SELECT * FROM Artifact.Windows.KapeFiles.Targets(
Device="C:",
_AllFiles=FALSE,
_EventLogs=TRUE,
_Prefetch=TRUE,
_RegistryHives=TRUE,
_WebBrowsers=TRUE,
_WindowsTimeline=TRUE
)
```
## Hunt 操作
### 创建 Hunt
```
1. 在 Velociraptor Web UI 中导航到 Hunt Manager
2. 点击 "New Hunt"
3. 配置:
- 描述:"IR Triage - Case 2025-001"
- 包含/排除标签以定向目标
- 产物选择(如 Windows.Forensics.Prefetch)
- 资源限制(CPU、IOPS、超时)
4. 启动 Hunt
5. 实时监控进度
```
### VQL Hunt 示例
```sql
-- 在所有端点搜索特定文件哈希
SELECT * FROM Artifact.Generic.Detection.HashHunter(
Hashes="e99a18c428cb38d5f260853678922e03"
)
-- 在内存中搜索 YARA 签名
SELECT * FROM Artifact.Windows.Detection.Yara.Process(
YaraRule='rule malware { strings: $s1 = "malicious_string" condition: $s1 }'
)
-- 搜索 Sigma 规则匹配的事件日志
SELECT * FROM Artifact.Server.Import.SigmaRules()
-- 搜索可疑计划任务
SELECT * FROM Artifact.Windows.System.TaskScheduler()
WHERE Command =~ "powershell|cmd|wscript|mshta|rundll32"
-- 搜索与可疑 IP 有网络连接的进程
SELECT * FROM Artifact.Windows.Network.Netstat()
WHERE RemoteAddr =~ "10\\.13\\.37\\."
```
## 实时监控
```sql
-- 监控新进程创建
SELECT * FROM watch_etw(guid="{22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716}")
WHERE EventData.ImageName =~ "powershell|cmd|wscript"
-- 监控文件系统变更
SELECT * FROM watch_directory(path="C:/Windows/Temp/")
-- 监控注册表变更
SELECT * FROM watch_registry(key="HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run/**")
```
## 与 SIEM/SOAR 集成
### Splunk 集成
```
Velociraptor Server --> Elastic/OpenSearch --> Splunk HEC
--> 直接 syslog 转发
--> Velociraptor API --> 自定义脚本 --> Splunk
```
### Elastic Stack 集成
```yaml
# Velociraptor 服务器配置 - Elastic 输出
Monitoring:
elastic:
addresses:
- https://elastic.local:9200
username: velociraptor
password: secure_password
index: velociraptor
```
## MITRE ATT&CK 映射
| 技术 | VQL 产物 |
|------|----------|
| T1059 - 命令脚本 | Windows.EventLogs.EvtxHunter (4104, 4688) |
| T1053 - 计划任务 | Windows.System.TaskScheduler |
| T1547 - 启动/登录自动启动 | Windows.Persistence.PermanentWMIEvents |
| T1003 - OS 凭据转储 | Windows.Detection.Yara.Process |
| T1021 - 远程服务 | Windows.EventLogs.EvtxHunter (4624 Type 3/10) |
| T1070 - 指标删除 | Windows.EventLogs.Cleared |
## 参考资料
- Velociraptor 官方文档:https://docs.velociraptor.app/
- Rapid7 Velociraptor 产品页面:https://www.rapid7.com/products/velociraptor/
- CISA Velociraptor 资源:https://www.cisa.gov/resources-tools/services/velociraptor
- Velociraptor GitHub 仓库:https://github.com/Velocidex/velociraptorRelated Skills
implementing-zero-trust-with-hashicorp-boundary
使用 HashiCorp Boundary 实现具备动态凭据代理、会话录制和 Vault 集成的身份感知零信任基础设施访问管理。
implementing-zero-trust-with-beyondcorp
使用身份感知代理(IAP,Identity-Aware Proxy)、上下文感知访问策略、设备信任验证和 Access Context Manager,部署 Google BeyondCorp Enterprise 零信任访问控制,对 GCP 资源和内部应用强制执行基于身份和安全态势的访问。
implementing-zero-trust-network-access
通过配置身份感知代理、微分段、基于条件访问策略的持续验证,以及在 AWS、Azure 和 GCP 环境中以 BeyondCorp 风格的架构替代传统 VPN 访问,在云环境中实施零信任网络访问(ZTNA)。
implementing-zero-trust-network-access-with-zscaler
使用 Zscaler 实施零信任网络访问(Zero Trust Network Access,ZTNA),通过 Zscaler Private Access(ZPA)配置应用分段、访问策略和连接器,替代传统 VPN 架构
implementing-zero-trust-in-cloud
本技能指导组织按照 NIST SP 800-207 和 Google BeyondCorp 原则在云环境中实施零信任(Zero Trust)架构,涵盖以身份为中心的访问控制、微分段(Micro-Segmentation)、持续验证、设备信任评估,以及部署身份感知代理(Identity-Aware Proxy)以消除 AWS、Azure 和 GCP 环境中的隐式网络信任。
implementing-zero-trust-for-saas-applications
使用 CASB、SSPM、条件访问策略、OAuth 应用治理和会话控制,为 SaaS 应用实施零信任访问控制, 对云托管服务强制执行身份验证、设备合规性检查和数据保护。
implementing-zero-trust-dns-with-nextdns
将 NextDNS 实施为零信任 DNS 过滤层,提供加密解析、威胁情报阻断、隐私保护,以及跨所有端点的组织策略执行。
implementing-zero-standing-privilege-with-cyberark
部署 CyberArk Secure Cloud Access,通过基于时间、权限和审批控制的即时访问,在混合云和多云环境中消除常设权限。
implementing-zero-knowledge-proof-for-authentication
零知识证明(ZKP)允许证明者在不泄露秘密本身的情况下证明对某个秘密(如密码或私钥)的了解。本技能实现 Schnorr 身份识别协议和使用离散对数问题的简化 ZKPP,使服务器永远不需要获取用户密码即可完成认证。
implementing-web-application-logging-with-modsecurity
配置带有 OWASP 核心规则集(CRS)的 ModSecurity WAF,实现 Web 应用程序日志记录, 调整规则以减少误报,分析审计日志进行攻击检测,并为应用程序特定威胁实现自定义 SecRules。 分析师配置 SecRuleEngine、SecAuditEngine 和 CRS 偏执级别,以在安全覆盖范围和运营稳定性之间取得平衡。 适用于涉及 WAF 配置、ModSecurity 规则调整、Web 应用审计日志或 CRS 部署的场景。
implementing-vulnerability-sla-breach-alerting
为漏洞修复 SLA 违规构建自动化告警,包含基于严重程度的时间线、升级工作流和合规性报告仪表板。
implementing-vulnerability-remediation-sla
漏洞修复 SLA(服务级别协议)根据严重程度、资产重要性和漏洞利用可用性定义修补或缓解已识别漏洞的强制时限。有效的 SLA 计划推动责任落实、确保一致的修复时间线,并为漏洞管理成熟度提供可衡量的 KPI。