Detection rules › Kusto

Ping Federate - Forbidden country

Status
available
Severity
high
Time window
1h
Source
github.com/Azure/Azure-Sentinel

'Detects requests from forbidden countries.'

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

id: 14042f74-e50b-4c21-8a01-0faf4915ada4
name: Ping Federate - Forbidden country
description: |
  'Detects requests from forbidden countries.'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: CefAma
    dataTypes:
      - CommonSecurityLog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1078
query: |
  let forbidden_geo = dynamic(['CH']);
  PingFederateEvent
  | where isnotempty(DstGeoCountry)
  | where tostring(DstGeoCountry) in~ (forbidden_geo)
  | extend AccountCustomEntity = DstUserName
  | extend IpCustomEntity = SrcIpAddr
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: IpCustomEntity
version: 1.0.3
kind: Scheduled

Stages and Predicates

Parameters

let forbidden_geo = dynamic(['CH']);

Stage 1: source

PingFederateEvent

Stage 2: where

| where isnotempty(DstGeoCountry)

Stage 3: where

| where tostring(DstGeoCountry) in~ (forbidden_geo)

Stage 4: extend

| extend AccountCustomEntity = DstUserName

Stage 5: extend

| extend IpCustomEntity = SrcIpAddr

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DstGeoCountryin
  • forbidden_geo transforms: tostring
field:"DstGeoCountry" kind:in value:"forbidden_geo"
DstGeoCountryis_not_null
  • (no value, null check)
field:"DstGeoCountry" kind:is_not_null

Output fields

These fields are emitted when the rule matches.

FieldSource
AccountCustomEntityextend
IpCustomEntityextend