Detect Account Manipulation in CrowdStrike LogScale
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/
LogScale Detection Query
// T1098 Account Manipulation — Windows Security Events via CrowdStrike Falcon LogScale
// Requires Windows Security Event Log forwarding to LogScale
#event_simpleName = "UserAccountModified"
OR (#event_simpleName = "UserAccountCreated" AND TargetUserName != "")
OR (
event.code in [4738, 4670, 4732, 4728, 4756, 4735, 4648]
AND channel = "Security"
)
| SubjectUserName != ["-", "SYSTEM", "LOCAL SERVICE", "NETWORK SERVICE", "ANONYMOUS LOGON"]
| !regex(SubjectUserName, regex=`\$$`)
| changeType := case {
event.code == 4738 => "UserAccountModified";
event.code == 4670 => "PermissionsChanged";
event.code == 4732 => "AddedToLocalGroup";
event.code == 4728 => "AddedToGlobalGroup";
event.code == 4756 => "AddedToUniversalGroup";
event.code == 4735 => "LocalGroupModified";
event.code == 4648 => "ExplicitCredentialLogon";
#event_simpleName == "UserAccountModified" => "FalconUserAccountModified";
* => "Unknown"
}
| isSensitiveGroup := if(
regex(TargetUserName, regex=`(?i)(domain admins|enterprise admins|schema admins|^administrators$|account operators|backup operators|server operators|group policy creator owners|remote management users|esx admins)`),
1, 0
)
| isHighRisk := if(isSensitiveGroup == 1 OR event.code == 4670, 1, 0)
| groupBy(
[SubjectUserName, ComputerName],
function=[
count(as=TotalEvents),
sum(isHighRisk, as=HighRiskCount),
collect([changeType], as=ChangeTypes, limit=20),
collect([TargetUserName], as=AffectedAccounts, limit=20),
min(@timestamp, as=FirstSeen),
max(@timestamp, as=LastSeen)
]
)
| RiskScore := case {
HighRiskCount >= 3 => "Critical";
HighRiskCount >= 1 => "High";
TotalEvents >= 10 => "Medium";
* => "Low"
}
| sort(HighRiskCount, TotalEvents, order=desc) Detects T1098 Account Manipulation in CrowdStrike LogScale (Humio) using both native Falcon telemetry (UserAccountModified event_simpleName) and Windows Security Event Log forwarding (event.code 4738, 4670, 4732, 4728, 4756, 4735, 4648). Excludes system accounts and machine accounts (trailing $). Groups by actor and hostname, computing HighRiskCount based on sensitive group involvement and permission changes. Produces a tiered risk score — Critical for 3+ high-risk events, High for any sensitive group hit, Medium for 10+ total events.
Data Sources
Required Tables
False Positives & Tuning
- CrowdStrike Falcon Spotlight or Identity Protection module performing automated account risk assessments, which can generate UserAccountModified telemetry for accounts flagged during posture evaluation scans across the fleet
- Enterprise PAM solutions (e.g., BeyondTrust, CyberArk) checking out privileged credentials and performing just-in-time group membership elevation — these generate clusters of sensitive group addition events from a service account that self-resolve after the checkout window expires
- Microsoft Entra ID (Azure AD) Connect sync agents reconciling on-premises AD group memberships with cloud identities, producing repeated 4728/4756 events from the MSOL sync service account whenever a cloud-side role assignment changes are written back to on-prem AD
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.