analyzing-office365-audit-logs-for-compromise
通过 Microsoft Graph API 解析 Office 365 统一审计日志,检测邮件转发规则创建、收件箱委托、可疑 OAuth 应用授权以及其他账户失陷指标。
Best use case
analyzing-office365-audit-logs-for-compromise is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
通过 Microsoft Graph API 解析 Office 365 统一审计日志,检测邮件转发规则创建、收件箱委托、可疑 OAuth 应用授权以及其他账户失陷指标。
Teams using analyzing-office365-audit-logs-for-compromise 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/analyzing-office365-audit-logs-for-compromise/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyzing-office365-audit-logs-for-compromise Compares
| Feature / Agent | analyzing-office365-audit-logs-for-compromise | 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?
通过 Microsoft Graph API 解析 Office 365 统一审计日志,检测邮件转发规则创建、收件箱委托、可疑 OAuth 应用授权以及其他账户失陷指标。
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
# 分析 Office 365 审计日志以检测账户失陷 ## 概述 商业邮件欺诈(Business Email Compromise,BEC)攻击通常会在 Office 365 审计日志中留下痕迹:可疑的收件箱规则创建、将邮件转发到外部地址、邮箱委托更改以及未经授权的 OAuth 应用授权。本 skill 使用 Microsoft Graph API 查询统一审计日志,枚举各邮箱的收件箱规则,检测转发配置,并识别账户失陷指标。 ## 前置条件 - Azure AD 应用注册,具备 `AuditLog.Read.All`、`MailboxSettings.Read`、`Mail.Read`(应用权限) - Python 3.9+ 及 `msal`、`requests` 库 - 用于认证的客户端密钥或证书 - 全局读取者(Global Reader)或安全读取者(Security Reader)角色 ## 步骤 1. 使用 MSAL 客户端凭据流向 Microsoft Graph 进行身份认证 2. 查询统一审计日志中的可疑操作(Set-Mailbox、New-InboxRule) 3. 枚举各邮箱的收件箱规则并标记转发规则 4. 检测邮箱委托更改(Add-MailboxPermission) 5. 识别向可疑应用程序的 OAuth 授权 6. 检查审计日志中的可疑登录模式 7. 生成包含时间线的失陷指标报告 ## 预期输出 - JSON 报告,列出转发规则、委托更改、OAuth 授权以及带有风险评分的可疑审计事件 - 失陷指标及受影响邮箱的时间线
Related Skills
performing-soc-2-type-ii-audit-preparation
SOC 2 Type II 审计准备涉及在规定审计期间(通常为 6-12 个月)设计、实施并证明与 AICPA 信任服务标准(Trust Services Criteria,TSC)对齐的控制措施的运营有效性
performing-service-account-audit
审计企业基础设施中的服务账户,识别孤立账户、过度特权账户和不合规账户。本技能涵盖在 Active Directory、云平台中发现服务账户,评估权限级别,识别缺失负责人,以及执行生命周期策略。
performing-cryptographic-audit-of-application
密码学审计(Cryptographic Audit)系统性地审查应用程序对密码学原语、协议和密钥管理的使用,以识别弱算法、不安全模式、硬编码密钥、熵不足和协议配置错误等漏洞。本技能涵盖构建自动化密码学审计工具,扫描 Python 和配置文件中的常见密码学弱点。
performing-active-directory-compromise-investigation
通过分析认证日志、复制元数据、组策略变更和 Kerberos 票据异常,调查 Active Directory 攻陷事件,识别攻击者持久化机制和横向移动路径。
hunting-for-supply-chain-compromise
狩猎供应链入侵指标,包括木马化软件更新、受损依赖项、未授权代码修改和被篡改的构建产物。
hunting-for-lolbins-execution-in-endpoint-logs
通过分析终端进程创建日志,识别合法 Windows 系统二进制文件(LOLBin)被用于恶意目的的可疑执行模式,狩猎攻击者的 LOLBin 滥用行为。
extracting-windows-event-logs-artifacts
使用 Chainsaw、Hayabusa 和 EvtxECmd 提取、解析和分析 Windows 事件日志(EVTX),以检测横向移动、持久化和权限提升。
detecting-sql-injection-via-waf-logs
分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。
detecting-golden-ticket-attacks-in-kerberos-logs
通过分析 Kerberos TGT 异常(包括加密类型不匹配、不可能的票据生命周期、不存在的账户以及域控制器事件日志中的伪造 PAC 签名),检测 Active Directory 中的黄金票据攻击。
detecting-evasion-techniques-in-endpoint-logs
检测端点日志中对手使用的防御规避技术,包括日志篡改、时间戳伪造、进程注入和安全工具禁用。 适用于调查可疑端点行为、为规避战术构建检测规则,或针对隐蔽对手活动进行威胁狩猎的场景。
detecting-email-account-compromise
通过分析收件箱规则创建、可疑登录位置、邮件转发规则和异常 API 访问模式,检测受攻陷的 O365 和 Google Workspace 邮件账号。
detecting-compromised-cloud-credentials
通过分析异常 API 活动、不可能旅行模式、未授权资源配置以及凭据滥用指标,使用 GuardDuty、Defender for Identity 和 SCC 事件威胁检测,检测 AWS、Azure 和 GCP 中被盗用的云凭据。