Detection rules › Kusto
BTP - Malware detected in BAS dev space
Identifies instances of malware detected using SAP internal malware agent within Business Application Studio dev spaces.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Resource Development | T1584 Compromise Infrastructure |
| Execution | T1072 Software Deployment Tools |
| Persistence | T0873 Project File Infection |
Rule body kusto
id: 31997e9a-7447-47f3-8208-4f5d7efe497c
kind: Scheduled
name: BTP - Malware detected in BAS dev space
description: Identifies instances of malware detected using SAP internal malware agent
within Business Application Studio dev spaces.
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SAPBTPAuditEvents
dataTypes:
- SAPBTPAuditLog_CL
queryFrequency: 15m
queryPeriod: 15m
triggerOperator: gt
triggerThreshold: 0
tactics:
- ResourceDevelopment
- Execution
- Persistence
relevantTechniques:
- T1584
- T1072
- T0873
query: |
SAPBTPAuditLog_CL
| where Message has "malware"
| extend MessageData = parse_json(tostring(Message.data))
| extend
ClusterID = tostring(MessageData.clusterID),
WorkspaceID = tostring(MessageData.wsID),
Message = tostring(MessageData.message)
| parse Message with * 'user: ' User '.The following issues were detected: ' Malware ',' *
| extend
AccountName = tostring(split(User, '@')[0]),
UPNSuffix = tostring(split(User, '@')[1])
| project
UpdatedOn,
ClusterID,
WorkspaceID,
Message,
User,
Malware,
Tenant,
SpaceId,
Category,
CloudApp = "SAP BTP",
AccountName,
UPNSuffix
eventGroupingSettings:
aggregationKind: SingleAlert
entityMappings:
- entityType: CloudApplication
fieldMappings:
- identifier: Name
columnName: CloudApp
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: UPNSuffix
- entityType: Malware
fieldMappings:
- identifier: Name
columnName: Malware
alertDetailsOverride:
alertDisplayNameFormat: BTP - Malware detected in Business Apps Studio dev space
alertDescriptionFormat: 'Malware was found in the following subaccount: {{Tenant}}'
version: 3.0.7
Stages and Predicates
Stage 1: source
SAPBTPAuditLog_CL
Stage 2: where
| where Message has "malware"
Stage 3: extend
| extend MessageData = parse_json(tostring(Message.data))
Stage 4: extend
| extend
ClusterID = tostring(MessageData.clusterID),
WorkspaceID = tostring(MessageData.wsID),
Message = tostring(MessageData.message)
Stage 5: parse
| parse Message with * 'user: ' User '.The following issues were detected: ' Malware ',' *
Stage 6: extend
| extend
AccountName = tostring(split(User, '@')[0]),
UPNSuffix = tostring(split(User, '@')[1])
Stage 7: project
| project
UpdatedOn,
ClusterID,
WorkspaceID,
Message,
User,
Malware,
Tenant,
SpaceId,
Category,
CloudApp = "SAP BTP",
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 |
|---|---|---|
Message | match |
|
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 |
Category | project |
CloudApp | project |
ClusterID | project |
Malware | project |
Message | project |
SpaceId | project |
Tenant | project |
UPNSuffix | project |
UpdatedOn | project |
User | project |
WorkspaceID | project |