let forbidden_geo = dynamic(['CH']);
PingFederateEvent
| where isnotempty(DstGeoCountry)
| where tostring(DstGeoCountry) in~ (forbidden_geo)
| extend AccountCustomEntity = DstUserName
| extend IpCustomEntity = SrcIpAddr
triggerOperator: gt
id: 14042f74-e50b-4c21-8a01-0faf4915ada4
queryFrequency: 1h
entityMappings:
- entityType: Account
fieldMappings:
- columnName: AccountCustomEntity
identifier: Name
- entityType: IP
fieldMappings:
- columnName: IpCustomEntity
identifier: Address
requiredDataConnectors:
- dataTypes:
- PingFederateEvent
connectorId: PingFederate
severity: High
triggerThreshold: 0
kind: Scheduled
status: Available
queryPeriod: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingFederate/Analytic Rules/PingFederateForbiddenCountry.yaml
query: |
let forbidden_geo = dynamic(['CH']);
PingFederateEvent
| where isnotempty(DstGeoCountry)
| where tostring(DstGeoCountry) in~ (forbidden_geo)
| extend AccountCustomEntity = DstUserName
| extend IpCustomEntity = SrcIpAddr
description: |
'Detects requests from forbidden countries.'
name: Ping Federate - Forbidden country
relevantTechniques:
- T1078
tactics:
- InitialAccess
version: 1.0.0
{
"$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/14042f74-e50b-4c21-8a01-0faf4915ada4')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/14042f74-e50b-4c21-8a01-0faf4915ada4')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01",
"properties": {
"displayName": "Ping Federate - Forbidden country",
"description": "'Detects requests from forbidden countries.'\n",
"severity": "High",
"enabled": true,
"query": "let forbidden_geo = dynamic(['CH']);\nPingFederateEvent\n| where isnotempty(DstGeoCountry)\n| where tostring(DstGeoCountry) in~ (forbidden_geo)\n| extend AccountCustomEntity = DstUserName\n| extend IpCustomEntity = SrcIpAddr\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1078"
],
"alertRuleTemplateName": "14042f74-e50b-4c21-8a01-0faf4915ada4",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"identifier": "Name",
"columnName": "AccountCustomEntity"
}
],
"entityType": "Account"
},
{
"fieldMappings": [
{
"identifier": "Address",
"columnName": "IpCustomEntity"
}
],
"entityType": "IP"
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingFederate/Analytic Rules/PingFederateForbiddenCountry.yaml",
"templateVersion": "1.0.0",
"status": "Available"
}
}
]
}