T1027.012 Elastic Security · Elastic

Detect LNK Icon Smuggling in Elastic Security

Adversaries abuse Windows shortcut (.LNK) files to smuggle malicious payloads past content filters. LNK files contain metadata fields including an icon location field (IconEnvironmentDataBlock) designed to specify an icon file path. Adversaries exploit this field to reference external URLs that trigger payload downloads when the LNK is invoked. They also abuse the LNK target path field to embed interpreter commands with obfuscated arguments, often padding target fields with extra spaces to hide the malicious portion from casual inspection. Threat actors including Kimsuky, Gamaredon Group, Mustang Panda, and TONESHELL malware have weaponized LNK files with spoofed PDF icons to trick users into executing malicious binaries.

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.id with maxspan=5m
  [file where event.action == "creation" and file.extension == "lnk" and
   process.name in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe")]
  [any where event.category in ("network", "process") and process.name == "explorer.exe"]

/* Standalone: padded commandline from explorer */
process where event.type == "start" and
  process.parent.name == "explorer.exe" and
  process.name in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "regsvr32.exe", "rundll32.exe") and
  process.command_line regex~ ".*\\s{15,}.*"

/* Standalone: suspicious binary execution from temp via explorer */
process where event.type == "start" and
  process.parent.name == "explorer.exe" and
  (
    process.name == "office.exe" or
    (process.executable regex~ "(?i).*(\\\\Temp\\\\|\\\\AppData\\\\Local\\\\Temp\\\\|\\\\AppData\\\\Roaming\\\\).*\.exe")
  )
high severity high confidence

Detects T1027.012 LNK Icon Smuggling via three patterns: (1) LNK file creation by scripting engines followed by explorer.exe network/process activity, (2) explorer.exe spawning interpreters with heavily padded command lines (Kimsuky pattern), and (3) explorer.exe executing suspicious binaries from temp or AppData paths (Mustang Panda/TONESHELL pattern).

Data Sources

Elastic Endpoint SecurityWindows Event Logs via Elastic AgentSysmon via Elastic Agent

Required Tables

logs-endpoint.events.file-*logs-endpoint.events.process-*logs-endpoint.events.network-*logs-windows.sysmon_operational-*

False Positives & Tuning

  • Legitimate software installers creating LNK shortcuts via cmd.exe or PowerShell during installation workflows
  • IT automation scripts (PDQ Deploy, SCCM) that create desktop shortcuts programmatically
  • Developer tools that launch explorer.exe child processes with long argument strings for legitimate application execution
Download portable Sigma rule (.yml)

Other platforms for T1027.012


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 1Create LNK with External Icon URL

    Expected signal: Sysmon EventCode 11 (FileCreate) for the .lnk file creation. EventCode 1 (ProcessCreate) showing powershell.exe creating the file via WScript.Shell COM object.

  2. Test 2LNK with Padded Target Path (Kimsuky Evasion)

    Expected signal: Sysmon EventCode 11 for LNK creation by powershell.exe. If executed: EventCode 1 showing cmd.exe spawned from explorer.exe with 260 spaces in CommandLine, then child powershell.exe process.

  3. Test 3LNK with PDF Icon Spoofing (Mustang Panda/TONESHELL Pattern)

    Expected signal: Sysmon EventCode 11 for LNK creation. EventCode 1 for calc.exe (renamed as office.exe) execution from %TEMP% if the LNK is invoked. EventCode 11 for office.exe copy operation.

  4. Test 4LNK Executed via Script (Automated Execution Pattern)

    Expected signal: Sysmon EventCode 11 for LNK creation by powershell.exe. EventCode 1 for cmd.exe spawned from powershell.exe. If icon URL were external: EventCode 22 DNS query and EventCode 3 network connection.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections