1.通过创建服务获得System权限
sc Create TestService1 binPath= "cmd /c start" type= own type= interact
sc start TestService1
//只能在xp和win7系统使用。
2.利用psexec
a.从https://download.sysinternals.com/files/PSTools.zip 下载PsTools
b.解压后将PsExec.exe复制到C:WindowsSystem32中。
c.以管理员身份打开命令提示符
d.使用PsExec.exe启动一个新的命令提示符。通过使用PsExec.exe,您将在系统上下文中打开新的命令提示符,并且执行所有操作的账户将是LOCAL SYSTEM账户。这与Specops Deploy App在安装应用程序时使用的账户相同。
命令:
psexec.exe -accepteula -s -d cmd.exe
3.利用Meterpreter
需要使用工具getsystem-offline.exe和getsystem_service.exe
https://github.com/xpn/getsystem-offline(vs2019可以编译)
GetSystem-Offline
This is a simple tool that spawns a SYSTEM command prompt on Windows.
Created as a demo of access token security.
4.利用token复制获得System权限
下载地址:
https://labs.mwrinfosecurity.com/assets/BlogFiles/incognito2.zip
参考手册:
http://labs.mwrinfosecurity.com/assets/142/mwri_security-implications-of-windows-access-tokens_2008-04-14.pdf
常见用法如下:
列举token:
incognito.exe list_tokens -u
复制token:
incognito.exe execute [options] <token> <command>
命令:
incognito.exe execute -c "NT AUTHORITYSYSTEM" cmd.exe
这个比较好用。
这几种方法算比较简单的。有些比较复杂的方法等我测试过后再更新
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论