T1136.002

Domain Account

Adversaries may create a domain account to maintain access to victim systems. Domain accounts are managed by Active Directory Domain Services where access and permissions are configured across systems and services that are part of that domain. With sufficient privileges, the net user /add /domain command or PowerShell's New-ADUser cmdlet can be used to create domain accounts. Threat actors including GALLIUM, BlackByte, Wizard Spider, HAFNIUM, and Medusa Group have used this technique to establish persistent, credentialed access that does not require remote access tools to remain deployed.

Microsoft Sentinel / Defender
kusto
// Branch 1: Security Event 4720 — Domain account created (logged on Domain Controllers)
let Branch1 = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4720
| where TargetDomainName != "WORKGROUP" and TargetDomainName != ""
| extend CreatedAccount = TargetUserName
| extend CreatingAccount = SubjectUserName
| extend CreatingDomain = SubjectDomainName
| extend AccountDomain = TargetDomainName
| project TimeGenerated, Computer, EventID, CreatedAccount, AccountDomain, CreatingAccount, CreatingDomain, Activity
| extend DetectionBranch = "SecurityEvent_4720";
// Branch 2: Security Event 4728 — Member added to security-enabled global group (e.g. Domain Admins)
let Branch2 = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4728
| where TargetUserName in~ ("Domain Admins", "Enterprise Admins", "Schema Admins", "Group Policy Creator Owners", "Administrators")
| extend AddedAccount = MemberName
| extend AddingAccount = SubjectUserName
| extend PrivilegedGroup = TargetUserName
| project TimeGenerated, Computer, EventID, AddedAccount, PrivilegedGroup, AddingAccount, Activity
| extend DetectionBranch = "SecurityEvent_4728_PrivGroup";
// Branch 3: Process-based detection — net.exe or dsadd.exe creating domain accounts
let Branch3 = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("net.exe", "net1.exe", "dsadd.exe")
| where ProcessCommandLine has_any ("/add", "/domain", "user")
| where (ProcessCommandLine has "/domain" and ProcessCommandLine has "/add")
   or ProcessCommandLine has "dsadd user"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| extend DetectionBranch = "ProcessCmdLine_NetAddDomain";
// Branch 4: PowerShell New-ADUser or Add-ADGroupMember for privileged groups
let Branch4 = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has_any ("New-ADUser", "Add-ADGroupMember", "New-ADAccount")
| where ProcessCommandLine has_any ("Domain Admins", "Enterprise Admins", "Schema Admins", "Administrators", "-AccountPassword", "-Enabled $true")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| extend DetectionBranch = "PowerShell_NewADUser";
Branch1
| union (Branch2 | project TimeGenerated, Computer, DetectionBranch, tostring(AddedAccount), tostring(AddingAccount), tostring(PrivilegedGroup))
| union (Branch3 | project TimeGenerated=Timestamp, Computer=DeviceName, DetectionBranch, ProcessCommandLine, InitiatingProcessFileName)
| union (Branch4 | project TimeGenerated=Timestamp, Computer=DeviceName, DetectionBranch, ProcessCommandLine, InitiatingProcessFileName)
| sort by TimeGenerated desc
high severity high confidence

Data Sources

User Account: User Account Creation Active Directory: Active Directory Object Creation Process: Process Creation Command: Command Execution Windows Security Event Log Microsoft Defender for Endpoint

Required Tables

SecurityEvent DeviceProcessEvents

False Positives

  • Helpdesk and IT provisioning teams creating user accounts during onboarding workflows — especially common during business hours from known provisioning systems
  • Automated identity provisioning systems (Okta, SailPoint, Microsoft Identity Manager) that create AD accounts via scripted processes using net.exe or LDAP
  • Domain controller promotion and demotion processes that create service and machine accounts during infrastructure maintenance
  • Test account creation in dev/staging domains during application testing or DR exercises
  • Software installation routines that create domain service accounts (SQL Server, Exchange, SharePoint setup)

Unlock Pro Content

Get the full detection package for T1136.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections