Analytic rule catalog
BTP - Cloud Identity Service application configuration monitor
Back
| Id | 3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f |
| Rulename | BTP - Cloud Identity Service application configuration monitor |
| Description | Identifies CRUD operations on Application (SSO Domain/Service Provider) configurations within SAP Cloud Identity Service. This includes both SAML 2.0 and OpenID Connect applications. Unauthorized application creation could indicate an attacker establishing persistent access through a rogue federated application. |
| Severity | Medium |
| Tactics | CredentialAccess PrivilegeEscalation |
| Techniques | T1606 T1556 T1134 |
| Required data connectors | SAPBTPAuditEvents |
| Kind | Scheduled |
| Query frequency | 15m |
| Query period | 15m |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Cloud%20Identity%20Service%20application%20configuration%20monitor.yaml |
| Version | 1.0.0 |
| Arm template | 3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f.json |
SAPBTPAuditLog_CL
| extend data_s = tostring(Message.data)
| extend
action = extract(@"action=""([^""]+)""", 1, data_s),
state = extract(@"state=""([^""]+)""", 1, data_s),
objectType = extract(@"objectType=""([^""]+)""", 1, data_s),
serviceProviderName = extract(@"serviceProviderName=""([^""]+)""", 1, data_s),
ipAddress = extract(@"ipAddress=""([^""]+)""", 1, data_s),
// Extract payload JSON for federation type
payloadJson = extract(@"\{""payload"":\{([^}]+)\}\}", 1, data_s)
| extend federationType = extract(@"""type"":""([^""]+)""", 1, payloadJson)
| where objectType == "ssoDomain"
| where state == "successful"
| where action in ("create", "update", "delete")
| extend MessageText = case(
action == "create", strcat("Application '", serviceProviderName, "' (", federationType, ") was created"),
action == "update", strcat("Application '", serviceProviderName, "' (", federationType, ") was updated"),
action == "delete", strcat("Application '", serviceProviderName, "' was deleted"),
"Unclassified operation on application"
)
| project
UpdatedOn,
UserName,
MessageText,
ServiceProviderName = serviceProviderName,
FederationType = federationType,
Action = action,
Tenant,
ipAddress,
CloudApp = "SAP Cloud Identity Service"
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
kind: Scheduled
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Cloud%20Identity%20Service%20application%20configuration%20monitor.yaml
version: 1.0.0
status: Available
requiredDataConnectors:
- dataTypes:
- SAPBTPAuditLog_CL
connectorId: SAPBTPAuditEvents
alertDetailsOverride:
alertDescriptionFormat: "{{MessageText}} by {{UserName}}. Identity provider name: {{ServiceProviderName}}\n \nThis could indicate:\n- Legitimate administrative change to federated applications\n- Unauthorized application registration for persistent access\n- Rogue SAML/OIDC application added by attacker\n"
alertDisplayNameFormat: 'SAP Cloud Identity Service: {{MessageText}}'
relevantTechniques:
- T1606
- T1556
- T1134
customDetails:
FederationType: FederationType
Action: Action
SourceIP: ipAddress
ServiceProviderName: ServiceProviderName
query: |
SAPBTPAuditLog_CL
| extend data_s = tostring(Message.data)
| extend
action = extract(@"action=""([^""]+)""", 1, data_s),
state = extract(@"state=""([^""]+)""", 1, data_s),
objectType = extract(@"objectType=""([^""]+)""", 1, data_s),
serviceProviderName = extract(@"serviceProviderName=""([^""]+)""", 1, data_s),
ipAddress = extract(@"ipAddress=""([^""]+)""", 1, data_s),
// Extract payload JSON for federation type
payloadJson = extract(@"\{""payload"":\{([^}]+)\}\}", 1, data_s)
| extend federationType = extract(@"""type"":""([^""]+)""", 1, payloadJson)
| where objectType == "ssoDomain"
| where state == "successful"
| where action in ("create", "update", "delete")
| extend MessageText = case(
action == "create", strcat("Application '", serviceProviderName, "' (", federationType, ") was created"),
action == "update", strcat("Application '", serviceProviderName, "' (", federationType, ") was updated"),
action == "delete", strcat("Application '", serviceProviderName, "' was deleted"),
"Unclassified operation on application"
)
| project
UpdatedOn,
UserName,
MessageText,
ServiceProviderName = serviceProviderName,
FederationType = federationType,
Action = action,
Tenant,
ipAddress,
CloudApp = "SAP Cloud Identity Service"
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
tactics:
- CredentialAccess
- PrivilegeEscalation
queryFrequency: 15m
id: 3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f
triggerThreshold: 0
triggerOperator: gt
name: BTP - Cloud Identity Service application configuration monitor
queryPeriod: 15m
severity: Medium
entityMappings:
- fieldMappings:
- columnName: AccountName
identifier: Name
- columnName: UPNSuffix
identifier: UPNSuffix
entityType: Account
- fieldMappings:
- columnName: ipAddress
identifier: Address
entityType: IP
- fieldMappings:
- columnName: CloudApp
identifier: Name
entityType: CloudApplication
eventGroupingSettings:
aggregationKind: SingleAlert
description: |
Identifies CRUD operations on Application (SSO Domain/Service Provider) configurations
within SAP Cloud Identity Service. This includes both SAML 2.0 and OpenID Connect applications.
Unauthorized application creation could indicate an attacker establishing persistent access
through a rogue federated application.
{
"$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/3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "{{MessageText}} by {{UserName}}. Identity provider name: {{ServiceProviderName}}\n \nThis could indicate:\n- Legitimate administrative change to federated applications\n- Unauthorized application registration for persistent access\n- Rogue SAML/OIDC application added by attacker\n",
"alertDisplayNameFormat": "SAP Cloud Identity Service: {{MessageText}}"
},
"alertRuleTemplateName": "3f8a2c5e-7b9d-4e1a-8f6c-2d4b9a1e3c7f",
"customDetails": {
"Action": "Action",
"FederationType": "FederationType",
"ServiceProviderName": "ServiceProviderName",
"SourceIP": "ipAddress"
},
"description": "Identifies CRUD operations on Application (SSO Domain/Service Provider) configurations\nwithin SAP Cloud Identity Service. This includes both SAML 2.0 and OpenID Connect applications.\nUnauthorized application creation could indicate an attacker establishing persistent access\nthrough a rogue federated application.\n",
"displayName": "BTP - Cloud Identity Service application configuration monitor",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountName",
"identifier": "Name"
},
{
"columnName": "UPNSuffix",
"identifier": "UPNSuffix"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "ipAddress",
"identifier": "Address"
}
]
},
{
"entityType": "CloudApplication",
"fieldMappings": [
{
"columnName": "CloudApp",
"identifier": "Name"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "SingleAlert"
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP%20BTP/Analytic%20Rules/BTP%20-%20Cloud%20Identity%20Service%20application%20configuration%20monitor.yaml",
"query": "SAPBTPAuditLog_CL\n| extend data_s = tostring(Message.data)\n| extend \n action = extract(@\"action=\"\"([^\"\"]+)\"\"\", 1, data_s),\n state = extract(@\"state=\"\"([^\"\"]+)\"\"\", 1, data_s),\n objectType = extract(@\"objectType=\"\"([^\"\"]+)\"\"\", 1, data_s),\n serviceProviderName = extract(@\"serviceProviderName=\"\"([^\"\"]+)\"\"\", 1, data_s),\n ipAddress = extract(@\"ipAddress=\"\"([^\"\"]+)\"\"\", 1, data_s),\n // Extract payload JSON for federation type\n payloadJson = extract(@\"\\{\"\"payload\"\":\\{([^}]+)\\}\\}\", 1, data_s)\n| extend federationType = extract(@\"\"\"type\"\":\"\"([^\"\"]+)\"\"\", 1, payloadJson)\n| where objectType == \"ssoDomain\"\n| where state == \"successful\"\n| where action in (\"create\", \"update\", \"delete\")\n| extend MessageText = case(\n action == \"create\", strcat(\"Application '\", serviceProviderName, \"' (\", federationType, \") was created\"),\n action == \"update\", strcat(\"Application '\", serviceProviderName, \"' (\", federationType, \") was updated\"),\n action == \"delete\", strcat(\"Application '\", serviceProviderName, \"' was deleted\"),\n \"Unclassified operation on application\"\n)\n| project\n UpdatedOn,\n UserName,\n MessageText,\n ServiceProviderName = serviceProviderName,\n FederationType = federationType,\n Action = action,\n Tenant,\n ipAddress,\n CloudApp = \"SAP Cloud Identity Service\"\n| extend AccountName = split(UserName, \"@\")[0], UPNSuffix = split(UserName, \"@\")[1]\n",
"queryFrequency": "PT15M",
"queryPeriod": "PT15M",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CredentialAccess",
"PrivilegeEscalation"
],
"techniques": [
"T1134",
"T1556",
"T1606"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}