juju4/velociraptor-offline-collections
GitHub: juju4/velociraptor-offline-collections
提供 Velociraptor 离线收集器的示例配置与自动化脚本,帮助在无服务器连接的环境下高效完成端点取证数据采集与传输。
Stars: 1 | Forks: 0
# Velociraptor 离线收集示例
## 创建收集器二进制文件
要从 velociraptor 二进制文件创建离线收集二进制文件:
```
F:> velociraptor.exe config repack config.yaml WinTriage.exe
# OR
velociraptor.exe --config server.config.yaml -v artifacts collect
Server.Utils.CreateCollector
--args OS=Windows
--args artifacts='["""Generic.System.Pstree"""]'
--args parameters='{"""Generic.System.Pstree""":{}}'
--args target=ZIP
--args opt_admin=N
--args opt_prompt=N
--output collector.zip
```
或者在 Linux 上:
```
wget https://github.com/Velocidex/velociraptor/releases/download/v0.6.7-1/velociraptor-v0.6.7-linux-amd64
./velociraptor-v0.6.7-linux-amd64 config repack LinuxTriage.yaml LinuxOfflineTriage
# OR
/opt/velociraptor/velociraptor --config /etc/velociraptor/server.config.yaml -v artifacts collect \
Server.Utils.CreateCollector \
--args OS=Linux \
--args artifacts='["Linux.Mounts","Linux.Network.Netstat","Linux.RHEL.Packages","Linux.Ssh.AuthorizedKeys","Linux.Ssh.KnownHosts","Linux.Sys.BashHistory","Linux.Sys.BashShell","Linux.Sys.Crontab","Linux.Sys.LastUserLogin","Linux.Sys.Pslist","Linux.Sys.Services","Linux.Sys.SUID","Linux.Sys.Users","Linux.Syslog.SSHLogin","Linux.Users.InteractiveUsers","Linux.Users.RootUsers","Linux.Sys.Maps","Linux.Sys.CPUTime","Linux.Proc.Modules","Linux.Proc.Arp","Linux.OSQuery.Generic","Linux.Network.NetstatEnriched","Linux.Detection.AnomalousFiles","Linux.Debian.Packages","Generic.Collectors.File"]' \
--args parameters='{"""Linux.Sys.BashShell""":{"""Command""":"""ls -la / /tmp /var/tmp"""},"""Generic.Collectors.File""":{"""collectionSpec""":"""Glob\\n/etc/*\\n/var/log/*\\nUsers\\\\*\\\\NTUser.dat\\n""","""Root""":"""/"""}}' \
--args target=ZIP \
--args opt_admin=N \
--args opt_prompt=N \
--args opt_tempdir=/var/tmp \
--args opt_verbose=Y \
--args opt_progress_timeout=300 \
--args opt_cpu_limit=80 \
--args opt_format=jsonl \
--output collector.zip
```
从现有的收集器二进制文件中提取配置。
```
Collector_velociraptor-v0.6.7-linux-amd64 config show > LinuxTriage.yaml
```
你也可以在 velociraptor 服务器的 Web 前端执行相同的操作(Server Artifacts 菜单:纸飞机图标)。
生成的文件将在 Web 界面中可用,或者在本地 ${velociraptor_home}/clients/server/collections/ 目录中可用。
你可能需要从 [Artifact Exchange](https://docs.velociraptor.app/exchange/) 下载 artifact 包以获取更多 artifact。
## 传输数据
```
$ python3 provision_az_storageaccount.py
Provisioned resource group PythonAzureExample-Storage-rg
Provisioned storage account pythonazurestorage61324
Primary key for storage account: [REDACTED]
Connection string: DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=pythonazurestorage61324;AccountKey=[REDACTED]
Provisioned blob container blob-container-01
Provisioned W sas url https://pythonazurestorage61324.blob.core.windows.net/blob-container-01/IMAGE_PATH/IMAGE_NAME?se=2022-12-04T00%3A08%3A14Z&sp=cw&sv=2021-08-06&sr=b&sig=[REDACTED]
Provisioned RO sas url https://pythonazurestorage61324.blob.core.windows.net/blob-container-01/IMAGE_PATH/IMAGE_NAME?se=2022-12-04T00%3A08%3A14Z&sp=r&sv=2021-08-06&sr=b&sig=[REDACTED]
$ azcopy copy FILE "https://pythonazurestorage61324.blob.core.windows.net/blob-container-01/IMAGE_PATH/IMAGE_NAME?se=2022-12-04T00%3A08%3A14Z&sp=cw&sv=2021-08-06&sr=b&sig=[REDACTED]"
```
## 使用数据
数据可以通过以下方式查看
* 直接查看(通常是 JSON 和/或 CSV 输出)。[msticpy Velociraptor provider](https://msticpy.readthedocs.io/en/v2.9.0/data_acquisition/DataProv-Velociraptor.html) 也是一个选项。
* 通过加载到 velociraptor 服务器中查看([将收集结果导入 GUI](https://docs.velociraptor.app/docs/offline_triage/#importing-collections-into-the-gui),[import_collection](https://docs.velociraptor.app/vql_reference/server/import_collection/);菜单 collection - 眼睛图标下方 > New collection > Server.Utils.ImportCollection)
## 已知问题,故障排除
* 配置重新打包时出现 "error: config repack: client_repack: Provided config file not valid: No API config"。这可能是一个配置问题,需要删除 "Frontend: {}" 行。
# 参考
* [Offline Collections, Velociraptor 文档](https://docs.velociraptor.app/docs/offline_triage/#offline-collections)
* [如何自动化创建离线收集器?Velociraptor 文档](https://docs.velociraptor.app/knowledge_base/tips/automate_offline_collector/)
* [使用 Velociraptor 进行分类排查 第 3 部分,2019 年 10 月](https://docs.velociraptor.app/blog/2019/2019-10-08_triage-with-velociraptor-pt-3-d6f63215f579/)
* [使用 Velociraptor ++ 进行本地实时响应,2019 年 12 月](https://mgreen27.github.io/posts/2019/12/08/LocalLRwithVRaptor.html)
* [使用 Velociraptor 进行分类排查 — 第 4 部分,2020 年 7 月](https://velociraptor.velocidex.com/triage-with-velociraptor-pt-4-cf0e60810d1e)
* [创建独立的 Artifact 收集器,2022 年 6 月](https://fiskeren.github.io/posts/creating_collector/)
* [triage.zip 为 Windows 提供了一个开箱即用的 Velociraptor 分类排查收集器,预配置用于快速有效的应急响应。该项目面向需要可靠离线收集器而又不想从头开始构建的响应人员。](https://github.com/Digital-Defense-Institute/triage.zip)
* [使用 Velociraptor 增强 Sysmon,2025 年 8 月](https://signalsleuth.io/2025/08/31/sysmon_enrichment.html):Authenticode, TLSH, Process Call chains
* [使用 Velociraptor 进行自适应收集,2025 年 9 月](https://docs.velociraptor.app/blog/2025/2025-09-28-adaptive-collections/)
* [使用 Velociraptor 进行内存分析 - 第 1 部分,2025 年 11 月](https://docs.velociraptor.app/blog/2025/2025-11-15-memory-analysis-pt1/):Windows.Memory.Mem2Disk
标签:EDR, ESC漏洞, HTTPS请求, HTTP请求, Linux取证, PB级数据处理, Triage, Velociraptor, Windows取证, 后渗透, 安全运维, 库, 应急响应, 数字取证, 数字取证, 无线安全, 用户态调试, 离线取证, 离线采集, 端点检测与响应, 网络安全审计, 脆弱性评估, 脱壳工具, 自动化脚本, 自动化脚本, 证据收集, 逆向工具, 配置示例