Application ID URI Changed
Id | 9fb2ee72-959f-4c2b-bc38-483affc539e4 |
Rulename | Application ID URI Changed |
Description | Detects changes to an Application ID URI. Monitor these changes to make sure that they were authorized. Ref: https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-applications#appid-uri-added-modified-or-removed |
Severity | Medium |
Tactics | Persistence PrivilegeEscalation |
Techniques | T1078.004 |
Required data connectors | AzureActiveDirectory |
Kind | Scheduled |
Query frequency | 1d |
Query period | 1d |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ApplicationIDURIChanged.yaml |
Version | 1.0.1 |
Arm template | 9fb2ee72-959f-4c2b-bc38-483affc539e4.json |
AuditLogs
| where Category == "ApplicationManagement"
| where OperationName has_any ("Update Application", "Update Service principal")
| extend appName = tostring(parse_json(tostring(InitiatedBy.app)).displayName)
| extend UPN = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend UpdatedBy = iif(isnotempty(appName), appName, UPN)
| extend mod_props = TargetResources[0].modifiedProperties
| extend AppName = tostring(TargetResources[0].displayName)
| mv-expand mod_props
| where mod_props.displayName has "AppIdentifierUri"
| extend OldURI = tostring(mod_props.oldValue)
| extend NewURI = tostring(mod_props.newValue)
| project-reorder TimeGenerated, OperationName, AppName, OldURI, NewURI, UpdatedBy
tags:
- AADSecOpsGuide
metadata:
categories:
domains:
- Security - Others
source:
kind: Community
support:
tier: Community
author:
name: Pete Bryan
version: 1.0.1
name: Application ID URI Changed
severity: Medium
queryFrequency: 1d
kind: Scheduled
queryPeriod: 1d
description: |
'Detects changes to an Application ID URI.
Monitor these changes to make sure that they were authorized.
Ref: https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-applications#appid-uri-added-modified-or-removed'
query: |
AuditLogs
| where Category == "ApplicationManagement"
| where OperationName has_any ("Update Application", "Update Service principal")
| extend appName = tostring(parse_json(tostring(InitiatedBy.app)).displayName)
| extend UPN = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend UpdatedBy = iif(isnotempty(appName), appName, UPN)
| extend mod_props = TargetResources[0].modifiedProperties
| extend AppName = tostring(TargetResources[0].displayName)
| mv-expand mod_props
| where mod_props.displayName has "AppIdentifierUri"
| extend OldURI = tostring(mod_props.oldValue)
| extend NewURI = tostring(mod_props.newValue)
| project-reorder TimeGenerated, OperationName, AppName, OldURI, NewURI, UpdatedBy
tactics:
- Persistence
- PrivilegeEscalation
triggerOperator: gt
entityMappings:
- entityType: Account
fieldMappings:
- columnName: UpdatedBy
identifier: FullName
- entityType: URL
fieldMappings:
- columnName: NewURI
identifier: Url
triggerThreshold: 0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ApplicationIDURIChanged.yaml
requiredDataConnectors:
- connectorId: AzureActiveDirectory
dataTypes:
- AuditLogs
relevantTechniques:
- T1078.004
id: 9fb2ee72-959f-4c2b-bc38-483affc539e4
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/9fb2ee72-959f-4c2b-bc38-483affc539e4')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/9fb2ee72-959f-4c2b-bc38-483affc539e4')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01-preview",
"properties": {
"displayName": "Application ID URI Changed",
"description": "'Detects changes to an Application ID URI.\n Monitor these changes to make sure that they were authorized.\n Ref: https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-applications#appid-uri-added-modified-or-removed'\n",
"severity": "Medium",
"enabled": true,
"query": "AuditLogs\n | where Category == \"ApplicationManagement\"\n | where OperationName has_any (\"Update Application\", \"Update Service principal\")\n | extend appName = tostring(parse_json(tostring(InitiatedBy.app)).displayName)\n | extend UPN = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)\n | extend UpdatedBy = iif(isnotempty(appName), appName, UPN)\n | extend mod_props = TargetResources[0].modifiedProperties\n | extend AppName = tostring(TargetResources[0].displayName)\n | mv-expand mod_props\n | where mod_props.displayName has \"AppIdentifierUri\"\n | extend OldURI = tostring(mod_props.oldValue)\n | extend NewURI = tostring(mod_props.newValue)\n | project-reorder TimeGenerated, OperationName, AppName, OldURI, NewURI, UpdatedBy\n",
"queryFrequency": "P1D",
"queryPeriod": "P1D",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Persistence",
"PrivilegeEscalation"
],
"techniques": [
"T1078.004"
],
"alertRuleTemplateName": "9fb2ee72-959f-4c2b-bc38-483affc539e4",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"columnName": "UpdatedBy",
"identifier": "FullName"
}
],
"entityType": "Account"
},
{
"fieldMappings": [
{
"columnName": "NewURI",
"identifier": "Url"
}
],
"entityType": "URL"
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ApplicationIDURIChanged.yaml",
"templateVersion": "1.0.1",
"tags": [
"AADSecOpsGuide"
]
}
}
]
}