FortiSIEM Rules

Excessive End User DNS Queries

Rule ID

PH_Rule_Flow_13

Default Status

Enabled

Description

Detects a scenario where a host, that is itself not an DNS server, is sending excessive DNS requests. Authorized DNS servers are represented by the "DNS Server" group. In a typical scenario, the frequency of end host DNS requests is not high unless, there is a script running - this might indicate the presence of malware on the end host.

Severity

7

Category

Security

MITRE ATT&CK® Tactics

Command And Control

MITRE ATT&CK® Techniques


T1568.001

Dynamic Resolution: Fast Flux DNS

Adversaries may use Fast Flux DNS to hide a command and control channel behind an array of rapidly changing IP addresses linked to a single domain resolution. This technique uses a fully qualified domain name, with multiple IP addresses assigned to it which are swapped with high frequency, using a combination of round robin IP addressing and short Time-To-Live (TTL) for a DNS resource record.

https://attack.mitre.org/techniques/T1568/001

Impacts

Application

Data Source

FortiGate via Syslog or Netflow, Checkpoint via Syslog or Netflow, Palo Alto via Syslog or Netflow

Detection

Correlation

Remediation Guidance

No remediation guidance specified

Time Window

If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.

300 seconds

Trigger Conditions

If the following defined pattern/s occur within a 300 second time window.

ExcessiveDNSFromFlow OR ExcessiveDNSFromServer

Global Constraint

This defines how two or more distinct events are related in a time-series based action. e.g. An event occurs followed by another event if the source IP, user, and messageId are the same

ExcessiveDNSFromFlow.srcIpAddr = ExcessiveDNSFromServer.srcIpAddr

SubPattern Definitions

SubPattern Name: ExcessiveDNSFromFlow

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

ipProto = 17 AND destIpPort = 53 AND srcIpAddr NOT IN (Group@PH_SYS_APP_DNS_SERVER) AND reptDevIpAddr IN (Group@PH_SYS_DEVICE_FIREWALL,Group@PH_SYS_DEVICE_ROUTER_SWITCH) AND srcIpAddr NOT IN (Group@PH_SYS_APP_ACCELOPS,Group@PH_SYS_DEVICE_FSM) AND srcIpAddr IN (Group@PH_SYS_NETWORK_ENTERPRISE_INTERNAL_NET) AND eventType IN (Group@PH_SYS_EVENT_PermitNetTraffic, Group@PH_SYS_EVENT_NetflowTraffic, Group@PH_SYS_EVENT_BiNetflowTraffic, Group@PH_SYS_EVENT_DenyNetTraffic)

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID

srcIpAddr

Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT (*) >= 500
Operator Rank: 0 Operator Type: OR

This operator defines the logic condition relating to the prior event subpattern clause and the following event subpattern clause

SubPattern Name: ExcessiveDNSFromServer

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

srcIpAddr NOT IN (Group@PH_SYS_APP_DNS_SERVER) AND reptDevIpAddr IN (Group@PH_SYS_APP_DNS_SERVER) AND (eventType CONTAIN "BIND_DNS" OR eventType CONTAIN "MS_DNS") AND srcIpAddr NOT IN (Group@PH_SYS_APP_ACCELOPS,Group@PH_SYS_DEVICE_FSM) AND srcIpAddr IN (Group@PH_SYS_NETWORK_ENTERPRISE_INTERNAL_NET)

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID

srcIpAddr

Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT (DISTINCT destName) >= 200

Incident Attribute Mapping

This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.

The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern

 srcIpAddr = ExcessiveDNSFromFlow.srcIpAddr,
 srcIpAddr = ExcessiveDNSFromServer.srcIpAddr,
 incidentCount = ExcessiveDNSFromFlow.COUNT(*),
 incidentCount = ExcessiveDNSFromServer.COUNT(DISTINCT destName)