T1027.012

LNK Icon Smuggling

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.

Microsoft Sentinel / Defender
kusto
// T1027.012 - LNK Icon Smuggling
// Detect suspicious LNK file creation and network connections triggered by LNK icon field
let SuspiciousLnkCreators = DeviceFileEvents
| where ActionType == "FileCreated"
| where FileName endswith ".lnk"
| where InitiatingProcessFileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe")
| project DeviceId, DeviceName, LnkCreationTime=Timestamp, LnkFileName=FileName, LnkFolderPath=FolderPath, InitiatingProcessCommandLine, InitiatingProcessFileName;
let LnkInducedNetwork = DeviceNetworkEvents
| where InitiatingProcessFileName =~ "explorer.exe"
| where RemoteUrl has_any ("http://", "https://", ".ps1", ".exe", ".dll", ".bat", ".vbs")
| where RemotePort in (80, 443, 8080, 8443)
| project DeviceId, DeviceName, NetworkTime=Timestamp, RemoteUrl, RemoteIP, RemotePort;
SuspiciousLnkCreators
| join kind=leftouter (
    LnkInducedNetwork
) on DeviceId
| union (
    // LNK files spawning processes with heavily padded command lines (Kimsuky pattern)
    DeviceProcessEvents
    | where InitiatingProcessFileName =~ "explorer.exe"
    | where ProcessCommandLine matches regex @"\s{20,}"
    | where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "regsvr32.exe", "rundll32.exe")
    | extend Detection = "LNK_padded_commandline"
)
| union (
    // LNK executing office.exe or renamed binaries from temp/appdata (Mustang Panda/TONESHELL)
    DeviceProcessEvents
    | where InitiatingProcessFileName =~ "explorer.exe"
    | where FolderPath has_any ("\\Temp\\", "\\AppData\\Local\\Temp\\", "\\AppData\\Roaming\\")
    | where FileName =~ "office.exe" or (FileName endswith ".exe" and FolderPath !has "Program Files")
    | extend Detection = "LNK_suspicious_binary_execution"
)
| extend Detection = coalesce(Detection, "LNK_payload_creation")
| project-reorder Timestamp, DeviceName, Detection, FileName, ProcessCommandLine, FolderPath, InitiatingProcessCommandLine
severity confidence

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