Skip to content
Skillpedia
Agents35k · #7875

detecting-spearphishing-with-email-gateway

What it does

This tool helps protect your inbox from 'spearphishing' attacks. It configures email security systems to identify and block emails that look like they're from known people or companies, but are actually fake and malicious.

When to use it

  • ✓When you suspect you're receiving fake emails impersonating someone you know.
  • ✓When setting up or strengthening your email system's security to prevent targeted attacks.
  • ✓To investigate suspicious emails that bypassed normal spam filters.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-spearphishing-with-email-gateway/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-spearphishing-with-email-gateway/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Configure impersonation protection on my email gateway to block emails pretending to be the CEO.”

5 new skills a week. 1 minute to read.

How it works

The tool adjusts your email system's settings. It teaches the system to recognize emails that try to mimic trusted senders, to check suspicious links and attachments, and to create rules to block these attacks before they reach you.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

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

  • Access to email security gateway admin console
  • Understanding of email flow architecture (MX records, transport rules)
  • Familiarity with SPF/DKIM/DMARC authentication
  • Knowledge of common spearphishing techniques and pretexts

Key Concepts

Spearphishing Characteristics

  • Targeted recipients: Specific individuals, often executives or finance staff
  • Researched pretexts: References to real projects, colleagues, or events
  • Impersonation: Spoofs trusted senders (CEO, vendor, partner)
  • Low volume: Few emails to avoid pattern-based detection
  • Urgent tone: Creates pressure to act quickly

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

  • Enable Safe Links / URL rewriting
  • Enable time-of-click URL detonation
  • Block newly registered domains (< 30 days)
  • Enable URL redirect chain following

Step 3: Configure Attachment Sandboxing

  • Enable Safe Attachments / attachment sandboxing
  • Configure dynamic delivery (deliver body, hold attachments)
  • Set sandbox detonation timeout to 60+ seconds
  • Block macro-enabled Office documents from external senders

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

  • Real-time alerts for impersonation attempts
  • Automatic quarantine for high-confidence detections
  • User notification with safety tips
  • Integration with SIEM for correlation

Tools & Resources

Validation

  • Impersonation protection correctly identifies spoofed VIP display names
  • URL detonation catches malicious links in test phishing emails
  • Attachment sandboxing detects weaponized documents
  • Custom rules trigger on known spearphishing patterns
  • SIEM integration receives gateway alerts
FAQ

What is 'spearphishing'?

It's a type of fake email attack that is highly targeted at a specific person or group, using personalized information to seem more trustworthy and trick the victim.

What email systems does this tool support?

It works with systems like Microsoft Defender for Office 365, Proofpoint, Mimecast, and Barracuda.

Do I need to be a security expert to use this?

It's helpful to have some basic knowledge of how emails work and how to configure security systems, but the tool simplifies the process of detecting and blocking.

Details

Original description by the author

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, Mimecast, or Barracuda. Use when hardening a mail gateway against targeted phishing or investigating a s

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#7875
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills