Detection rules › Kusto
Power Platform - Connector added to a sensitive environment
Identifies occurrences of new API connector creations within Power Platform, specifically targeting a predefined list of sensitive environments.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Exfiltration | T1537 Transfer Data to Cloud Account, T1567 Exfiltration Over Web Service |
| Execution | T0871 Execution through API |
Rule body kusto
id: 886a5655-3d12-42f1-8927-4095789c575e
kind: Scheduled
name: Power Platform - Connector added to a sensitive environment
description: Identifies occurrences of new API connector creations within Power Platform,
specifically targeting a predefined list of sensitive environments.
severity: Low
status: Available
requiredDataConnectors:
- connectorId: PowerPlatformAdmin
dataTypes:
- PowerPlatformAdminActivity
queryFrequency: 1h
queryPeriod: 7d
triggerOperator: gt
triggerThreshold: 0
tactics:
- Execution
- Exfiltration
relevantTechniques:
- T0871
- T1567
- T1537
query: |
let sensitive_environment_id = dynamic([
// Specify the list of sensitive power platform environment ID's to monitor here.
// Example: "10e72012-8886-41ec-b973-250286419b38", "183c7056-7ed0-426f-8ae6-69819cf72259"
]);
let query_frequency = 11h;
PowerPlatformAdminActivity
| where TimeGenerated >= ago (query_frequency)
| where EventOriginalType == "PutConnection"
| extend Properties = tostring(PropertyCollection)
| extend SrcIpAddr = extract(@'"enduser.ip_address","Value":"([^"]+)"', 1, Properties)
| extend SrcIpAddr = iif(SrcIpAddr startswith '::ffff:', replace_string('::ffff:', '', SrcIpAddr), SrcIpAddr)
| extend
EnvironmentId = extract(@'"powerplatform.analytics.resource.environment.id","Value":"([^"]+)"', 1, Properties),
ConnectionId = extract(@'"powerplatform.analytics.resource.connection.id","Value":"([^"]+)"', 1, Properties)
| where EnvironmentId in~ (sensitive_environment_id)
| extend
AccountName = tostring(split(ActorName, "@")[0]),
UPNSuffix = tostring(split(ActorName, "@")[1])
| project
TimeGenerated,
EventOriginalType,
ActorName,
SrcIpAddr,
ConnectionId,
EnvironmentId,
AccountName,
UPNSuffix
eventGroupingSettings:
aggregationKind: SingleAlert
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: UPNSuffix
- entityType: IP
fieldMappings:
- identifier: Address
columnName: SrcIpAddr
alertDetailsOverride:
alertDisplayNameFormat: New Power Platform connector added in a sensitive environment
alertDescriptionFormat: '{{ActorName}} added a new API connector in environment
id {{EnvironmentId}}. This environment has been listed as sensitive.'
customDetails:
Environment: EnvironmentId
Connection: ConnectionId
version: 3.2.0
Stages and Predicates
Parameters
let query_frequency = 11h;
Let binding: sensitive_environment_id
let sensitive_environment_id = dynamic([
]);
Stage 1: source
PowerPlatformAdminActivity
Stage 2: where
| where TimeGenerated >= ago (query_frequency)
Stage 3: where
| where EventOriginalType == "PutConnection"
Stage 4: extend (4 consecutive steps)
| extend Properties = tostring(PropertyCollection)
| extend SrcIpAddr = extract(@'"enduser.ip_address","Value":"([^"]+)"', 1, Properties)
| extend SrcIpAddr = iif(SrcIpAddr startswith '::ffff:', replace_string('::ffff:', '', SrcIpAddr), SrcIpAddr)
| extend
EnvironmentId = extract(@'"powerplatform.analytics.resource.environment.id","Value":"([^"]+)"', 1, Properties),
ConnectionId = extract(@'"powerplatform.analytics.resource.connection.id","Value":"([^"]+)"', 1, Properties)
Stage 5: where
| where EnvironmentId in~ (sensitive_environment_id)
References sensitive_environment_id (defined above).
Stage 6: extend
| extend
AccountName = tostring(split(ActorName, "@")[0]),
UPNSuffix = tostring(split(ActorName, "@")[1])
Stage 7: project
| project
TimeGenerated,
EventOriginalType,
ActorName,
SrcIpAddr,
ConnectionId,
EnvironmentId,
AccountName,
UPNSuffix
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.
| Field | Kind | Values |
|---|---|---|
EnvironmentId | in |
|
EventOriginalType | eq |
|
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.
| Field | Source |
|---|---|
AccountName | project |
ActorName | project |
ConnectionId | project |
EnvironmentId | project |
EventOriginalType | project |
SrcIpAddr | project |
TimeGenerated | project |
UPNSuffix | project |