Kerberos Pre-authentication Disabled for User

Identifies the modification of an account's Kerberos pre-authentication options. An adversary with GenericWrite/GenericAll rights over the account can maliciously modify these settings to perform offline password cracking attacks such as AS-REP roasting.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/01/24"
 3integration = ["system", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/10/23"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the modification of an account's Kerberos pre-authentication options. An adversary with
13GenericWrite/GenericAll rights over the account can maliciously modify these settings to perform offline password
14cracking attacks such as AS-REP roasting.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
18language = "kuery"
19license = "Elastic License v2"
20name = "Kerberos Pre-authentication Disabled for User"
21note = """## Triage and analysis
22
23### Investigating Kerberos Pre-authentication Disabled for User
24
25Kerberos pre-authentication is an account protection against offline password cracking. When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password. Microsoft's security monitoring [recommendations](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738) state that `'Don't Require Preauth' – Enabled` should not be enabled for user accounts because it weakens security for the account’s Kerberos authentication.
26
27AS-REP roasting is an attack against Kerberos for user accounts that do not require pre-authentication, which means that if the target user has pre-authentication disabled, an attacker can request authentication data for it and get a TGT that can be brute-forced offline, similarly to Kerberoasting.
28
29#### Possible investigation steps
30
31- Identify the user account that performed the action and whether it should perform this kind of action.
32- Contact the account owner and confirm whether they are aware of this activity.
33- Determine if the target account is sensitive or privileged.
34- Inspect the account activities for suspicious or abnormal behaviors in the alert timeframe.
35
36### False positive analysis
37
38- Disabling pre-authentication is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positives (B-TPs), especially if the target account is privileged.
39
40### Response and remediation
41
42- Initiate the incident response process based on the outcome of the triage.
43- Reset the target account's password if there is any risk of TGTs having been retrieved.
44- Re-enable the preauthentication option or disable the target account.
45- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.
46- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
47- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
48
49"""
50references = [
51    "https://harmj0y.medium.com/roasting-as-reps-e6179a65216b",
52    "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738",
53    "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0026_windows_audit_user_account_management.md",
54]
55risk_score = 47
56rule_id = "e514d8cd-ed15-4011-84e2-d15147e059f1"
57setup="""
58
59The 'Audit User Account Management' logging policy must be configured for (Success, Failure).
60Steps to implement the logging policy with Advanced Audit Configuration:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policies Configuration > Audit Policies > Account Management > Audit User Account Management (Success,Failure)

 1"""
 2severity = "medium"
 3tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Credential Access", "Tactic: Defense Evasion", "Tactic: Privilege Escalation", "Resources: Investigation Guide", "Use Case: Active Directory Monitoring", "Data Source: Active Directory"]
 4timestamp_override = "event.ingested"
 5type = "query"
 6
 7query = '''
 8event.code:4738 and winlog.api:"wineventlog" and message:"'Don't Require Preauth' - Enabled"
 9'''
10
11
12[[rule.threat]]
13framework = "MITRE ATT&CK"
14[[rule.threat.technique]]
15id = "T1558"
16name = "Steal or Forge Kerberos Tickets"
17reference = "https://attack.mitre.org/techniques/T1558/"
18[[rule.threat.technique.subtechnique]]
19id = "T1558.004"
20name = "AS-REP Roasting"
21reference = "https://attack.mitre.org/techniques/T1558/004/"
22
23
24
25[rule.threat.tactic]
26id = "TA0006"
27name = "Credential Access"
28reference = "https://attack.mitre.org/tactics/TA0006/"
29
30
31[[rule.threat]]
32framework = "MITRE ATT&CK"
33
34[[rule.threat.technique]]
35id = "T1562"
36name = "Impair Defenses"
37reference = "https://attack.mitre.org/techniques/T1562/"
38
39
40[rule.threat.tactic]
41id = "TA0005"
42name = "Defense Evasion"
43reference = "https://attack.mitre.org/tactics/TA0005/"
44
45
46[[rule.threat]]
47framework = "MITRE ATT&CK"
48
49[[rule.threat.technique]]
50id = "T1078"
51name = "Valid Accounts"
52reference = "https://attack.mitre.org/techniques/T1078/"
53[[rule.threat.technique.subtechnique]]
54id = "T1078.002"
55name = "Domain Accounts"
56reference = "https://attack.mitre.org/techniques/T1078/002/"
57
58
59
60[rule.threat.tactic]
61id = "TA0004"
62name = "Privilege Escalation"
63reference = "https://attack.mitre.org/tactics/TA0004/"

Triage and analysis

Investigating Kerberos Pre-authentication Disabled for User

Kerberos pre-authentication is an account protection against offline password cracking. When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password. Microsoft's security monitoring recommendations state that 'Don't Require Preauth' – Enabled should not be enabled for user accounts because it weakens security for the account’s Kerberos authentication.

AS-REP roasting is an attack against Kerberos for user accounts that do not require pre-authentication, which means that if the target user has pre-authentication disabled, an attacker can request authentication data for it and get a TGT that can be brute-forced offline, similarly to Kerberoasting.

Possible investigation steps

  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Contact the account owner and confirm whether they are aware of this activity.
  • Determine if the target account is sensitive or privileged.
  • Inspect the account activities for suspicious or abnormal behaviors in the alert timeframe.

False positive analysis

  • Disabling pre-authentication is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positives (B-TPs), especially if the target account is privileged.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Reset the target account's password if there is any risk of TGTs having been retrieved.
  • Re-enable the preauthentication option or disable the target account.
  • Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top