Detection rules › Kusto
BTP - Failed access attempts across multiple BAS subaccounts
Identifies failed Business Application Studio access attempts over a predefined number of subaccounts.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Reconnaissance | T1595 Active Scanning |
| Discovery | T1526 Cloud Service Discovery |
Rule body kusto
id: 74b243a6-3046-48aa-8b03-e43b3c529cc1
kind: Scheduled
name: BTP - Failed access attempts across multiple BAS subaccounts
description: Identifies failed Business Application Studio access attempts over a
predefined number of subaccounts.
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SAPBTPAuditEvents
dataTypes:
- SAPBTPAuditLog_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- Reconnaissance
- Discovery
relevantTechniques:
- T1595
- T1526
query: |
let subaccount_detection_threshold = 3;
SAPBTPAuditLog_CL
| where Category == "audit.security-events" and Message has "Unauthorized access attempt"
| summarize Start=min(UpdatedOn), End=max(UpdatedOn), Tenants = make_set(Tenant, 100) by UserName
| where array_length(Tenants) > subaccount_detection_threshold
| project Start, End, UserName, Tenants, CloudApp = "SAP BTP"
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
eventGroupingSettings:
aggregationKind: SingleAlert
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: UPNSuffix
- entityType: CloudApplication
fieldMappings:
- identifier: Name
columnName: CloudApp
alertDetailsOverride:
alertDisplayNameFormat: BTP - Unauthorized access attempt to multiple tenants
alertDescriptionFormat: '{{UserName}} attempted, and failed, to log into multiple
Business Application Studio dev spaces. Tenants accessed: {{Tenants}}'
version: 3.0.5
Stages and Predicates
Parameters
let subaccount_detection_threshold = 3;
Stage 1: source
SAPBTPAuditLog_CL
Stage 2: where
| where Category == "audit.security-events" and Message has "Unauthorized access attempt"
Stage 3: summarize
| summarize Start=min(UpdatedOn), End=max(UpdatedOn), Tenants = make_set(Tenant, 100) by UserName
Stage 4: where
| where array_length(Tenants) > subaccount_detection_threshold
Stage 5: project
| project Start, End, UserName, Tenants, CloudApp = "SAP BTP"
Stage 6: extend
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
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.
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 |
|---|---|
CloudApp | project |
End | project |
Start | project |
Tenants | project |
UserName | project |
AccountName | extend |
UPNSuffix | extend |