Skip to content

Commit fcbe267

Browse files
committed
[AD Entity Analytics] Fix UserAccountControl Attribute Table
1 parent 65a68e8 commit fcbe267

File tree

4 files changed

+40
-32
lines changed

4 files changed

+40
-32
lines changed

packages/entityanalytics_ad/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.11.0"
3+
changes:
4+
- description: Fix useraccountcontrol conversion.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/13145
27
- version: "0.10.0"
38
changes:
49
- description: Changes the field used to populate `user.name` to `sam_account_name`.

packages/entityanalytics_ad/data_stream/user/_dev/test/pipeline/test-user.json-expected.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@
216216
"sam_account_name": "Administrator",
217217
"sam_account_type": "805306368",
218218
"uac_list": [
219-
"USER_DONT_REQUIRE_PREAUTH",
220-
"USER_DONT_EXPIRE_PASSWORD"
219+
"DONT_EXPIRE_PASSWORD",
220+
"NORMAL_ACCOUNT"
221221
],
222222
"user_account_control": "66048",
223223
"usn_changed": "25166",
@@ -307,10 +307,10 @@
307307
"sam_account_name": "Guest",
308308
"sam_account_type": "805306368",
309309
"uac_list": [
310-
"USER_MNS_LOGON_ACCOUNT",
311-
"USER_DONT_REQUIRE_PREAUTH",
312-
"USER_HOME_DIRECTORY_REQUIRED",
313-
"USER_DONT_EXPIRE_PASSWORD"
310+
"PASSWD_NOTREQD",
311+
"DONT_EXPIRE_PASSWORD",
312+
"ACCOUNTDISABLE",
313+
"NORMAL_ACCOUNT"
314314
],
315315
"user_account_control": "66082",
316316
"usn_changed": "8197",
@@ -444,8 +444,8 @@
444444
"service_principal_name": "kadmin/changepw",
445445
"show_in_advanced_view_only": true,
446446
"uac_list": [
447-
"USER_HOME_DIRECTORY_REQUIRED",
448-
"USER_DONT_EXPIRE_PASSWORD"
447+
"ACCOUNTDISABLE",
448+
"NORMAL_ACCOUNT"
449449
],
450450
"user_account_control": "514",
451451
"usn_changed": "12785",

packages/entityanalytics_ad/data_stream/user/elasticsearch/ingest_pipeline/entity.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -166,30 +166,33 @@ processors:
166166
tag: Set User Account Control
167167
description: Set User Account Control
168168
# USER_ACCOUNT Codes
169-
# https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/b10cfda1-f24f-441b-8f43-80cb93e786ec
169+
# https://learn.microsoft.com/en-us/windows/win32/adschema/a-useraccountcontrol
170+
# https://learn.microsoft.com/en-us/windows/win32/api/iads/ne-iads-ads_user_flag_enum
170171
params:
171-
"0x00000001": USER_ACCOUNT_DISABLED
172-
"0x00000002": USER_HOME_DIRECTORY_REQUIRED
173-
"0x00000004": USER_PASSWORD_NOT_REQUIRED
174-
"0x00000008": USER_TEMP_DUPLICATE_ACCOUNT
175-
"0x00000010": USER_NORMAL_ACCOUNT
176-
"0x00000020": USER_MNS_LOGON_ACCOUNT
177-
"0x00000040": USER_INTERDOMAIN_TRUST_ACCOUNT
178-
"0x00000080": USER_WORKSTATION_TRUST_ACCOUNT
179-
"0x00000100": USER_SERVER_TRUST_ACCOUNT
180-
"0x00000200": USER_DONT_EXPIRE_PASSWORD
181-
"0x00000400": USER_ACCOUNT_AUTO_LOCKED
182-
"0x00000800": USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED
183-
"0x00001000": USER_SMARTCARD_REQUIRED
184-
"0x00002000": USER_TRUSTED_FOR_DELEGATION
185-
"0x00004000": USER_NOT_DELEGATED
186-
"0x00008000": USER_USE_DES_KEY_ONLY
187-
"0x00010000": USER_DONT_REQUIRE_PREAUTH
188-
"0x00020000": USER_PASSWORD_EXPIRED
189-
"0x00040000": USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION
190-
"0x00080000": USER_NO_AUTH_DATA_REQUIRED
191-
"0x00100000": USER_PARTIAL_SECRETS_ACCOUNT
192-
"0x00200000": USER_USE_AES_KEYS
172+
"0x00000001": SCRIPT
173+
"0x00000002": ACCOUNTDISABLE
174+
"0x00000008": HOMEDIR_REQUIRED
175+
"0x00000010": LOCKOUT
176+
"0x00000020": PASSWD_NOTREQD
177+
"0x00000040": PASSWD_CANT_CHANGE
178+
"0x00000080": ENCRYPTED_TEXT_PWD_ALLOWED
179+
"0x00000100": TEMP_DUPLICATE_ACCOUNT
180+
"0x00000200": NORMAL_ACCOUNT
181+
"0x00000800": INTERDOMAIN_TRUST_ACCOUNT
182+
"0x00001000": WORKSTATION_TRUST_ACCOUNT
183+
"0x00002000": SERVER_TRUST_ACCOUNT
184+
"0x00010000": DONT_EXPIRE_PASSWORD
185+
"0x00020000": MNS_LOGON_ACCOUNT
186+
"0x00040000": SMARTCARD_REQUIRED
187+
"0x00080000": TRUSTED_FOR_DELEGATION
188+
"0x00100000": NOT_DELEGATED
189+
"0x00200000": USE_DES_KEY_ONLY
190+
"0x00400000": DONT_REQUIRE_PREAUTH
191+
"0x00800000": PASSWORD_EXPIRED
192+
"0x01000000": TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION
193+
"0x02000000": NO_AUTH_DATA_REQUIRED
194+
"0x04000000": PARTIAL_SECRETS_ACCOUNT
195+
"0x08000000": USE_AES_KEYS
193196
source: |-
194197
Long newUacValue = Long.decode(ctx.activedirectory.user.user_account_control);
195198
ArrayList uacResult = new ArrayList();

packages/entityanalytics_ad/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.2"
22
name: entityanalytics_ad
33
title: Active Directory Entity Analytics
4-
version: "0.10.0"
4+
version: "0.11.0"
55
description: "Collect User Identities from Active Directory Entity with Elastic Agent."
66
type: integration
77
categories:

0 commit comments

Comments
 (0)