Detect LNK Icon Smuggling in Splunk
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/
SPL Detection Query
index=windows (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="WinEventLog:Microsoft-Windows-Sysmon/Operational")
| eval EventCode=coalesce(EventCode, event_id)
| search EventCode IN (1, 11, 22)
| eval detection_type=case(
EventCode="11" AND TargetFilename LIKE "%.lnk" AND Image IN ("*\\powershell.exe", "*\\cmd.exe", "*\\wscript.exe", "*\\cscript.exe", "*\\mshta.exe", "*\\rundll32.exe"), "LNK_creation_by_scripting_engine",
EventCode="1" AND Image LIKE "*\\explorer.exe" AND match(CommandLine, "\s{15,}"), "LNK_padded_commandline_execution",
EventCode="1" AND Image LIKE "*\\explorer.exe" AND (CommandLine LIKE "%office.exe%" OR (CommandLine LIKE "%\\Temp\\%" AND CommandLine LIKE "%.exe%")), "LNK_suspicious_binary_from_temp",
EventCode="22" AND Image LIKE "*\\explorer.exe" AND (QueryName LIKE "%.ps1" OR QueryName LIKE "%.exe" OR QueryName LIKE "%.dll" OR QueryName NOT LIKE "%.microsoft.com"), "LNK_icon_field_dns_lookup",
true(), null()
)
| search detection_type=*
| eval risk_score=case(
detection_type="LNK_padded_commandline_execution", 85,
detection_type="LNK_suspicious_binary_from_temp", 90,
detection_type="LNK_icon_field_dns_lookup", 70,
detection_type="LNK_creation_by_scripting_engine", 65,
true(), 50
)
| table _time, Computer, detection_type, risk_score, Image, CommandLine, TargetFilename, QueryName, ParentImage
| sort -risk_score Detects LNK creation by scripting engines (EventCode 11), padded command line execution (EventCode 1 with 15+ consecutive spaces matching Kimsuky TTPs), suspicious binary execution from temp directories, and DNS queries triggered by explorer.exe that suggest LNK icon field URL resolution (EventCode 22). Tune QueryName exclusions to reduce false positives from legitimate icon downloads.
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.
- 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.
- 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.
- 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.
- 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.
References (7)
- https://attack.mitre.org/techniques/T1027/012
- https://unprotect.it/technique/shortcut-hiding/
- https://www.uperesia.com/booby-trapped-shortcut
- https://www.securonix.com/blog/detecting-kimsuky-lnk-attack-chain/
- https://symantec-enterprise-blogs.security.com/threat-intelligence/shuckworm-ukraine-usb
- https://blog.talosintelligence.com/mustang-panda-plugx-pubload/
- https://www.sophos.com/en-us/threat-center/threat-analyses/mustang-panda-plugx
Unlock Pro Content
Get the full detection package for T1027.012 including response playbook, investigation guide, and atomic red team tests.