Microsoft XDR (Defender) - DeviceEvents - ShellLinkCreateFileEvent

viri4to 10 Reputation points
2024-12-19T18:02:05.2466667+00:00

Hi everyone,

I've been trying to create a hunting query in the Defender portal to identify when a malicious .lnk file is created. I noticed that an interesting event to detect and analyze this is "DeviceEvents --> ShellLinkCreateFileEvent", as the AdditionalFields include information such as ShellLinkIconPath, ShellLinkRunAsAdmin, or even the arguments used to execute the .lnk file (ShellLinkCommandLine, which is the most interesting one).

However, the target file of the shortcut is not displayed! This is the most basic information that should appear.

Do you know if this will be included in the future? Is it possible to obtain this information from another event by doing a join?

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud
Windows for business | Windows Server | Devices and deployment | Configure application groups
{count} votes

2 answers

Sort by: Most helpful
  1. Clive Watson 7,866 Reputation points MVP Volunteer Moderator
    2025-01-06T15:32:08.84+00:00

    Have you not got the details in the FileName column, or columns that start with "Initiating..."? especially InitiatingProcessCommandLine
    User's image

    DeviceEvents
    | where AdditionalFields contains "shellLink"
    | mv-expand AdditionalFields
    | distinct  tostring(AdditionalFields), FileName, FolderPath, InitiatingProcessCommandLine, InitiatingProcessFileName
    

  2. User989846-7900 1 Reputation point
    2025-07-17T16:22:20.26+00:00

    Hello,
    I noticed sometime this information is available in "AdditionalDetail" column key "ShellLinkIconPath".

    I don't know why this information is sometime lacking though.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.