Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Ping Federate - Forbidden country

Back
Id14042f74-e50b-4c21-8a01-0faf4915ada4
RulenamePing Federate - Forbidden country
DescriptionDetects requests from forbidden countries.
SeverityHigh
TacticsInitialAccess
TechniquesT1078
Required data connectorsPingFederate
PingFederateAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingFederate/Analytic Rules/PingFederateForbiddenCountry.yaml
Version1.0.1
Arm template14042f74-e50b-4c21-8a01-0faf4915ada4.json
Deploy To Azure
let forbidden_geo = dynamic(['CH']);
PingFederateEvent
| where isnotempty(DstGeoCountry)
| where tostring(DstGeoCountry) in~ (forbidden_geo)
| extend AccountCustomEntity = DstUserName
| extend IpCustomEntity = SrcIpAddr
queryFrequency: 1h
tactics:
- InitialAccess
queryPeriod: 1h
kind: Scheduled
relevantTechniques:
- T1078
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingFederate/Analytic Rules/PingFederateForbiddenCountry.yaml
description: |
    'Detects requests from forbidden countries.'
requiredDataConnectors:
- dataTypes:
  - PingFederateEvent
  connectorId: PingFederate
- dataTypes:
  - PingFederateEvent
  connectorId: PingFederateAma
version: 1.0.1
triggerThreshold: 0
severity: High
triggerOperator: gt
id: 14042f74-e50b-4c21-8a01-0faf4915ada4
entityMappings:
- entityType: Account
  fieldMappings:
  - columnName: AccountCustomEntity
    identifier: Name
- entityType: IP
  fieldMappings:
  - columnName: IpCustomEntity
    identifier: Address
status: Available
name: Ping Federate - Forbidden country
query: |
  let forbidden_geo = dynamic(['CH']);
  PingFederateEvent
  | where isnotempty(DstGeoCountry)
  | where tostring(DstGeoCountry) in~ (forbidden_geo)
  | extend AccountCustomEntity = DstUserName
  | extend IpCustomEntity = SrcIpAddr  
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/14042f74-e50b-4c21-8a01-0faf4915ada4')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/14042f74-e50b-4c21-8a01-0faf4915ada4')]",
      "properties": {
        "alertRuleTemplateName": "14042f74-e50b-4c21-8a01-0faf4915ada4",
        "customDetails": null,
        "description": "'Detects requests from forbidden countries.'\n",
        "displayName": "Ping Federate - Forbidden country",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IpCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingFederate/Analytic Rules/PingFederateForbiddenCountry.yaml",
        "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",
        "severity": "High",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}