Back
Id31997e9a-7447-47f3-8208-4f5d7efe497c
RulenameSAP BTP - Malware detected in BAS dev space
DescriptionIdentifies instances of malware detected using SAP internal malware agent within Business Application Studio dev spaces.
SeverityMedium
TacticsResourceDevelopment
Execution
Persistence
TechniquesT1584
T1072
T0873
Required data connectorsSAPBTPAuditEvents
KindScheduled
Query frequency15m
Query period15m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Malware%20detected%20in%20BAS%20dev%20space.yaml
Version3.0.8
Arm template31997e9a-7447-47f3-8208-4f5d7efe497c.json
Deploy To Azure
SAPBTPAuditLog_CL
| where Message has "malware"
| extend MessageData = parse_json(tostring(Message.data))
| extend MalwareData = parse_json(tostring(MessageData.message))
| extend
    ClusterID = tostring(MessageData.clusterID),
    WorkspaceID = tostring(MessageData.wsID),
    DevSpaceId = tostring(MalwareData.dev_space_id),
    User = tostring(MalwareData.user),
    Malware = strcat_array(MalwareData.findings, ", "),
    MessageText = tostring(MalwareData.message)
| extend
    AccountName = tostring(split(User, '@')[0]),
    UPNSuffix = tostring(split(User, '@')[1])
| where isnotempty(User) and isnotempty(Malware)
| project
    UpdatedOn,
    ClusterID,
    WorkspaceID,
    DevSpaceId,
    MessageText,
    User,
    Malware,
    Tenant,
    SpaceId,
    Category,
    CloudApp = "SAP BTP",
    AccountName,
    UPNSuffix
entityMappings:
- entityType: CloudApplication
  fieldMappings:
  - columnName: CloudApp
    identifier: Name
- entityType: Account
  fieldMappings:
  - columnName: AccountName
    identifier: Name
  - columnName: UPNSuffix
    identifier: UPNSuffix
- entityType: Malware
  fieldMappings:
  - columnName: Malware
    identifier: Name
query: |
  SAPBTPAuditLog_CL
  | where Message has "malware"
  | extend MessageData = parse_json(tostring(Message.data))
  | extend MalwareData = parse_json(tostring(MessageData.message))
  | extend
      ClusterID = tostring(MessageData.clusterID),
      WorkspaceID = tostring(MessageData.wsID),
      DevSpaceId = tostring(MalwareData.dev_space_id),
      User = tostring(MalwareData.user),
      Malware = strcat_array(MalwareData.findings, ", "),
      MessageText = tostring(MalwareData.message)
  | extend
      AccountName = tostring(split(User, '@')[0]),
      UPNSuffix = tostring(split(User, '@')[1])
  | where isnotempty(User) and isnotempty(Malware)
  | project
      UpdatedOn,
      ClusterID,
      WorkspaceID,
      DevSpaceId,
      MessageText,
      User,
      Malware,
      Tenant,
      SpaceId,
      Category,
      CloudApp = "SAP BTP",
      AccountName,
      UPNSuffix
eventGroupingSettings:
  aggregationKind: SingleAlert
id: 31997e9a-7447-47f3-8208-4f5d7efe497c
queryFrequency: 15m
alertDetailsOverride:
  alertDisplayNameFormat: SAP BTP - Malware detected in Business Apps Studio dev space
  alertDescriptionFormat: 'Malware was found in the following subaccount: {{Tenant}}'
status: Available
version: 3.0.8
severity: Medium
relevantTechniques:
- T1584
- T1072
- T0873
name: SAP BTP - Malware detected in BAS dev space
kind: Scheduled
tactics:
- ResourceDevelopment
- Execution
- Persistence
requiredDataConnectors:
- dataTypes:
  - SAPBTPAuditLog_CL
  connectorId: SAPBTPAuditEvents
description: Identifies instances of malware detected using SAP internal malware agent within Business Application Studio dev spaces.
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Malware%20detected%20in%20BAS%20dev%20space.yaml
triggerOperator: gt
triggerThreshold: 0
queryPeriod: 15m
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/31997e9a-7447-47f3-8208-4f5d7efe497c')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/31997e9a-7447-47f3-8208-4f5d7efe497c')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDescriptionFormat": "Malware was found in the following subaccount: {{Tenant}}",
          "alertDisplayNameFormat": "SAP BTP - Malware detected in Business Apps Studio dev space"
        },
        "alertRuleTemplateName": "31997e9a-7447-47f3-8208-4f5d7efe497c",
        "customDetails": null,
        "description": "Identifies instances of malware detected using SAP internal malware agent within Business Application Studio dev spaces.",
        "displayName": "SAP BTP - Malware detected in BAS dev space",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "CloudApplication",
            "fieldMappings": [
              {
                "columnName": "CloudApp",
                "identifier": "Name"
              }
            ]
          },
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountName",
                "identifier": "Name"
              },
              {
                "columnName": "UPNSuffix",
                "identifier": "UPNSuffix"
              }
            ]
          },
          {
            "entityType": "Malware",
            "fieldMappings": [
              {
                "columnName": "Malware",
                "identifier": "Name"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "SingleAlert"
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Malware%20detected%20in%20BAS%20dev%20space.yaml",
        "query": "SAPBTPAuditLog_CL\n| where Message has \"malware\"\n| extend MessageData = parse_json(tostring(Message.data))\n| extend MalwareData = parse_json(tostring(MessageData.message))\n| extend\n    ClusterID = tostring(MessageData.clusterID),\n    WorkspaceID = tostring(MessageData.wsID),\n    DevSpaceId = tostring(MalwareData.dev_space_id),\n    User = tostring(MalwareData.user),\n    Malware = strcat_array(MalwareData.findings, \", \"),\n    MessageText = tostring(MalwareData.message)\n| extend\n    AccountName = tostring(split(User, '@')[0]),\n    UPNSuffix = tostring(split(User, '@')[1])\n| where isnotempty(User) and isnotempty(Malware)\n| project\n    UpdatedOn,\n    ClusterID,\n    WorkspaceID,\n    DevSpaceId,\n    MessageText,\n    User,\n    Malware,\n    Tenant,\n    SpaceId,\n    Category,\n    CloudApp = \"SAP BTP\",\n    AccountName,\n    UPNSuffix\n",
        "queryFrequency": "PT15M",
        "queryPeriod": "PT15M",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Execution",
          "Persistence",
          "ResourceDevelopment"
        ],
        "techniques": [
          "T1072",
          "T1584"
        ],
        "templateVersion": "3.0.8",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}