T1534 Elastic Security · Elastic

Detect Internal Spearphishing in Elastic Security

Adversaries who have already compromised an account or system may abuse the trusted internal identity to send phishing messages to other users within the same organization. Because the message originates from a known colleague, recipients are far more likely to open attachments, click links, or provide credentials. Campaigns typically combine a compromised mailbox or chat account with a weaponized attachment, a credential-harvesting link, or a malicious macro-enabled document. Real-world actors include Gamaredon (Outlook VBA module auto-sending phishing to contacts), Kimsuky (stolen credentials reused for internal mail), Leviathan/APT40, and HEXANE. Detection surfaces include anomalous send volume or recipient patterns from an internal account, Outlook spawning suspicious child processes (macro execution), Microsoft Teams delivering external URLs or files, and mass-BCC or reply-all abuse patterns.

MITRE ATT&CK

Tactic
Lateral Movement
Technique
T1534 Internal Spearphishing
Canonical reference
https://attack.mitre.org/techniques/T1534/

Elastic Detection Query

Elastic Security (Elastic)
eql
// Signal 1: Outlook spawning suspicious child processes (macro execution)
sequence by host.id with maxspan=5m
  [process where event.type == "start"
   and process.parent.name : "outlook.exe"
   and process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe",
                        "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe",
                        "certutil.exe", "bitsadmin.exe", "msiexec.exe", "wmic.exe",
                        "curl.exe", "wget.exe")]

// Signal 2: Anomalous internal email send volume — use separate query
// Query 2 (run independently): High volume O365 send events via filebeat/o365 module
// index: filebeat-*, index pattern: o365*
// from o365.audit where event.action == "Send"
// | stats count() by user.email, @timestamp

// Signal 3: Outlook macro child process (primary actionable EQL)
process where event.type == "start"
  and process.parent.name : "outlook.exe"
  and process.name : (
    "cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe",
    "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe",
    "certutil.exe", "bitsadmin.exe", "msiexec.exe", "wmic.exe",
    "curl.exe", "wget.exe", "msiexec.exe"
  )
high severity high confidence

Detects internal spearphishing (T1534) via three signals: Outlook VBA macro execution spawning suspicious child processes (highest fidelity), anomalous email send volume from internal accounts, and Teams messages containing suspicious external links or file extensions. The primary EQL query targets Outlook spawning LOLBins, a high-fidelity indicator of macro-enabled document execution from a phishing email sent via a compromised internal mailbox.

Data Sources

Elastic Endpoint (endpoint.events.process)Filebeat O365 module (o365.audit)Elastic SIEM — Windows process events via Winlogbeat or Elastic Agent

Required Tables

logs-endpoint.events.process-*logs-o365.audit-*winlogbeat-*

False Positives & Tuning

  • Outlook add-ins or plugins that legitimately spawn PowerShell for calendar sync, meeting automation, or CRM integration (e.g., Salesforce Outlook plugin running PowerShell for data sync).
  • IT-managed Outlook macros for internal workflow automation (e.g., auto-routing tickets, generating reports) that invoke cmd.exe or wscript.exe with known-good scripts.
  • Marketing or HR bulk email campaigns sent from internal distribution accounts during open enrollment or all-hands announcements may trigger the high-volume send signal.
Download portable Sigma rule (.yml)

Other platforms for T1534


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Outlook VBA Macro Auto-Send (Simulated Gamaredon Pattern)

    Expected signal: Sysmon Event ID 1: powershell.exe spawned with Outlook COM object instantiation. OfficeActivity O365 log: Operation=Send from the test account. If Outlook is running, Sysmon Event ID 10 (ProcessAccess) may show PowerShell accessing the Outlook process. Exchange/O365 message trace will record the outbound message.

  2. Test 2Write Malicious Macro to Outlook VbaProject.OTM

    Expected signal: Sysmon Event ID 11 (File Create): file creation event for the test artifact in %TEMP%. Sysmon Event ID 1: powershell.exe with path references to VbaProject.OTM. If Outlook is running and VbaProject.OTM is actually modified, Sysmon will log file modification events against the OTM path.

  3. Test 3Microsoft Teams Message with External Link (Simulated via Graph API)

    Expected signal: O365 OfficeActivity: RecordType=MicrosoftTeams, Operation=MessageCreatedHasLink, with the external URL in ExtraProperties. Azure AD sign-in log entry for the Graph API token use. Microsoft Defender for Cloud Apps (MCAS) may generate an alert for 'Suspicious inbox forwarding' or 'Unusual file share' depending on policy.

  4. Test 4Simulate Compromised Account Bulk Send via PowerShell Exchange Online

    Expected signal: O365 Unified Audit Log: multiple Send operations from [email protected] within a short window. Exchange message trace: batch of outbound messages with identical subject. Azure AD: interactive authentication event for the PowerShell connection. OfficeActivity table in Sentinel: Operation=Send entries for each recipient.

Unlock Pro Content

Get the full detection package for T1534 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections