Detection rules › Kusto

CyberArkEPM - Uncommon Windows process started from System folder

Severity
medium
Time window
14d
Source
github.com/Azure/Azure-Sentinel

'Detects when uncommon windows proccess is started from System folder.'

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1204 User Execution
StealthT1036 Masquerading

Rule body kusto

id: 16b940d2-aaf8-4eaa-a5e1-05df5f5c3d43
name: CyberArkEPM - Uncommon Windows process started from System folder
description: |
  'Detects when uncommon windows proccess is started from System folder.'
severity: Medium
requiredDataConnectors:
  - connectorId: CyberArkEPM
    dataTypes:
      - CyberArkEPM
queryFrequency: 1h
queryPeriod: 14d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Execution
  - DefenseEvasion
relevantTechniques:
  - T1204
  - T1036
query: | 
  let lb_period = 14d;
  let q_time = 1h;
  let sys_proc = CyberArkEPM
  | where TimeGenerated between (ago(lb_period) .. ago(q_time))
  | where EventSubType != 'AttackAttempt'
  | where ActingProcessName has @'\'
  | where ActingProcessName has_any ('System32', 'SysWOW64')
  | summarize makeset(ActingProcessFileInternalName);
  CyberArkEPM
  | where TimeGenerated > ago(q_time)
  | where EventSubType != 'AttackAttempt'
  | where ActingProcessName has @'\'
  | where ActingProcessName has_any ('System32', 'SysWOW64')
  | where ActingProcessFileInternalName !in (sys_proc)
  | extend AccountCustomEntity = ActorUsername
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.0
kind: Scheduled

Stages and Predicates

Parameters

let lb_period = 14d;
let q_time = 1h;

Let binding: sys_proc

let sys_proc = CyberArkEPM
| where TimeGenerated between (ago(lb_period) .. ago(q_time))
| where EventSubType != 'AttackAttempt'
| where ActingProcessName has @'\'
| where ActingProcessName has_any ('System32', 'SysWOW64')
| summarize makeset(ActingProcessFileInternalName);

Derived from lb_period, q_time.

Stage 1: source

CyberArkEPM

Stage 2: where

| where TimeGenerated > ago(q_time)

Stage 3: where

| where EventSubType != 'AttackAttempt'

Stage 4: where

| where ActingProcessName has @'\'

Stage 5: where

| where ActingProcessName has_any ('System32', 'SysWOW64')

Stage 6: where

| where ActingProcessFileInternalName !in (sys_proc)

References sys_proc (defined above).

Stage 7: extend

| extend AccountCustomEntity = ActorUsername

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
ActingProcessFileInternalNameeqsys_proc

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
ActingProcessNamematch
  • SysWOW64
  • System32
  • \ transforms: term
EventSubTypene
  • AttackAttempt transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
AccountCustomEntityextend