detecting-email-account-compromise

detecting-email-account-compromise is a skill for Claude Code, Codex from adriannoes/awesome-agentic-ai. It costs 43 tokens per session (648 once invoked), scanned A, original, MIT.

A security investigation guide for finding compromised Microsoft 365 and Google Workspace email accounts by examining mailbox rules, sign-in locations, and API activity.

In plain words
What is it for?
Use it to investigate email breaches, create threat-detection rules, hunt for suspicious activity, and check whether monitoring covers common account-compromise signs.
Why use it?
It helps identify attackers who secretly read, forward, delete, or redirect email after gaining access to an account.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate email breaches, create threat-detection rules, hunt for suspicious activity, and check whether monitoring covers common account-compromise signs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adriannoes/awesome-agentic-ai/detecting-email-account-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 adriannoes/awesome-agentic-ai --skill detecting-email-account-compromise
Clone the repo
git clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai

Made for: Claude Code, Codex.

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 detecting-email-account-compromise

README.md
[![agentmods](https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-email-account-compromise/github.svg)](https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-email-account-compromise)
Your own site
<a href="https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-email-account-compromise"><img src="https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-email-account-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 detecting-email-account-compromise

Your own site · 80×15
<a href="https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-email-account-compromise"><img src="https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-email-account-compromise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 648 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00043 $0.00648
Opus 5 $0.00022 $0.00324
Sonnet 5 $0.00009 $0.00130
Haiku 4.5 $0.00004 $0.00065

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

Security

Grade A, and why

detecting-email-account-compromise scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

6. Check for suspicious user agent strings (python-requests, PowerShell, curl)
cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/detecting-email-account-compromise/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detecting Email Account Compromise

Overview

Email account compromise (EAC) is a prevalent attack vector where adversaries gain unauthorized access to mailboxes to exfiltrate sensitive data, conduct business email compromise (BEC), or establish persistence through inbox rule manipulation. Attackers commonly create forwarding rules to siphon emails, delete rules to hide evidence, or use OAuth tokens for persistent access. Detection relies on analyzing Microsoft 365 Unified Audit Logs, Azure AD sign-in logs for impossible travel or suspicious locations, inbox rule creation events (Set-InboxRule, New-InboxRule), and Microsoft Graph API access patterns. Key indicators include forwarding rules to external addresses, rules that delete or move messages matching keywords like "invoice" or "payment", and sign-ins from unusual user agents such as python-requests.

When to Use

  • When investigating security incidents that require detecting email account 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

  • Microsoft 365 with Unified Audit Logging enabled
  • Azure AD P1/P2 for risk detection APIs
  • Python 3.9+ with requests, msal libraries
  • Microsoft Graph API application registration with Mail.Read, AuditLog.Read.All permissions
  • Understanding of OAuth2 client credential flows

Steps

  1. Export audit logs or connect to Microsoft Graph API using MSAL authentication
  2. Query inbox rules for all monitored mailboxes via /users/{id}/mailFolders/inbox/messageRules
  3. Analyze rules for external forwarding (ForwardTo, RedirectTo external addresses)
  4. Detect suspicious rule patterns: deletion rules, keyword-matching rules targeting financial terms
  5. Query sign-in logs via /auditLogs/signIns for unusual locations and impossible travel
  6. Check for suspicious user agent strings (python-requests, PowerShell, curl)
  7. Identify OAuth application consent grants for suspicious third-party apps
  8. Correlate findings across users to detect campaign-level compromise
  9. Generate compromise indicators report with severity scores

Read the full file on GitHub · 68 lines

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. 9d ago First seen · 68 lines · 43 tokens per session scan A 01bc7542aae1

Subscribe to this mod's changes

detecting-email-account-compromise is a skill published in the GitHub repository adriannoes/awesome-agentic-ai (57 stars, last pushed 14d ago), licensed MIT. It adds 43 tokens to every session and 648 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

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.

marysatasselshaped667/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.

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

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.

killvxk/cybersecurity-skills-zh · 54 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