analyzing-office365-audit-logs-for-compromise

analyzing-office365-audit-logs-for-compromise is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 54 tokens per session (493 once invoked), scanned A, original, Apache-2.0.

A guide to examining Microsoft 365 audit records through Microsoft Graph, Microsoft's API for accessing service data, to find signs that an account was taken over.

In plain words
What is it for?
Use it to review audit events, mailbox rules, delegates, OAuth app permissions, and login patterns, then produce a timeline of affected mailboxes and compromise indicators.
Why use it?
It helps uncover hidden attacker actions such as forwarding mail externally, changing mailbox access, granting suspicious apps permission, or creating inbox rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Use it to review audit events, mailbox rules, delegates, OAuth app permissions, and login patterns, then produce a timeline of affected mailboxes and compromise indicators.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-office365-audit-logs-for-compromise
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-office365-audit-logs-for-compromise

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-office365-audit-logs-for-compromise

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-office365-audit-logs-for-compromise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 493 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00493
Opus 5 $0.00027 $0.00246
Sonnet 5 $0.00011 $0.00099
Haiku 4.5 $0.00005 $0.00049

Measured 12d ago against content hash 4cf9ac681031, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

analyzing-office365-audit-logs-for-compromise scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/analyzing-office365-audit-logs-for-compromise/SKILL.md · 39 lines

What it actually says

分析 Office 365 审计日志以检测账户失陷

概述

商业邮件欺诈(Business Email Compromise,BEC)攻击通常会在 Office 365 审计日志中留下痕迹:可疑的收件箱规则创建、将邮件转发到外部地址、邮箱委托更改以及未经授权的 OAuth 应用授权。本 skill 使用 Microsoft Graph API 查询统一审计日志,枚举各邮箱的收件箱规则,检测转发配置,并识别账户失陷指标。

前置条件

  • Azure AD 应用注册,具备 AuditLog.Read.AllMailboxSettings.ReadMail.Read(应用权限)
  • Python 3.9+ 及 msalrequests
  • 用于认证的客户端密钥或证书
  • 全局读取者(Global Reader)或安全读取者(Security Reader)角色

步骤

  1. 使用 MSAL 客户端凭据流向 Microsoft Graph 进行身份认证
  2. 查询统一审计日志中的可疑操作(Set-Mailbox、New-InboxRule)
  3. 枚举各邮箱的收件箱规则并标记转发规则
  4. 检测邮箱委托更改(Add-MailboxPermission)
  5. 识别向可疑应用程序的 OAuth 授权
  6. 检查审计日志中的可疑登录模式
  7. 生成包含时间线的失陷指标报告

预期输出

  • JSON 报告,列出转发规则、委托更改、OAuth 授权以及带有风险评分的可疑审计事件
  • 失陷指标及受影响邮箱的时间线
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 39 lines · 54 tokens per session scan A 4cf9ac681031

Subscribe to this mod's changes

analyzing-office365-audit-logs-for-compromise is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 493 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-office365-audit-logs-for-compromise

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.

mukul975/Anthropic-Cybersecurity-Skills · 46 tokens

analyzing-office365-audit-logs-for-compromise

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.

xalgorix/xalgorix · 46 tokens

analyzing-office365-audit-logs-for-compromise

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.

autohandai/community-skills · 46 tokens

analyzing-office365-audit-logs-for-compromise

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.

26zl/cybersec-toolkit · 46 tokens

analyzing-office365-audit-logs-for-compromise

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.

pinkpixel-dev/skills-collection-1 · 46 tokens

analyzing-office365-audit-logs-for-compromise

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.

marysatasselshaped667/skills-collection-1 · 46 tokens