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

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.2
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

Stage 7: where

| where NumEvents_d > 2

Stage 8: sort

| sort by NumEvents_d asc

Stage 9: project

| project NumEvents_d, ipaddress, EmIpAddr

Indicators

These rows show field, operator, and value matches.

Output fields

These fields are emitted when the rule matches.

FieldSource
EmIpAddrproject
NumEvents_dproject
ipaddressproject