Domain account created from a command line
AN0006 describes a domain user being created with built-in tooling and names `net user /add /domain` and PowerShell as the examples; this rule is the process-creation half of that analytic. Three ways of asking a domain controller to create a principal are covered. The net leg wants `net.exe` or `net1.exe` as the image — either can be the logged one, because net.exe re-executes itself as net1.exe with the same arguments — plus a ` user ` subcommand, an `/add` or `-add` switch and a `/domain` switch. That last switch is required rather than optional and is the whole discriminator against the local sibling T1136.001, whose rule excludes it: without `/domain`, `net user /add` writes to the local SAM. The second leg is the Active Directory module's `New-ADUser` cmdlet typed inline, and the third is `dsadd.exe` with a `user` object type, which is how a lot of in-house AD housekeeping still provisions accounts. The cmdlet and switch spellings are authored here rather than taken from MITRE, which supplies the behaviour and the tuning knobs but no query logic. Four limits are structural. Creation through the directory API rather than a shell — `New-ADUser` inside a .ps1, a module or a here-string, an ADSI or `System.DirectoryServices` call from compiled code, an LDAP add from a non-Windows host, or an identity-management connector talking to LDAP directly — produces no matching command line, and the LDAP-add and Kerberos legs of DET0003's other analytics are different log sources this rule does not attempt. MITRE's `HostRole` knob asks that this be restricted to domain controllers to cut workstation noise, but a single process-creation event carries no field saying the host is a DC, so that has to be applied as a host filter at deployment time rather than in the rule. Its `TimeWindow` and `UserContext` knobs — the 4720 account-creation record following the process within about two minutes, and whether the caller holds domain admin or only a helpdesk role — are a cross-event join and a per-identity baseline that Sigma models neither of, so the 4720 arm of AN0006 is left out and this rule matches the command-line precursor alone. Expect overlap with the published T1087.002 rule, whose net leg matches the same ` user ` plus `/domain` shape as enumeration. This rule is written in the Sysmon EventID 1 vocabulary (`Image`, `CommandLine`) that AN0006 names; an estate feeding Security 4688 instead needs `NewProcessName` mapped onto `Image` first, and 4688 needs both *Audit Process Creation* and the separate *Include command line in process creation events* policy before `CommandLine` exists at all — neither is on in a default install or in the Microsoft and CIS baselines. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0003, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where ((((((FolderPath endswith "\\net.exe" or FolderPath endswith "\\net1.exe") and ProcessCommandLine contains " user ") and (ProcessCommandLine contains " /add" or ProcessCommandLine contains " -add")) and (ProcessCommandLine contains " /do" or ProcessCommandLine contains " -do")) or ProcessCommandLine contains "New-ADUser") or (FolderPath endswith "\\dsadd.exe" and ProcessCommandLine contains " user"))
Splunk · SPL
Run this as a search.
index=* ((((((Image="*\\net.exe" OR Image="*\\net1.exe") AND CommandLine="* user *") AND (CommandLine="* /add*" OR CommandLine="* -add*")) AND (CommandLine="* /do*" OR CommandLine="* -do*")) OR CommandLine="*New-ADUser*") OR (Image="*\\dsadd.exe" AND CommandLine="* user*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((((((TO_LOWER(process.executable) LIKE "*\\\\net.exe" OR TO_LOWER(process.executable) LIKE "*\\\\net1.exe") AND TO_LOWER(process.command_line) LIKE "* user *") AND (TO_LOWER(process.command_line) LIKE "* /add*" OR TO_LOWER(process.command_line) LIKE "* -add*")) AND (TO_LOWER(process.command_line) LIKE "* /do*" OR TO_LOWER(process.command_line) LIKE "* -do*")) OR TO_LOWER(process.command_line) LIKE "*new-aduser*") OR (TO_LOWER(process.executable) LIKE "*\\\\dsadd.exe" AND TO_LOWER(process.command_line) LIKE "* user*"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <!-- 3 rules: the Sigma condition ORs across different fields, which one rule cannot express. Any one matching is a hit. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)(\\net\.exe$|\\net1\.exe$)</field> <field name="CommandLine" type="pcre2">(?i) user </field> <field name="CommandLine" type="pcre2">(?i)( /add| -add)</field> <field name="CommandLine" type="pcre2">(?i)( /do| -do)</field> <description>Domain account created from a command line (1/3)</description> <mitre> <id>T1136.002</id> </mitre> </rule> <rule id="100001" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="CommandLine" type="pcre2">(?i)New-ADUser</field> <description>Domain account created from a command line (2/3)</description> <mitre> <id>T1136.002</id> </mitre> </rule> <rule id="100002" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)\\dsadd\.exe$</field> <field name="CommandLine" type="pcre2">(?i) user</field> <description>Domain account created from a command line (3/3)</description> <mitre> <id>T1136.002</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.