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,
What this skill does
# 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 - **Microsoft Defender for Office 365**: https://security.microsoft.com - **Proofpoint Email Protection**: https://www.proofpoint.com/us/products/email-security - **Mimecast Email Security**: https://www.mimecast.com/products/email-security/ - **Barracuda Email Protection**: https://www.barracuda.com/products/email-protection ## 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
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.