UC0002: Domain user enumeration attack using the Kerberos protocol without a domain account
Summary
ID | UC0002 |
---|---|
Brief Description | Attackers can carry out a Domain User Enumaration attack using Kerberos authentication protocol. Their purpose may be to obtain valid usernames for futher attacks (such as phishing or password spraying) |
Author | @ERMACK_COMMUNITY |
Creation Date | 2023/03/12 |
Modification Date | 2023/03/12 |
ATT&CK Tactics | |
ATT&CK Techniques | |
Tags |
|
Linked Response Playbooks | |
Artifacts |
Description
Artifact | Object | Description |
---|---|---|
Windows domain account | Attacked domain accounts | Domain accounts whose names the attackers are trying to find out |
Host | Compromised host | Compromissed host from which the attack occur |
IP Address | Compromissed host IP Address | IP Address from which the attack occur |
Authentication Service | Authentication service on domain controller | Authentication service on domain controller on which attacker send KRB_AS_REQ messages |
Kerberos network traffic | Kerberos protocol messages | Kerberos protocol messages which generated during the attack |
In this attack, attackers use a pecularity of the Kerberos protocol, which allows them to find out if a user with any name exist in domain
Attack prerequisites
- Authentication service network availability
Attack results
- One or more domain account usernames
Attack progress
Study
Username pattern definition
- Finding user email addresses (T1589.002)
- Finding usernames (T1589.003)
- Hypothesis about usernames pattern in domain
Choose usernames
- Selecting usernames from a list of generally or created based information about username pattern
Exploitation
Username guessing
- Attackers send KRB_AS_REQ message without pre-authentication and with username to Authentication service
- If account exist in domain, then Authentication service return response with KDC_ERR_PREAUTH_REQUIRED message, which means user with specified name find, but for success authenticate need send KRB_AS_REQ message with pre-authenticate
- If there is no user with this name in the domain, then Authentication service return response with KDC_ERR_C_PRINCIPAL_UNKNOWN mesasage.
Some tools for carry out this attack
1.
./kerbrute_linux_amd64 userenum --dc <domain_controller_ip_addr> -d contoso.local users.txt --output found_users.txt
nmap -Pn -n -p88 --script krb5-enum-users --script-args krb5-enum-users.realm='contoso.local',userdb='users.txt' <domain_controller_ip_addr>