# LNK Files

In accordance to fileinfo.com&#x20;

An **LNK file** is a shortcut or "link" used by Windows as a reference to an original **file**, folder, or application similar to an alias on the Macintosh platform. It contains the shortcut target type, location, and filename as well as the program that opens the target **file** and an optional shortcut key.

It's imply a shortcut link those icons you regularly see in your Desktop. You can identify them by the curved arrow on the bottom left corner of the Icon.

![](/files/-M5bxmTJPzaiwUasRiA_)

Let's check the properties on the Icon

![](/files/-M5bxt3XFjB8GMwjs8ym)

It tells me where it's located and what binary is executed, with it's full path included. What happens if I change the Path?.

Our icons have changed.

![](/files/-M5bzXZNW_2HRTAU_YKS)

![](/files/-M5bz_GUyaaprcjMQoKH)

Can we fix this so we can confuse or trick the user? Of Course it's all in the settings and we can apply the path of the specific Icon we are searching for in the Machine.

![](/files/-M5c-4G_aE0-YFxf78XY)

What happens when I execute this Shortcut, it should point to our TEST File. And execute the text file.

![](/files/-M5c-mRqXqbiWbyrsrnb)

This is a good way to also execute code we can use powershell or any of the EXECUTION techniques mentioned to call our payload, not the most stealthiest and reliable since it requires the user to interact with this file but a valueable source to know it exists.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dmcxblue.gitbook.io/red-team-notes/initial-acces/spear-phishing/lnk-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
