Detect Account Manipulation in Google Chronicle
Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups. These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to bypass password duration policies and preserve the life of compromised credentials. In order to create or manipulate accounts, the adversary must already have sufficient permissions on systems or the domain. Account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged Valid Accounts.
MITRE ATT&CK
- Tactic
- Persistence Privilege Escalation
- Technique
- T1098 Account Manipulation
- Canonical reference
- https://attack.mitre.org/techniques/T1098/
YARA-L Detection Query
rule T1098_Account_Manipulation {
meta:
author = "Argus Detection Engineering"
description = "Detects T1098 Account Manipulation via Windows Security Events monitoring account property changes, permission modifications, and sensitive group membership additions."
mitre_attack_tactic = "Persistence, Privilege Escalation"
mitre_attack_technique = "T1098"
severity = "HIGH"
priority = "HIGH"
version = "1.0"
events:
$e.metadata.log_type = "WINEVTLOG"
$e.metadata.vendor_name = "Microsoft"
$e.metadata.product_name = "Windows"
$e.metadata.product_event_type in [
"4738", "4670", "4732", "4728", "4756", "4735", "4648"
]
not $e.principal.user.userid in [
"-", "SYSTEM", "LOCAL SERVICE", "NETWORK SERVICE", "ANONYMOUS LOGON"
]
not re.regex($e.principal.user.userid, `\$$`)
(
$e.metadata.product_event_type in ["4738", "4670", "4648"]
or
(
$e.metadata.product_event_type in ["4732", "4728", "4756", "4735"]
and
re.regex($e.target.group.group_display_name,
`(?i)(domain admins|enterprise admins|schema admins|^administrators$|account operators|backup operators|print operators|server operators|group policy creator owners|remote management users|esx admins)`
)
)
)
$actor = $e.principal.user.userid
$host = $e.principal.hostname
match:
$actor, $host over 1h
outcome:
$event_count = count_distinct($e.metadata.id)
$event_types = array_distinct($e.metadata.product_event_type)
$affected_accounts = array_distinct($e.target.user.userid)
$sensitive_group_hits = count_distinct($e.target.group.group_display_name)
$risk_score = if($sensitive_group_hits >= 3, "Critical",
if($sensitive_group_hits >= 1, "High",
if($event_count >= 10, "Medium", "Low")))
condition:
$e
} Google Chronicle YARA-L 2.0 rule detecting T1098 Account Manipulation. Matches Windows Security Event IDs 4738, 4670, 4732, 4728, 4756, 4735, and 4648 using UDM fields principal.user.userid, principal.hostname, target.group.group_display_name, and metadata.product_event_type. Aggregates over a 1-hour window per actor/host pair, excludes machine accounts (trailing $) and built-in system accounts, and focuses group-membership events on sensitive AD groups. Computes a risk score based on sensitive group involvement frequency.
Data Sources
Required Tables
False Positives & Tuning
- Identity lifecycle management platforms (e.g., Microsoft Identity Manager, Okta AD agent) performing synchronized provisioning operations that touch sensitive group memberships as part of role-based access control workflows across many users simultaneously
- Tiered administration models where Tier 0 admin accounts legitimately perform bulk account modifications on Domain Controllers — these will match on every policy enforcement run without indicating malicious activity
- Vulnerability scanners or EDR agents running under privileged service accounts that enumerate group memberships, causing 4648 explicit credential logon events that correlate with account modification events from the same host
Other platforms for T1098
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Add User to Local Administrators Group
Expected signal: Security Event ID 4732: A member was added to a security-enabled local group. SubjectUserName = actor, TargetUserName = Administrators (group), MemberName = df00tech-testuser. Sysmon Event ID 1 if executed via cmd.exe: Process Create with Image=net.exe, CommandLine='net localgroup Administrators df00tech-testuser /add'.
- Test 2Modify User Account Password — Simulate Credential Manipulation
Expected signal: Security Event ID 4738: A user account was changed. SubjectUserName = executing account, TargetUserName = df00tech-testuser. The 'Changed Attributes' section will show 'Password Last Set' updated. Sysmon Event ID 1: Process Create with net.exe command line visible.
- Test 3Disable Password Expiry on Account (UserAccountControl Manipulation)
Expected signal: Security Event ID 4738: A user account was changed. The event detail will show UserAccountControl change with the new value including the DONT_EXPIRE_PASSWORD flag (0x10000 bit set). SubjectUserName identifies the actor performing the change.
- Test 4Rename Administrator Account (Lazarus Group TTPs)
Expected signal: Security Event ID 4738: A user account was changed. TargetUserName will show the new account name, and 'SAM Account Name' in the changed attributes will reflect the rename. Sysmon Event ID 1: Process Create with wmic.exe and the rename command visible in CommandLine.
- Test 5Grant Remote Desktop Access via Group Membership
Expected signal: Security Event ID 4732: A member was added to a security-enabled local group. TargetUserName = Remote Desktop Users, MemberName = df00tech-testuser, SubjectUserName = executing account. Sysmon Event ID 1: Process Create for powershell.exe with Add-LocalGroupMember in CommandLine.
References (10)
- https://attack.mitre.org/techniques/T1098/
- https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4738
- https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4670
- https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4732
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738
- https://blog.stealthbits.com/manipulating-user-passwords-with-mimikatz-SetNTLM-ChangeNTLM
- https://github.com/gentilkiwi/mimikatz/issues/92
- https://www.fireeye.com/blog/threat-research/2021/06/darkside-affiliate-supply-chain-software-compromise.html
- https://www.volexity.com/blog/2021/03/01/the-mass-exploitation-of-on-premises-exchange-servers/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1098/T1098.md
Unlock Pro Content
Get the full detection package for T1098 including response playbook, investigation guide, and atomic red team tests.