Skip to content

Commit f8c4b15

Browse files
committed
add rule for kerberos pre-authentication disabled on a user account
Setting DONT_REQ_PREAUTH (0x400000) on an account makes it AS-REP roastable. Discovery and the roasting itself are already covered, the flag change on event 4738 was not. Fires only when the flag is newly set, filtered against the old value.
1 parent 3c0d351 commit f8c4b15

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
title: Kerberos Pre-Authentication Disabled On A User Account
2+
id: 44203865-a195-46d9-97bd-12d1c1f81414
3+
status: experimental
4+
description: |
5+
Detects a change to a user account that turns off Kerberos pre-authentication by setting the "DONT_REQ_PREAUTH" (0x400000) flag in "userAccountControl".
6+
With pre-authentication disabled, a domain controller returns an AS-REP encrypted with the account's password-derived key to any requester, which can be captured and cracked offline (AS-REP Roasting). Setting this flag on an account the attacker can write to is a common way to make that account roastable.
7+
Scope: this rule matches user account changes logged as event 4738 and relies on "userAccountControl" being logged as a hexadecimal value. It does not cover the same flag set through a directory service modification (event 5136) or on computer accounts (event 4742).
8+
references:
9+
- https://blog.harmj0y.net/activedirectory/roasting-as-reps/
10+
- https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/useraccountcontrol-manipulate-account-properties
11+
author: mmadersbacher
12+
date: 2026-08-16
13+
tags:
14+
- attack.credential-access
15+
- attack.persistence
16+
- attack.t1558.004
17+
logsource:
18+
product: windows
19+
service: security
20+
definition: 'Requirements: Audit Policy : Account Management > Audit User Account Management, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies\Account Management\Audit User Account Management'
21+
detection:
22+
# 4738 logs "userAccountControl" as a hex value. DONT_REQ_PREAUTH (0x400000) is the
23+
# sixth hex digit from the right, so the patterns below match any nibble at that position
24+
# that has the 0x4 bit set. The filter drops changes where the flag was already set before.
25+
selection:
26+
EventID: 4738
27+
NewUacValue|endswith:
28+
- '4?????'
29+
- '5?????'
30+
- '6?????'
31+
- '7?????'
32+
- 'C?????'
33+
- 'D?????'
34+
- 'E?????'
35+
- 'F?????'
36+
filter_main_already_disabled:
37+
OldUacValue|endswith:
38+
- '4?????'
39+
- '5?????'
40+
- '6?????'
41+
- '7?????'
42+
- 'C?????'
43+
- 'D?????'
44+
- 'E?????'
45+
- 'F?????'
46+
condition: selection and not filter_main_already_disabled
47+
falsepositives:
48+
- Legacy applications or interoperability accounts that are intentionally configured without Kerberos pre-authentication. Filter these accounts by "TargetUserName".
49+
level: high

0 commit comments

Comments
 (0)