-
Notifications
You must be signed in to change notification settings - Fork 16
/
AzureVmRunCommandOrCustomScriptExecutionDetected.yaml
44 lines (44 loc) · 1.3 KB
/
AzureVmRunCommandOrCustomScriptExecutionDetected.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
id: 5354125d-37a5-41d2-b065-2ea38194a51d
name: Azure VM Run Command or Custom Script execution detected
version: 1.0.0
kind: Scheduled
description: A user has either initiated a Azure VM Run Command or Custom Script execution
severity: Medium
queryFrequency: 30m
queryPeriod: 35m
triggerOperator: gt
triggerThreshold: 0
tactics:
- Execution
- LateralMovement
relevantTechniques:
- T1059
query: |-
AzureActivity
| where CategoryValue == "Administrative"
| where OperationNameValue =~ "Microsoft.Compute/virtualMachines/runCommand/action"
| extend VMName = tostring(todynamic(Properties).resource)
| summarize make_list(ActivityStatusValue), TimeGenerated = max(TimeGenerated) by CorrelationId, CallerIpAddress, Caller, ResourceGroup, VMName
suppressionEnabled: false
incidentConfiguration:
createIncident: true
groupingConfiguration:
enabled: false
reopenClosedIncident: false
lookbackDuration: 5h
matchingMethod: AllEntities
groupByEntities: []
groupByAlertDetails: []
groupByCustomDetails: []
eventGroupingSettings:
aggregationKind: AlertPerResult
entityMappings:
- entityType: Account
fieldMappings:
- identifier: AadUserId
columnName: Caller
- entityType: Host
fieldMappings:
- identifier: HostName
columnName: VMName
suppressionDuration: 5h