该漏洞利用了 Microsoft 365 Copilot 处理与检索数据的方式:
cve-2025-32711-detection/
├── README.md # 本文件
├── detect.ps1 # PowerShell 检测脚本
├── remediate.ps1 # PowerShell 修复脚本
├── tests/
│ ├── test_detection.ps1 # 检测脚本测试套件
│ └── test_remediation.ps1 # 修复脚本测试套件
└── logs/ # 日志文件目录
ExchangeOnlineManagementMicrosoft.GraphAzureAD 或 AzureAD.Standard.Previewgit clone https://github.com/daryllundy/cve-2025-32711-detection.git
cd cve-2025-32711-detection
Install-Module -Name ExchangeOnlineManagement -Force
Install-Module -Name Microsoft.Graph -Force
Install-Module -Name AzureAD -Force
Connect-ExchangeOnline
Connect-MgGraph -Scopes "User.Read.All", "Directory.Read.All", "SecurityEvents.Read.All"
Connect-AzureAD
检测脚本检查以下内容:
运行检测脚本:
.\detect.ps1 -OutputPath ".\logs\detection_report.json"
参数:
-OutputPath:检测报告的输出路径(默认:.\logs\detection_report.json)-IncludeEmailAnalysis:执行深度邮件分析(可能耗时更长)-Days:审计日志回溯天数(默认:30)修复脚本实施以下内容:
运行修复脚本:
.\remediate.ps1 -ConfigPath ".\config\remediation_config.json" -WhatIf
参数:
-ConfigPath:修复配置文件路径-WhatIf:预览更改而不实际应用-Force:跳过确认提示直接应用更改运行测试套件以验证脚本功能:
# 测试检测能力
.\tests\test_detection.ps1
# 测试修复功能
.\tests\test_remediation.ps1
该工具查找以下潜在利用指标:
邮件模式:
行为异常:
配置弱点:
修复脚本执行以下操作:
邮件安全:
数据丢失防护:
审计与监控:
访问控制:
-WhatIf 参数如有问题、疑问或贡献:
本工具按“原样”提供,仅供安全评估目的使用。使用风险自负,并确保符合贵组织的安全策略。