Agent skill

detecting-spearphishing-with-email-gateway

Spearphishing targets specific individuals using personalized, researched content that bypasses generic spam filters. Email security gateways (SEGs) like Microsoft Defender for Office 365, Proofpoint,

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/autohandai/community-skills/tree/main/detecting-spearphishing-with-email-gateway

SKILL.md

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.

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

Implementation Steps

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

Expand your agent's capabilities with these related and highly-rated skills.

autohandai/community-skills

mapping-mitre-attack-techniques

Maps observed adversary behaviors, security alerts, and detection rules to MITRE ATT&CK techniques and sub-techniques to quantify detection coverage and guide control prioritization. Use when building an ATT&CK-based coverage heatmap, tagging SIEM alerts with technique IDs, aligning security controls to adversary playbooks, or reporting threat exposure to executives. Activates for requests involving ATT&CK Navigator, Sigma rules, MITRE D3FEND, or coverage gap analysis.

0 0
Explore
autohandai/community-skills

hunting-for-spearphishing-indicators

Hunt for spearphishing campaign indicators across email logs, endpoint telemetry, and network data to detect targeted email attacks.

0 0
Explore
autohandai/community-skills

analyzing-malicious-url-with-urlscan

URLScan.io is a free service for scanning and analyzing suspicious URLs. It captures screenshots, DOM content, HTTP transactions, JavaScript behavior, and network connections of web pages in an isolat

0 0
Explore
autohandai/community-skills

implementing-zero-standing-privilege-with-cyberark

Deploy CyberArk Secure Cloud Access to eliminate standing privileges in hybrid and multi-cloud environments using just-in-time access with time, entitlement, and approval controls.

0 0
Explore
autohandai/community-skills

implementing-pam-for-database-access

Deploy privileged access management for database systems including Oracle, SQL Server, PostgreSQL, and MySQL. Covers session proxy configuration, credential vaulting, query auditing, dynamic credentia

0 0
Explore
autohandai/community-skills

detecting-t1003-credential-dumping-with-edr

Detect OS credential dumping techniques targeting LSASS memory, SAM database, NTDS.dit, and cached credentials using EDR telemetry, Sysmon process access monitoring, and Windows security event correlation.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results