Detection rules › Kusto
Azure Machine Learning Write Operations
'Shows the most prevalent users who perform write operations on Azure Machine Learning resources. List the common source IP address for each of those accounts. If an operation is not from those IP addresses, it may be worthy of investigation.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution | |
| Impact |
Rule body
id: 68c89998-8052-4c80-a1f6-9d81060b6d57
name: Azure Machine Learning Write Operations
description: |
'Shows the most prevalent users who perform write operations on Azure Machine Learning resources. List the common source IP address for each of those accounts. If an operation is not from those IP addresses, it may be worthy of investigation.'
severity: Low
status: Available
requiredDataConnectors:
- connectorId: AzureActivity
dataTypes:
- AzureActivity
tactics:
- InitialAccess
- Execution
- Impact
relevantTechniques:
- T1078
- T1059
- T1496
queryFrequency: 1d # Added queryFrequency property
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
query: |
AzureActivity
| where ResourceProviderValue == "MICROSOFT.MACHINELEARNINGSERVICES" // Filter activities related to Microsoft Machine Learning Services
| extend SCOPE = tostring(parse_json(Authorization).scope) // Parse Authorization scope as string
| extend subname = split(Hierarchy, "/") // Split Hierarchy to extract Subscription Name and ID
| extend ['Subscription Name'] = subname[-2], ['Subscription ID'] = subname[-1] // Extract Subscription Name and ID
| extend Properties = parse_json(Properties) // Parse Properties as JSON
| extend Properties_entity = tostring(Properties.entity) // Cast Properties.entity to string
| where isnotempty(Properties_entity) // Filter activities where Properties.entity is not empty
// | where Properties_entity contains "deepseek" // Filter activities where Properties.entity contains "deepseek"
| where OperationNameValue contains "write" // Filter activities where OperationNameValue contains "write"
| where OperationNameValue !contains "MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE" // Exclude role assignments
| extend LLM = tostring(split(Properties_entity, "/")[-1]) // Extract the last segment of Properties_entity and cast it to string
| distinct TimeGenerated, tostring(['Subscription Name']), ResourceGroup, tostring(['Subscription ID']), Caller, CallerIpAddress, OperationNameValue, LLM, _ResourceId // Select distinct relevant fields for output
eventGroupingSettings:
aggregationKind: SingleAlert
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: Caller
- entityType: IP
fieldMappings:
- identifier: Address
columnName: CallerIpAddress
- entityType: AzureResource
fieldMappings:
- identifier: ResourceId
columnName: _ResourceId
version: 1.0.0
kind: Scheduled
Stages and Predicates
Stage 1: source
AzureActivity
Stage 2: where
| where ResourceProviderValue == "MICROSOFT.MACHINELEARNINGSERVICES"
Stage 3: extend (5 consecutive steps)
| extend SCOPE = tostring(parse_json(Authorization).scope)
| extend subname = split(Hierarchy, "/")
| extend ['Subscription Name'] = subname[-2], ['Subscription ID'] = subname[-1]
| extend Properties = parse_json(Properties)
| extend Properties_entity = tostring(Properties.entity)
Stage 4: where
| where isnotempty(Properties_entity)
Stage 5: where
| where OperationNameValue contains "write"
Stage 6: where
| where OperationNameValue !contains "MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE"
Stage 7: extend
| extend LLM = tostring(split(Properties_entity, "/")[-1])
Stage 8: distinct
| distinct TimeGenerated, tostring(['Subscription Name']), ResourceGroup, tostring(['Subscription ID']), Caller, CallerIpAddress, OperationNameValue, LLM, _ResourceId
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
OperationNameValue | contains | MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE | excludes:OperationNameValue field:"OperationNameValue" value:"MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
OperationNameValue | contains |
| field:"azure_ad::operation_name_value" kind:contains value:"write" |
Properties_entity | is_not_null | field:"Properties_entity" kind:is_not_null | |
ResourceProviderValue | eq |
| field:"ResourceProviderValue" kind:eq value:"MICROSOFT.MACHINELEARNINGSERVICES" |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
SCOPE | extend |
subname | extend |
Subscription ID | extend |
Subscription Name | extend |
Properties | extend |
Properties_entity | extend |
LLM | extend |