T1566.002 Sumo Logic CSE · Sumo

Detect Spearphishing Link in Sumo Logic CSE

Adversaries may send spearphishing emails with a malicious link in an attempt to gain access to victim systems. Unlike spearphishing attachments, this variant embeds URLs in email body text, requiring the recipient to actively click or paste the link into a browser. Clicked links may deliver browser exploits, prompt downloads of malware or scripts, or harvest credentials via convincing login pages. Advanced variants include OAuth consent phishing (abusing OAuth 2.0 authorization flows to steal application access tokens), device code phishing (abusing OAuth 2.0 device authorization grant to obtain persistent tokens), and IDN homograph attacks where lookalike Unicode domains impersonate trusted brands. URLs may also be obfuscated via URL shorteners, integer-format IP addresses (e.g., hxxp://1157586937), or the @ symbol trick. Threat actors including Kimsuky, MuddyWater, BlackTech, LuminousMoth, DarkGate, and Squirrelwaffle have extensively leveraged this technique.

MITRE ATT&CK

Tactic
Initial Access
Technique
T1566 Phishing
Sub-technique
T1566.002 Spearphishing Link
Canonical reference
https://attack.mitre.org/techniques/T1566/002/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=windows/sysmon OR _sourceCategory=windows/security
| where EventID = "1" OR EventCode = "1"
| parse field=ParentImage "*" as parent_image nodrop
| parse field=Image "*" as child_image nodrop
| parse field=CommandLine "*" as cmdline nodrop
| eval parent_lower = toLowerCase(parent_image)
| eval child_lower = toLowerCase(child_image)
| eval cmdline_lower = toLowerCase(cmdline)
| eval is_email_client = if(parent_lower matches "*outlook.exe*" OR parent_lower matches "*thunderbird.exe*" OR parent_lower matches "*teams.exe*" OR parent_lower matches "*msoutlook.exe*", 1, 0)
| eval is_browser = if(parent_lower matches "*msedge.exe*" OR parent_lower matches "*chrome.exe*" OR parent_lower matches "*firefox.exe*" OR parent_lower matches "*iexplore.exe*" OR parent_lower matches "*opera.exe*" OR parent_lower matches "*brave.exe*", 1, 0)
| eval is_mshta_parent = if(parent_lower matches "*mshta.exe*", 1, 0)
| eval is_suspicious_child = if(child_lower matches "*powershell.exe*" OR child_lower matches "*pwsh.exe*" OR child_lower matches "*cmd.exe*" OR child_lower matches "*wscript.exe*" OR child_lower matches "*cscript.exe*" OR child_lower matches "*mshta.exe*" OR child_lower matches "*rundll32.exe*" OR child_lower matches "*regsvr32.exe*" OR child_lower matches "*msiexec.exe*" OR child_lower matches "*certutil.exe*" OR child_lower matches "*bitsadmin.exe*" OR child_lower matches "*curl.exe*" OR child_lower matches "*wget.exe*", 1, 0)
| eval is_legit_browser_proc = if(cmdline_lower matches "*--type=renderer*" OR cmdline_lower matches "*--type=utility*" OR cmdline_lower matches "*--type=gpu-process*" OR cmdline_lower matches "*--extension-process*" OR cmdline_lower matches "*nativemessaginghost*" OR cmdline_lower matches "*microsoftedgeupdate*" OR cmdline_lower matches "*googleupdate*" OR cmdline_lower matches "*chromesetup*", 1, 0)
| where (is_email_client = 1 OR is_browser = 1 OR is_mshta_parent = 1) AND is_suspicious_child = 1 AND is_legit_browser_proc = 0
| eval detection_vector = if(is_email_client = 1, "EmailClientDirectSpawn", if(is_mshta_parent = 1, "MshtaChainSpawn", "BrowserSpawnedSuspiciousProcess"))
| eval risk_score = if(is_mshta_parent = 1, 90, if(is_email_client = 1, 85, if(is_browser = 1 AND (child_lower matches "*powershell.exe*" OR child_lower matches "*wscript.exe*" OR child_lower matches "*cscript.exe*" OR child_lower matches "*mshta.exe*"), 75, 60)))
| fields _messageTime, Computer, User, child_image, cmdline, parent_image, ParentCommandLine, detection_vector, risk_score
| sort by risk_score, _messageTime
high severity high confidence

Sumo Logic query detecting T1566.002 spearphishing link follow-on execution across three vectors: email clients spawning scripting tools, browsers spawning suspicious child processes, and mshta.exe chaining to additional payloads. Parses Sysmon Event ID 1 process creation logs with risk scoring.

Data Sources

Sumo Logic Cloud SIEMWindows Sysmon via Sumo Logic CollectorWindows Security Event Log

Required Tables

_sourceCategory=windows/sysmon_sourceCategory=windows/security

False Positives & Tuning

  • Legitimate business software that registers custom URL protocol handlers (e.g., zoom://, vscode://) which are invoked from browser clicks and subsequently launch helper executables
  • Enterprise MDM or endpoint management tools that deliver scripts via email or intranet links that users open in a browser, triggering msiexec or PowerShell
  • Browser-based web applications using Native Messaging to communicate with local agents that may be incorrectly flagged if the exclusion pattern matching misses slight variations
Download portable Sigma rule (.yml)

Other platforms for T1566.002


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 1Email Client Spawning PowerShell via Link Handler

    Expected signal: Sysmon Event ID 1: Process Create — Image=powershell.exe, CommandLine contains '-WindowStyle Hidden' and 'Net.WebClient' and 'DownloadString'. Sysmon Event ID 3: Network connection attempt to 127.0.0.1:8080 (connection refused). Security Event ID 4688 if command line auditing is enabled. PowerShell ScriptBlock Log Event ID 4104 with full script content.

  2. Test 2Browser Spawning MSHTA via HTA File Download

    Expected signal: Sysmon Event ID 1: Process Create — Image=mshta.exe, ParentImage=msedge.exe (or cmd.exe depending on Edge's open handler). Sysmon Event ID 11: File creation event for df00tech-test.hta in %TEMP%. Security Event ID 4688 for mshta.exe process creation with full command line including path to HTA file.

  3. Test 3OAuth Device Code Phishing Flow Initiation

    Expected signal: Sysmon Event ID 1: Process Create — Image=powershell.exe, CommandLine contains 'devicecode' and 'login.microsoftonline.com'. Sysmon Event ID 3: Network connection to login.microsoftonline.com on port 443. Sysmon Event ID 22: DNS query for login.microsoftonline.com. Azure AD sign-in logs: device code flow request entry visible in non-interactive sign-in logs for the test client_id (04b07795 is the Azure CLI client ID, a well-known public client).

  4. Test 4Malicious Link Payload Drop Simulation

    Expected signal: Sysmon Event ID 11: File creation in %TEMP% for Invoice_2026-03-12.pdf.cmd (double extension with .cmd as final extension). Sysmon Event ID 1: Process Create — Image=cmd.exe, CommandLine references the %TEMP% staged file path, ParentImage=powershell.exe. Security Event ID 4688 for both powershell.exe and cmd.exe. The temporal pattern of PowerShell network activity followed by file creation in staging dir followed by cmd.exe execution matches the hunting query for email client network + file drop correlation.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections