Link File Attack Post Exploitation
The article describes a link file attack in an Active Directory environment where an attacker with existing access creates a malicious shortcut file that points to a remote SMB share. When a user opens the shortcut, their NTLMv2 hash is sent to the attacker's machine and can be captured with Responder and cracked offline.
Published on systemweakness.com
Feeling stuck? Or trying to move leteral or verticle; link file attacks come into play when we feel stuck in compromising other users.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the attacker already has valid credentials or code execution on a machine, allowing them to create a shortcut file that references a remote SMB path; when a user opens it, Windows automatically authenticates to that remote server, leaking the NTLMv2 hash.
Impact
An attacker who can place a malicious shortcut file on a victim's machine could capture the victim's NTLMv2 hash when the shortcut is opened, and then attempt to crack it offline to recover the password.
What the attacker needed
Valid credentials or code execution on a victim machine; ability to write a shortcut file to a location the victim…; victim opens the shortcut file; attacker runs Responder on the network
How it was found
- Gain a shell on a victim machine using psexec (via msfconsole or psexec.py).
- Switch to a PowerShell session.
- Use a PowerShell script to create a shortcut file that points to a remote SMB share on the attacker's IP.
- Copy the shortcut file to a location the victim is likely to visit, such as the desktop.
- Run Responder on the attacker's machine with HTTP and SMB enabled.
- Wait for a user to open the shortcut, then capture the NTLMv2 hash and crack it with Hashcat.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A link file is a Windows shortcut that can point to a file on another computer. If an attacker can place such a shortcut on a victim's machine, opening it makes Windows automatically send the user's login hash to the attacker's computer. The attacker can then try to crack that hash to recover the password.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.