NRT PIM Elevation Request Rejected
Id | 5db427b2-f406-4274-b413-e9fcb29412f8 |
Rulename | NRT PIM Elevation Request Rejected |
Description | Identifies when a user is rejected for a privileged role elevation via PIM. Monitor rejections for indicators of attacker compromise of the requesting account. Ref : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-privileged-identity-management |
Severity | High |
Tactics | Persistence |
Techniques | T1078.004 |
Required data connectors | AzureActiveDirectory |
Kind | NRT |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/NRT_PIMElevationRequestRejected.yaml |
Version | 1.0.1 |
Arm template | 5db427b2-f406-4274-b413-e9fcb29412f8.json |
AuditLogs
| where ActivityDisplayName =~'Add member to role completed (PIM activation)'
| where Result =~ "failure"
| mv-apply ResourceItem = TargetResources on
(
where ResourceItem.type =~ "Role"
| extend Role = trim(@'"',tostring(ResourceItem.displayName))
)
| mv-apply ResourceItem = TargetResources on
(
where ResourceItem.type =~ "User"
| extend User = trim(@'"',tostring(ResourceItem.userPrincipalName))
)
| project-reorder TimeGenerated, User, Role, OperationName, Result, ResultDescription
| where isnotempty(InitiatedBy.user)
| extend InitiatingUser = tostring(InitiatedBy.user.userPrincipalName), InitiatingIpAddress = tostring(InitiatedBy.user.ipAddress)
| extend InitiatingName = tostring(split(InitiatingUser,'@',0)[0]), InitiatingUPNSuffix = tostring(split(InitiatingUser,'@',1)[0])
| extend UserName = tostring(split(User,'@',0)[0]), UserUPNSuffix = tostring(split(User,'@',1)[0])
severity: High
relevantTechniques:
- T1078.004
tactics:
- Persistence
kind: NRT
query: |
AuditLogs
| where ActivityDisplayName =~'Add member to role completed (PIM activation)'
| where Result =~ "failure"
| mv-apply ResourceItem = TargetResources on
(
where ResourceItem.type =~ "Role"
| extend Role = trim(@'"',tostring(ResourceItem.displayName))
)
| mv-apply ResourceItem = TargetResources on
(
where ResourceItem.type =~ "User"
| extend User = trim(@'"',tostring(ResourceItem.userPrincipalName))
)
| project-reorder TimeGenerated, User, Role, OperationName, Result, ResultDescription
| where isnotempty(InitiatedBy.user)
| extend InitiatingUser = tostring(InitiatedBy.user.userPrincipalName), InitiatingIpAddress = tostring(InitiatedBy.user.ipAddress)
| extend InitiatingName = tostring(split(InitiatingUser,'@',0)[0]), InitiatingUPNSuffix = tostring(split(InitiatingUser,'@',1)[0])
| extend UserName = tostring(split(User,'@',0)[0]), UserUPNSuffix = tostring(split(User,'@',1)[0])
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/NRT_PIMElevationRequestRejected.yaml
status: Available
version: 1.0.1
tags:
- AADSecOpsGuide
name: NRT PIM Elevation Request Rejected
requiredDataConnectors:
- dataTypes:
- AuditLogs
connectorId: AzureActiveDirectory
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: InitiatingName
- identifier: UPNSuffix
columnName: InitiatingUPNSuffix
- entityType: Account
fieldMappings:
- identifier: Name
columnName: UserName
- identifier: UPNSuffix
columnName: UserUPNSuffix
- entityType: IP
fieldMappings:
- identifier: Address
columnName: InitiatingIpAddress
id: 5db427b2-f406-4274-b413-e9fcb29412f8
description: |
'Identifies when a user is rejected for a privileged role elevation via PIM. Monitor rejections for indicators of attacker compromise of the requesting account.
Ref : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-privileged-identity-management'
{
"$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/5db427b2-f406-4274-b413-e9fcb29412f8')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5db427b2-f406-4274-b413-e9fcb29412f8')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "NRT",
"apiVersion": "2022-11-01-preview",
"properties": {
"displayName": "NRT PIM Elevation Request Rejected",
"description": "'Identifies when a user is rejected for a privileged role elevation via PIM. Monitor rejections for indicators of attacker compromise of the requesting account.\nRef : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-privileged-identity-management'\n",
"severity": "High",
"enabled": true,
"query": "AuditLogs\n| where ActivityDisplayName =~'Add member to role completed (PIM activation)'\n| where Result =~ \"failure\"\n| mv-apply ResourceItem = TargetResources on \n (\n where ResourceItem.type =~ \"Role\"\n | extend Role = trim(@'\"',tostring(ResourceItem.displayName))\n )\n| mv-apply ResourceItem = TargetResources on \n (\n where ResourceItem.type =~ \"User\"\n | extend User = trim(@'\"',tostring(ResourceItem.userPrincipalName))\n )\n| project-reorder TimeGenerated, User, Role, OperationName, Result, ResultDescription\n| where isnotempty(InitiatedBy.user)\n| extend InitiatingUser = tostring(InitiatedBy.user.userPrincipalName), InitiatingIpAddress = tostring(InitiatedBy.user.ipAddress)\n| extend InitiatingName = tostring(split(InitiatingUser,'@',0)[0]), InitiatingUPNSuffix = tostring(split(InitiatingUser,'@',1)[0])\n| extend UserName = tostring(split(User,'@',0)[0]), UserUPNSuffix = tostring(split(User,'@',1)[0])\n",
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Persistence"
],
"techniques": [
"T1078.004"
],
"alertRuleTemplateName": "5db427b2-f406-4274-b413-e9fcb29412f8",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"columnName": "InitiatingName",
"identifier": "Name"
},
{
"columnName": "InitiatingUPNSuffix",
"identifier": "UPNSuffix"
}
],
"entityType": "Account"
},
{
"fieldMappings": [
{
"columnName": "UserName",
"identifier": "Name"
},
{
"columnName": "UserUPNSuffix",
"identifier": "UPNSuffix"
}
],
"entityType": "Account"
},
{
"fieldMappings": [
{
"columnName": "InitiatingIpAddress",
"identifier": "Address"
}
],
"entityType": "IP"
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/NRT_PIMElevationRequestRejected.yaml",
"status": "Available",
"templateVersion": "1.0.1",
"tags": [
"AADSecOpsGuide"
]
}
}
]
}