Detect Account Manipulation in IBM QRadar
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/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime,
LONG(eventid) AS EventID,
CASE
WHEN LONG(eventid) = 4738 THEN 'UserAccountModified'
WHEN LONG(eventid) = 4670 THEN 'PermissionsChanged'
WHEN LONG(eventid) = 4732 THEN 'AddedToLocalGroup'
WHEN LONG(eventid) = 4728 THEN 'AddedToGlobalGroup'
WHEN LONG(eventid) = 4756 THEN 'AddedToUniversalGroup'
WHEN LONG(eventid) = 4735 THEN 'LocalGroupModified'
WHEN LONG(eventid) = 4648 THEN 'ExplicitCredentialLogon'
ELSE 'Unknown'
END AS ChangeType,
username AS ActorAccount,
"Account_Domain" AS TargetDomain,
"Target_Account_Name" AS TargetAccount,
hostname AS SourceHost,
CATEGORYNAME(category) AS EventCategory,
LOGSOURCENAME(logsourceid) AS LogSource,
COUNT(*) OVER (PARTITION BY username, hostname) AS ActorEventCount
FROM events
WHERE
LOGSOURCETYPEID = 12
AND LONG(eventid) IN (4738, 4670, 4732, 4728, 4756, 4735, 4648)
AND username NOT IN ('-', 'SYSTEM', 'LOCAL SERVICE', 'NETWORK SERVICE', 'ANONYMOUS LOGON')
AND (
LONG(eventid) IN (4738, 4670, 4648)
OR (
LONG(eventid) IN (4732, 4728, 4756, 4735)
AND (LOWER("Group_Name") LIKE '%domain admins%'
OR LOWER("Group_Name") LIKE '%enterprise admins%'
OR LOWER("Group_Name") LIKE '%schema admins%'
OR LOWER("Group_Name") LIKE '%administrators%'
OR LOWER("Group_Name") LIKE '%account operators%'
OR LOWER("Group_Name") LIKE '%backup operators%'
OR LOWER("Group_Name") LIKE '%server operators%'
OR LOWER("Group_Name") LIKE '%group policy creator owners%'
OR LOWER("Group_Name") LIKE '%remote management users%'
OR LOWER("Group_Name") LIKE '%esx admins%')
)
)
LAST 24 HOURS
ORDER BY ActorEventCount DESC, starttime DESC Detects T1098 Account Manipulation using QRadar AQL against Windows Security Event Log (LOGSOURCETYPEID=12). Monitors Event IDs 4738, 4670, 4732, 4728, 4756, 4735, and 4648 for suspicious account property changes, permission modifications, and sensitive group membership additions. Excludes system-level built-in accounts that generate high-volume benign events. Partitions results by actor and host to surface high-frequency actors.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise identity governance platforms (e.g., Saviynt, CyberArk, Varonis) performing automated access certification reviews that add/remove sensitive group memberships in bulk
- Domain administrator accounts performing legitimate bulk user provisioning during company mergers, acquisitions, or large-scale onboarding events — results in a spike of 4738 and 4732 events from a single actor
- Password synchronization tools or SSO federation agents generating 4648 explicit credential logon events during token refresh cycles, which can appear as repeated credential use across many accounts
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.