Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for T1027.012.

Upgrade to Pro
T1027.012 Microsoft Sentinel · KQL

Detect LNK Icon Smuggling in Microsoft Sentinel

This detection identifies adversary abuse of Windows shortcut (.LNK) file metadata — specifically the IconEnvironmentDataBlock (icon location field) and target path field — to smuggle commands or URLs that download malicious payloads. Threat actors including Kimsuky, Gamaredon Group, and Mustang Panda have leveraged crafted LNK files delivered via phishing or USB to execute scripts and binaries while displaying benign icons (e.g., PDF, Word document). Detection focuses on LNK files spawning unusual child processes, network connections originating from LNK-invoked interpreters, suspicious icon paths pointing to remote UNC or HTTP locations, and command-line interpreters launched with padded or obfuscated arguments consistent with LNK target field abuse.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1027 Obfuscated Files or Information
Sub-technique
T1027.012 LNK Icon Smuggling
Canonical reference
https://attack.mitre.org/techniques/T1027/012/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let LNKSpawnedInterpreters = DeviceProcessEvents
| where InitiatingProcessFileName =~ "explorer.exe" or InitiatingProcessCommandLine has ".lnk"
| where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "curl.exe", "bitsadmin.exe")
| where ProcessCommandLine has_any ("http://", "https://", "ftp://", "\\\\")
    or ProcessCommandLine matches regex @"(?i)(iex|invoke-expression|downloadstring|downloadfile|webclient|wget|curl)"
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, FolderPath, SHA256, InitiatingProcessSHA256;
let LNKNetworkActivity = DeviceNetworkEvents
| where InitiatingProcessFileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| where InitiatingProcessCommandLine has ".lnk" or RemoteUrl has_any (".ps1", ".vbs", ".bat", ".hta", ".exe", ".dll")
| where RemoteIPType != "Private"
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIP, RemoteUrl, RemotePort;
LNKSpawnedInterpreters
| union LNKNetworkActivity
| order by TimeGenerated desc
high severity high confidence

Detects LNK files invoking command interpreters or download utilities with external URLs or UNC paths in the process command line, and network connections from LNK-spawned scripting hosts to external IPs delivering executable payloads.

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceProcessEventsDeviceNetworkEvents

False Positives & Tuning

  • Legitimate LNK shortcuts that reference network shares for shared software installations (e.g., corporate app deployment via UNC paths)
  • IT management tools that create LNK files pointing to administrative scripts hosted on internal web servers
  • Software update agents that use shortcut files to trigger PowerShell-based update checks against known-good URLs

Other platforms for T1027.012


Testing Methodology

Validate this detection against 3 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 1LNK Icon Path URL Trigger via PowerShell Download

    Expected signal: DeviceProcessEvents: powershell.exe spawned by explorer.exe with -WindowStyle Hidden and DownloadString URL; DeviceNetworkEvents: outbound connection from powershell.exe to 127.0.0.1:8080; Sysmon Event ID 11: LNK file creation in %TEMP%; Sysmon Event ID 3: network connection from powershell.exe

  2. Test 2LNK Target Field Padding to Bypass Visual Inspection

    Expected signal: Sysmon Event ID 1 or Security Event ID 4688: cmd.exe spawned by explorer.exe; CommandLine field showing /c echo command with 300+ trailing spaces; Sysmon Event ID 11: lnk_test_output.txt created in %TEMP%

  3. Test 3LNK File Executing mshta for Remote HTA Payload

    Expected signal: DeviceProcessEvents: mshta.exe spawned by explorer.exe with HTTP URL argument; DeviceNetworkEvents: outbound HTTP GET from mshta.exe to 127.0.0.1:8080; Sysmon Event ID 1: mshta.exe with command line containing http://; Sysmon Event ID 3: network connection from mshta.exe process

Unlock playbooks & atomic tests with Pro

Get the full detection package for T1027.012 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections