BTP - Trust and authorization Identity Provider monitor
Id | 62357c23-ecdc-4edc-9349-8338063af1ef |
Rulename | BTP - Trust and authorization Identity Provider monitor |
Description | Identifies CRUD operations on Identity Provider settings within a sub account. |
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 BTP/Analytic Rules/BTP - Trust and authorization Identity Provider monitor.yaml |
Version | 3.0.5 |
Arm template | 62357c23-ecdc-4edc-9349-8338063af1ef.json |
SAPBTPAuditLog_CL
| where isnotnull(Message.object)
| extend Object = Message.object, Attributes = Message.attributes
| where Object.type == "IdentityProvider"
| extend CrudType = tostring(parse_json(tostring(Object.id)).crudType)
| mv-expand Attributes
| extend MessageText = case(
CrudType == "CREATE",
"An identity provider was created",
CrudType == "UPDATE",
"An identity provider was updated",
CrudType == "DELETE",
"An identity provider was deleted",
"Unclassified CRUD operation encountered"
)
| extend NewAttributes = parse_json(replace_regex(tostring(Attributes.new), "\\r", ""))
| extend OldAttributes = parse_json(replace_regex(tostring(Attributes.old), "\\r", ""))
| extend IdentityProviderName = case(
CrudType == "CREATE" or CrudType == "UPDATE",
NewAttributes.name,
CrudType == "DELETE",
OldAttributes.name,
"Unknown"
)
| project
UpdatedOn,
UserName,
MessageText,
IdentityProviderName,
Tenant,
SpaceId,
CloudApp = "SAP BTP"
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
queryPeriod: 15m
id: 62357c23-ecdc-4edc-9349-8338063af1ef
relevantTechniques:
- T1606
- T1556
- T1134
triggerOperator: gt
entityMappings:
- fieldMappings:
- columnName: AccountName
identifier: Name
- columnName: UPNSuffix
identifier: UPNSuffix
entityType: Account
- fieldMappings:
- columnName: CloudApp
identifier: Name
entityType: CloudApplication
query: |
SAPBTPAuditLog_CL
| where isnotnull(Message.object)
| extend Object = Message.object, Attributes = Message.attributes
| where Object.type == "IdentityProvider"
| extend CrudType = tostring(parse_json(tostring(Object.id)).crudType)
| mv-expand Attributes
| extend MessageText = case(
CrudType == "CREATE",
"An identity provider was created",
CrudType == "UPDATE",
"An identity provider was updated",
CrudType == "DELETE",
"An identity provider was deleted",
"Unclassified CRUD operation encountered"
)
| extend NewAttributes = parse_json(replace_regex(tostring(Attributes.new), "\\r", ""))
| extend OldAttributes = parse_json(replace_regex(tostring(Attributes.old), "\\r", ""))
| extend IdentityProviderName = case(
CrudType == "CREATE" or CrudType == "UPDATE",
NewAttributes.name,
CrudType == "DELETE",
OldAttributes.name,
"Unknown"
)
| project
UpdatedOn,
UserName,
MessageText,
IdentityProviderName,
Tenant,
SpaceId,
CloudApp = "SAP BTP"
| extend AccountName = split(UserName, "@")[0], UPNSuffix = split(UserName, "@")[1]
kind: Scheduled
triggerThreshold: 0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP BTP/Analytic Rules/BTP - Trust and authorization Identity Provider monitor.yaml
queryFrequency: 15m
requiredDataConnectors:
- dataTypes:
- SAPBTPAuditLog_CL
connectorId: SAPBTPAuditEvents
eventGroupingSettings:
aggregationKind: SingleAlert
name: BTP - Trust and authorization Identity Provider monitor
version: 3.0.5
description: Identifies CRUD operations on Identity Provider settings within a sub account.
alertDetailsOverride:
alertDisplayNameFormat: 'SAP BTP: {{MessageText}}'
alertDescriptionFormat: '{{MessageText}} by {{UserName}}. Identity provider name: {{IdentityProviderName}}'
tactics:
- CredentialAccess
- PrivilegeEscalation
severity: Medium
status: Available
{
"$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/62357c23-ecdc-4edc-9349-8338063af1ef')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/62357c23-ecdc-4edc-9349-8338063af1ef')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "{{MessageText}} by {{UserName}}. Identity provider name: {{IdentityProviderName}}",
"alertDisplayNameFormat": "SAP BTP: {{MessageText}}"
},
"alertRuleTemplateName": "62357c23-ecdc-4edc-9349-8338063af1ef",
"customDetails": null,
"description": "Identifies CRUD operations on Identity Provider settings within a sub account.",
"displayName": "BTP - Trust and authorization Identity Provider monitor",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountName",
"identifier": "Name"
},
{
"columnName": "UPNSuffix",
"identifier": "UPNSuffix"
}
]
},
{
"entityType": "CloudApplication",
"fieldMappings": [
{
"columnName": "CloudApp",
"identifier": "Name"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "SingleAlert"
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SAP BTP/Analytic Rules/BTP - Trust and authorization Identity Provider monitor.yaml",
"query": "SAPBTPAuditLog_CL\n| where isnotnull(Message.object)\n| extend Object = Message.object, Attributes = Message.attributes\n| where Object.type == \"IdentityProvider\"\n| extend CrudType = tostring(parse_json(tostring(Object.id)).crudType)\n| mv-expand Attributes\n| extend MessageText = case(\n CrudType == \"CREATE\",\n \"An identity provider was created\",\n CrudType == \"UPDATE\",\n \"An identity provider was updated\",\n CrudType == \"DELETE\",\n \"An identity provider was deleted\",\n \"Unclassified CRUD operation encountered\"\n )\n| extend NewAttributes = parse_json(replace_regex(tostring(Attributes.new), \"\\\\r\", \"\"))\n| extend OldAttributes = parse_json(replace_regex(tostring(Attributes.old), \"\\\\r\", \"\"))\n| extend IdentityProviderName = case(\n CrudType == \"CREATE\" or CrudType == \"UPDATE\",\n NewAttributes.name,\n CrudType == \"DELETE\",\n OldAttributes.name,\n \"Unknown\"\n )\n| project\n UpdatedOn,\n UserName,\n MessageText,\n IdentityProviderName,\n Tenant,\n SpaceId,\n CloudApp = \"SAP BTP\"\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": "3.0.5",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}