Detection rules › Kusto

Forescout-DNS_Sniff_Event_Monitor

Severity
medium
Time window
5m
Group by
EmIpAddr, ipaddress
Source
github.com/Azure/Azure-Sentinel

This rule creates an incident when more than certain number of Dnsniff events are generated from a host

Rule body kusto

id: d272e277-f285-4dbc-ae2d-7f65ba64a79e
name: Forescout-DNS_Sniff_Event_Monitor
description: 'This rule creates an incident when more than certain number of Dnsniff events are generated from a host'
severity: Medium
requiredDataConnectors: []
queryFrequency: 5m
queryPeriod: 5m
triggerOperator: gt
triggerThreshold: 0
tactics: []
relevantTechniques: []
query:
  ForescoutHostProperties_CL
  | extend  d = parse_json(HostProperties)
  | where d.DnsniffEvent matches regex "DNS Query Type:.A;DNS Query/Response:.Query"
  | extend ipaddress = iif(isnotempty(Ipv4Addr), Ipv4Addr, (iif(isnotempty(Ipv6Addr), Ipv6Addr, "")))
  | where isnotempty(ipaddress) and isnotempty(EmIpAddr)
  | summarize NumEvents_d =count() by ipaddress, EmIpAddr
  | where NumEvents_d > 2
  | sort by NumEvents_d asc
  | project NumEvents_d, ipaddress, EmIpAddr

entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: ipaddress
customDetails:
  Ip: ipaddress
  NumEvents: NumEvents_d
  EmIp: EmIpAddr
alertDetailsOverride:
  alertDisplayNameFormat: Dnsniff-Address-Check
  alertDescriptionFormat: Dnsniff-Address-Check alert
version: 2.0.0
kind: Scheduled

Stages and Predicates

Stage 1: source

ForescoutHostProperties_CL

Stage 2: extend

| extend  d = parse_json(HostProperties)

Stage 3: where

| where d.DnsniffEvent matches regex "DNS Query Type:.A;DNS Query/Response:.Query"

Stage 4: extend

| extend ipaddress = iif(isnotempty(Ipv4Addr), Ipv4Addr, (iif(isnotempty(Ipv6Addr), Ipv6Addr, "")))

Stage 5: where

| where isnotempty(ipaddress) and isnotempty(EmIpAddr)

Stage 6: summarize

| summarize NumEvents_d =count() by ipaddress, EmIpAddr
Threshold
gt 2

Stage 7: where

| where NumEvents_d > 2

Stage 8: sort

| sort by NumEvents_d asc

Stage 9: project

| project NumEvents_d, ipaddress, EmIpAddr

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DnsniffEventregex_match
  • DNS Query Type:.A;DNS Query/Response:.Query
EmIpAddris_not_null
  • (no value, null check)
NumEvents_dgt
  • 2 transforms: cased
ipaddressis_not_null
  • (no value, null check)

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
EmIpAddrproject
NumEvents_dproject
ipaddressproject