stanleytobias/PAS

GitHub: stanleytobias/PAS

一个在受控Windows主机上执行MITRE ATT&CK映射行为的攻击模拟框架,用于验证SIEM和EDR的检测覆盖率并自动生成检测规则脚手架。

Stars: 0 | Forks: 0

# PAS — 实用攻击模拟 **检测工程领域的攻击模拟框架。** PAS 在受控的 Windows 主机上执行映射到 MITRE ATT&CK 的行为,并引导分析师验证其 SIEM 和 EDR 是否产生了预期的遥测数据和检测结果。它生成工件。检测是你的工作。 ## 使用场景 | 使用场景 | 描述 | |---|---| | **检测验证** | 运行方案,确认现有规则在真实行为上触发 | | **覆盖率映射** | 运行完整战术,发现哪些技术没有检测 | | **威胁狩猎支持** | 在您的环境中生成真实工件以便进行狩猎 | | **蓝队训练** | 结构化、可重复、实验室安全的练习,带有引导式检查清单 | ## 要求 - PowerShell 5.1+ 或 PowerShell 7+ - 对于需要提升权限的方案,以**管理员**身份运行 - **仅限隔离的实验室虚拟机** — 切勿在生产系统上运行 ## 快速开始 ``` # 克隆 git clone https://github.com/stanleytobias/PAS cd PAS # 验证所有场景 YAML .\pas_runner.ps1 -Validate # 运行单个场景 .\pas_runner.ps1 -Scenario scenarios\persistence\T1053.005_scheduled_task.yml # 运行某个战术的所有场景 .\pas_runner.ps1 -Tactic persistence -Out results\persistence\ # 运行预构建套件 .\pas_runner.ps1 -Suite scenarios\suites\detection_coverage_v1.yml # Hunt 模式 — 生成工件,跳过判决提示 .\pas_runner.ps1 -Scenario scenarios\reconnaissance\T1595.001_scanning_ip_blocks.yml -HuntMode # 生成 HTML 覆盖率报告 .\pas_runner.ps1 -Report -Out results\ ``` ## 工作原理 ``` 1. Pick a scenario (or tactic batch, or suite) 2. PAS executes each step — process spawns, registry writes, network probes 3. PAS runs cleanup — removes all artifacts it created 4. You check your SIEM and EDR for the expected telemetry 5. You enter a verdict at the interactive prompt 6. PAS saves a result JSON 7. On GAP or BLIND_SPOT — PAS auto-generates a Sigma rule scaffold 8. Edit the scaffold, convert to KQL, deploy to Sentinel, re-run to confirm 9. Run -Report to see your full coverage matrix as HTML ``` ## 判定结果 | 判定 | 含义 | |---|---| | `COVERED` | 检测触发,具有正确的 ATT&CK 技术上下文 | | `PARTIAL` | 检测触发但保真度低或缺少上下文 | | `GAP` | 无检测 — 但 SIEM/EDR 中可见遥测数据 | | `BLIND_SPOT` | 无检测且无遥测数据 — 完全的覆盖缺口 | | `HUNT_ARTIFACT` | 狩猎模式运行 — 生成了工件,未捕获判定 | | `PENDING` | 暂时跳过,保存以供后续审查 | 当您记录 `GAP` 或 `BLIND_SPOT` 时,还需要对缺口类型进行分类: | 缺口类型 | 含义 | |---|---| | `no_rule` | 不存在此技术的检测规则 | | `rule_did_not_fire` | 规则存在但未触发 | | `missing_log_source` | 遥测数据缺失 — 日志源未配置 | | `missing_sensor` | 遥测数据缺失 — 传感器未部署 | ## 仓库结构 ``` PAS/ pas_runner.ps1 # Entry point lib/ PAS.Logging.psm1 # Output and verbosity PAS.Yaml.psm1 # Pure-PowerShell YAML parser PAS.Schema.psm1 # Scenario validation PAS.Executor.psm1 # Step engine and analyst prompt PAS.Results.psm1 # Result persistence and querying PAS.Sigma.psm1 # Sigma scaffold auto-generation PAS.Report.psm1 # HTML coverage report scenarios/ suites/ # Multi-scenario suite definitions reconnaissance/ resource_development/ initial_access/ execution/ persistence/ privilege_escalation/ defense_evasion/ credential_access/ discovery/ lateral_movement/ collection/ command_and_control/ exfiltration/ impact/ docs/ getting_started.md workflow.md hunt_mode.md writing_scenarios.md sigma_workflow.md SCENARIO_SCHEMA.md # Full scenario YAML field reference results/ # Created on first run — gitignored ``` ## PAS 不做的事情 - 连接到外部基础设施 - 窃取数据 - 在运行之间保持持久化 - 禁用或修改安全产品 - 评估自身的检测能力 ## 相关内容 - [SIEM-用例](https://github.com/stanleytobias/SIEM-UseCases) — 使用 PAS 验证的 KQL 检测规则
标签:AI合规, AMSI绕过, Cloudflare, Conpot, EDR测试, IPv6, Libemu, MITRE ATT&CK, PowerShell, SIEM验证, Windows安全, 多模态安全, 威胁检测, 安全运营, 恶意行为模拟, 扫描框架, 攻击模拟, 蓝队训练, 覆盖率映射, 驱动签名利用