Skip to content
OpenSmartRoute
Skillv1.0.0

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.

by mukul975(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from mukul975/anthropic-cybersecurity-skills (skills/analyzing-office365-audit-logs-for-compromise/SKILL.md). Install upstream with npx skills add mukul975/anthropic-cybersecurity-skills --skill analyzing-office365-audit-logs-for-compromise. Copyright stays with the author (Apache-2.0).

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

  1. Authenticate to Microsoft Graph using MSAL client credentials flow
  2. Query Unified Audit Log for suspicious operations (Set-Mailbox, New-InboxRule)
  3. Enumerate inbox rules across mailboxes and flag forwarding rules
  4. Detect mailbox delegation changes (Add-MailboxPermission)
  5. Identify OAuth consent grants to suspicious applications
  6. Check for suspicious sign-in patterns from audit logs
  7. 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

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/mukul975-anthropic-cybersecurity-skills-analyzing-office-eb46dc/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

mukul975-anthropic-cybersecurity-skills-analyzing-office-eb46dc.ocm.jsonjson
{
  "ocm": "1",
  "id": "mukul975-anthropic-cybersecurity-skills-analyzing-office-eb46dc",
  "kind": "skill",
  "name": "analyzing-office365-audit-logs-for-compromise",
  "description": "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.",
  "publisher": "mukul975",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "office365",
      "microsoft-graph",
      "audit-logs",
      "email-compromise",
      "inbox-rules",
      "oauth",
      "bec",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/mukul975/anthropic-cybersecurity-skills",
      "path": "skills/analyzing-office365-audit-logs-for-compromise/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/mukul975/anthropic-cybersecurity-skills/blob/HEAD/skills/analyzing-office365-audit-logs-for-compromise/SKILL.md",
      "key": "mukul975/anthropic-cybersecurity-skills/skills/analyzing-office365-audit-logs-for-compromise/SKILL.md"
    },
    "license": "Apache-2.0"
  },
  "instructions": "# Analyzing Office 365 Audit Logs for Compromise\n\n## Overview\n\nBusiness 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.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing office365 audit logs for comp",
  "cost": {
    "context_tokens": 438
  }
}

Fetch it by URL: GET /api/v1/registry/mukul975-anthropic-cybersecurity-skills-analyzing-office-eb46dc/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.