Discovery for highly-privileged accounts


Description

Use this query to locate commands related to discovering highly privileged users in an environment, sometimes a precursor to ransomware

Query · kql

DeviceProcessEvents
| where FileName == "net.exe"
// Create a set for the command lines
| summarize makeset(ProcessCommandLine) by InitiatingProcessFileName, AccountName, DeviceId, bin(Timestamp, 5m)
// Other process launches by Net in that same timeframe
| where (set_ProcessCommandLine has "admin" 
and set_ProcessCommandLine has_any("domain", "enterprise", "backup operators"))
and set_ProcessCommandLine has "group" and set_ProcessCommandLine contains "/do"
Raw source Discovery for highly-privileged accounts · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: d3123681-8eed-4a6d-b0c0-05d0075e3e69
name: Discovery for highly-privileged accounts
description: |
  Use this query to locate commands related to discovering highly privileged users in an environment, sometimes a precursor to ransomware
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Discovery
- Ransomware
query: |
  DeviceProcessEvents
  | where FileName == "net.exe"
  // Create a set for the command lines
  | summarize makeset(ProcessCommandLine) by InitiatingProcessFileName, AccountName, DeviceId, bin(Timestamp, 5m)
  // Other process launches by Net in that same timeframe
  | where (set_ProcessCommandLine has "admin" 
  and set_ProcessCommandLine has_any("domain", "enterprise", "backup operators"))
  and set_ProcessCommandLine has "group" and set_ProcessCommandLine contains "/do"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.