0xshaft03/Meta-Blue
GitHub: 0xshaft03/Meta-Blue
基于 PowerShell 的 Windows 狩猎框架,通过收集与 MITRE ATT&CK 对齐的数据点并支持基线差异对比,帮助蓝队在大规模环境中快速进行威胁发现与异常检测。
Stars: 8 | Forks: 1
# Meta-Blue
基于 PowerShell 的 Windows 狩猎框架。从本地或远程主机收集 76 个与 MITRE ATT&CK 对齐的数据点。
## 前置条件
- **Windows PowerShell 5.1**
- 目标主机上的**本地管理员权限**(适用于大多数数据点)
- 目标主机的 **WinRM 访问权限**(用于远程收集)
- **ActiveDirectory 模块**(用于 `-ComputerSet ActiveDirectory`)
## 快速入门
```
git clone https://github.com/0xshaft03/Meta-Blue
cd Meta-Blue
using module .\Modules\DataPoint\DataPoint.psm1
using module .\Modules\JobController\JobController.psm1
. .\Invoke-Collection.ps1
# 收集本地机器上的所有 76 个数据点
Invoke-Collection -LocalCollectAll -OutFolder C:\Results
```
## 使用说明
```
# 收集特定数据点
Invoke-Collection -LocalCollectByName Processes,Services -OutFolder C:\Results
# 按 MITRE ATT&CK 类别收集
Invoke-Collection -LocalCollectByCategory Persistence -OutFolder C:\Results
# 快速分诊 — 约 20 个最高信号数据点,几秒内完成
Invoke-Collection -LocalCollectAll -CollectionProfile Quick -OutFolder C:\Results
# 从所有 Active Directory 计算机中收集
Invoke-Collection -RemoteCollectAll -ComputerSet ActiveDirectory -OutFolder C:\Results
# 选择输出格式(csv 或 json)
Invoke-Collection -LocalCollectAll -OutFolder C:\Results -OutputFormat json
```
## 基线差异对比
比较两次收集运行的结果,以找出每个数据点中新增/更改/移除的行:
```
. .\Invoke-BaselineDiff.ps1
Invoke-BaselineDiff -CurrentPath C:\Meta-Blue\2025_02_01_14_00_00 -BaselinePath C:\Meta-Blue\2025_01_25_14_00_00
```
输出内容将被写入 `CurrentPath\Anomalies\` 目录中,对于每个存在差异的数据点,分别保存为 `-Added.csv` 和 `-Removed.csv` 文件。
## 输出
```
\\Raw\ # One CSV per data point (or per-host for remote)
\\Anomalies\ # Baseline diff output
\\collection.json # Collection manifest
```
- **本地收集:** 每个数据点对应一个 CSV/JSON 文件
- **远程收集:** 按主机分别建立文件夹,每个文件夹包含各数据点的文件
- **collection.json:** 元数据(时间戳、计算机名、配置文件、数据点名称、行计数)
## 项目状态
| 入口点 | 状态 |
|---|---|
| `Invoke-Collection` | 活跃 — 本地和远程收集 |
| `Invoke-BaselineDiff` | 活跃 — 比较两次收集运行的结果 |
| `Invoke-Discovery` | 存根 — 网络发现功能尚未实现 |
| `Invoke-MetaBlue` | 存根 — 统一编排器占位符 |
| `Legacy/` | 已归档的单体脚本,不再积极开发 |
### 模块
| 模块 | 用途 |
|---|---|
| `Modules/DataPoint/` | DataPoint 类、TechniqueCategory 枚举、76 个数据点工厂、Quick 配置文件标志 |
| `Modules/JobController/` | 后台作业回收与 WinRM runspace 池管理 |
| `Modules/Node/` | 包含 4 个字符串属性的简单节点类 |
## 注意事项
某些数据点被自我认定为质量较低 — 请参阅 `Modules/DataPoint/DataPoint.psm1` 中的注释以了解详细信息(已标记 `ProgramData`、`KnownDLLs`、`Startup`、`Services`)。
## 许可证
MIT — 详见 [许可证](LICENSE)。
标签:ActiveDirectory, AI合规, ATT&CK框架, Conpot, CrowdStrike, EDR, IPv6, Libemu, OpenCanary, PB级数据处理, PowerShell, SOC工具, Windows安全, Windows服务器, WinRM, 命令控制, 培训平台, 基线对比, 安全运维, 库, 应急响应, 异常检测, 快速分诊, 数据包嗅探, 数据采集, 权限维持检测, 横向移动检测, 流量嗅探, 漏洞发现, 端点安全, 网络安全, 脆弱性评估, 补丁管理, 远程收集, 隐私保护