← Back to SOC feed Coverage →

Enumeration of users and groups (Normalized Process Events)

kql MEDIUM Azure-Sentinel
imProcessCreate
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-04-22T09:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use the ‘net’ tool to enumerate users and groups in a Windows environment to gather information about potential targets or privileges. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify reconnaissance activities that could lead to further compromise.

KQL Query


imProcessCreate
| where (CommandLine has ' user ' or CommandLine has ' group ') and (CommandLine hassuffix ' /do' or CommandLine hassuffix ' /domain') 
| where Process has 'net.exe' // performance pre-filtering
| extend FileName=tostring(split(Process, '\\')[-1])
| where FileName == 'net.exe' and ActorUsername != "" and CommandLine !contains '\\'  and CommandLine !contains '/add' 
| extend Target = extract("(?i)[user|group] (\"*[a-zA-Z0-9-_ ]+\"*)", 1, CommandLine) 
| where Target  != '' 
| summarize minTimeGenerated=min(TimeGenerated), maxTimeGenerated=max(TimeGenerated), count() by ActorUsername, Target, CommandLine, Dvc, EventVendor, EventProduct
| sort by ActorUsername, Target
| extend timestamp = minTimeGenerated, AccountCustomEntity = ActorUsername, HostCustomEntity = Dvc

Analytic Rule Definition

id: 7b3ed03a-7474-4dad-9c6a-92e7b69f6584
name: Enumeration of users and groups (Normalized Process Events)
description: |
  'Finds attempts to list users or groups using the built-in Windows 'net' tool '
requiredDataConnectors: []
tactics:
  - Discovery
query: |

  imProcessCreate
  | where (CommandLine has ' user ' or CommandLine has ' group ') and (CommandLine hassuffix ' /do' or CommandLine hassuffix ' /domain') 
  | where Process has 'net.exe' // performance pre-filtering
  | extend FileName=tostring(split(Process, '\\')[-1])
  | where FileName == 'net.exe' and ActorUsername != "" and CommandLine !contains '\\'  and CommandLine !contains '/add' 
  | extend Target = extract("(?i)[user|group] (\"*[a-zA-Z0-9-_ ]+\"*)", 1, CommandLine) 
  | where Target  != '' 
  | summarize minTimeGenerated=min(TimeGenerated), maxTimeGenerated=max(TimeGenerated), count() by ActorUsername, Target, CommandLine, Dvc, EventVendor, EventProduct
  | sort by ActorUsername, Target
  | extend timestamp = minTimeGenerated, AccountCustomEntity = ActorUsername, HostCustomEntity = Dvc

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/ASimProcess/imProcess_enumeration_user_and_group.yaml