Detecting spearphishing with email gateway

From mukul975/Anthropic-Cybersecurity-Skills · View interactive version

Detecting spearphishing with email gateway is an AI agent skill from the GitHub repository mukul975/Anthropic-Cybersecurity-Skills. Detect and block spearphishing emails that use personalized, researched content to evade generic spam filters, by configuring email security gateway (SEG) impersonation protection, URL rewriting, attachment sandboxing, and custom detection rules in Microsoft Defender for Office 365, Proofpoint, Mime

How to use this skill

Skill file

Detecting Spearphishing with Email Gateway

Overview

Spearphishing targets specific individuals using personalized, researched content that bypasses generic spam filters. Email security gateways (SEGs) like Microsoft Defender for Office 365, Proofpoint, Mimecast, and Barracuda provide advanced detection capabilities including behavioral analysis, URL detonation, attachment sandboxing, and impersonation detection. This skill covers configuring these gateways to detect and block targeted phishing attacks.

When to Use

Prerequisites

Key Concepts

Spearphishing Characteristics

Gateway Detection Layers

  1. Reputation filtering: IP/domain/URL reputation scoring
  2. Authentication checks: SPF, DKIM, DMARC validation
  3. Content analysis: NLP-based analysis of email body
  4. Impersonation detection: Display name and domain similarity matching
  5. URL analysis: Real-time URL detonation and redirect following
  6. Attachment sandboxing: Behavioral analysis of attachments in isolated environments
  7. Behavioral analytics: Anomaly detection in communication patterns

Workflow

Step 1: Configure Impersonation Protection

Microsoft Defender for Office 365:
  Security > Anti-phishing policies > Impersonation settings
  - Enable user impersonation protection for VIPs
  - Enable domain impersonation protection
  - Add protected users (CEO, CFO, HR Director)
  - Set action: Quarantine message

Proofpoint:
  Email Protection > Impostor Classifier
  - Enable display name spoofing detection
  - Configure lookalike domain detection
  - Set Impostor threshold sensitivity

Step 2: Configure URL Protection

Step 3: Configure Attachment Sandboxing

Step 4: Create Custom Detection Rules

Use the scripts/process.py to analyze email gateway logs, identify spearphishing patterns, and generate custom detection rules.

Step 5: Configure Alert and Response Actions

Tools & Resources

Validation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.