analyzing-office365-audit-logs-for-compromise
它能做什么
这个工具分析你的 Microsoft 365 账户活动日志,查找账户可能被入侵的迹象。它会留意可疑的更改,例如邮件转发规则或未经授权的访问。
适用场景
- ✓当你怀疑自己的 Microsoft 365 账户已被入侵时。
- ✓检查邮件中是否有异常活动时。
- ✓调查公司安全事件时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-office365-audit-logs-for-compromise/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“检查我的 Microsoft 365 邮件日志,看看有没有可疑的入侵活动。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具使用安全凭据连接到你的 Microsoft 365 账户。然后,它会在活动日志中搜索异常操作,例如创建转发规则,或将权限授予未知应用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Analyzing Office 365 Audit Logs for Compromise
Overview
Business Email Compromise (BEC) attacks often leave traces in Office 365 audit logs: suspicious inbox rule creation, email forwarding to external addresses, mailbox delegation changes, and unauthorized OAuth application consent grants. This skill uses the Microsoft Graph API to query the Unified Audit Log, enumerate inbox rules across mailboxes, detect forwarding configurations, and identify compromised account indicators.
When to Use
- When investigating security incidents that require analyzing office365 audit logs for compromise
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Azure AD app registration with
AuditLog.Read.All,MailboxSettings.Read,Mail.Read(application permissions) - Python 3.9+ with
msal,requests - Client secret or certificate for authentication
- Global Reader or Security Reader role
Steps
- Authenticate to Microsoft Graph using MSAL client credentials flow
- Query Unified Audit Log for suspicious operations (Set-Mailbox, New-InboxRule)
- Enumerate inbox rules across mailboxes and flag forwarding rules
- Detect mailbox delegation changes (Add-MailboxPermission)
- Identify OAuth consent grants to suspicious applications
- Check for suspicious sign-in patterns from audit logs
- Generate compromise indicator report with timeline
Expected Output
- JSON report listing forwarding rules, delegation changes, OAuth grants, and suspicious audit events with risk scores
- Timeline of compromise indicators with affected mailboxes
常见问题
什么是“审计日志”?
审计日志就像 Microsoft 365 账户中所有操作的日记,记录了谁在什么时候做了什么。
什么是“商业邮件欺诈”(BEC)?
这是一种诈骗手段,骗子假扮成你认识的人,诱骗你提供信息或转账。
使用这个工具需要成为技术专家吗?
不需要,这个工具设计得让任何人都能使用,它简化了安全日志的分析。
详情
作者的原始描述
Parse Office 365 Unified Audit Logs via Microsoft Graph API to detect email forwarding rule creation, inbox delegation, suspicious OAuth app grants, and other indicators of account compromise.
热度
- GitHub 星标
- 35k
- 排名
- #7640
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。