Detection rules › Elastic
Possible FIN7 DGA Command and Control Behavior
This rule detects a known command and control pattern in network events. The FIN7 threat group is known to use this command and control technique, while maintaining persistence in their target's network.
Known false positives
- This rule could identify benign domains that are formatted similarly to FIN7's command and control algorithm. Alerts should be investigated by an analyst to assess the validity of the individual observations.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule body
[metadata]
creation_date = "2020/07/06"
integration = ["network_traffic", "panw"]
maturity = "production"
updated_date = "2026/07/16"
[rule]
author = ["Elastic"]
description = """
This rule detects a known command and control pattern in network events. The FIN7 threat group is known to use this
command and control technique, while maintaining persistence in their target's network.
"""
false_positives = [
"""
This rule could identify benign domains that are formatted similarly to FIN7's command and control algorithm. Alerts
should be investigated by an analyst to assess the validity of the individual observations.
""",
]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "Possible FIN7 DGA Command and Control Behavior"
note = """## Triage and analysis
In the event this rule identifies benign domains in your environment, the `destination.domain` exclusion in the rule can be modified to include those domains. Example: `... | where destination.domain not in ("zoom.us", "benign.domain1", "benign.domain2")`."""
references = [
"https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html",
]
risk_score = 73
rule_id = "4a4e23cf-78a2-449c-bac3-701924c269d3"
severity = "high"
tags = [
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Domain: Endpoint",
"Data Source: PAN-OS",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from packetbeat-*, filebeat-*, logs-network_traffic.*, logs-panw.panos* metadata _id, _version, _index
| where (
data_stream.dataset in ("network_traffic.tls", "network_traffic.http") or
(event.category in ("network", "network_traffic") and network.protocol in ("tls", "http") and network.transport == "tcp")
)
| where destination.domain RLIKE "[a-zA-Z]{4,5}\\.(pw|us|club|info|site|top)"
| where destination.domain != "zoom.us"
| keep @timestamp, destination.domain, source.ip, destination.ip, network.protocol, network.transport, data_stream.dataset, _id, _version, _index
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[rule.threat.technique.subtechnique]]
id = "T1071.001"
name = "Web Protocols"
reference = "https://attack.mitre.org/techniques/T1071/001/"
[[rule.threat.technique]]
id = "T1568"
name = "Dynamic Resolution"
reference = "https://attack.mitre.org/techniques/T1568/"
[[rule.threat.technique.subtechnique]]
id = "T1568.002"
name = "Domain Generation Algorithms"
reference = "https://attack.mitre.org/techniques/T1568/002/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Stage 1: from
from packetbeat-*, filebeat-*, logs-network_traffic.*, logs-panw.panos* metadata _id, _version, _index
Stage 2: where
| where (
data_stream.dataset in ("network_traffic.tls", "network_traffic.http") or
(event.category in ("network", "network_traffic") and network.protocol in ("tls", "http") and network.transport == "tcp")
)
Stage 3: where
| where destination.domain RLIKE "[a-zA-Z]{4,5}\\.(pw|us|club|info|site|top)"
Stage 4: where
| where destination.domain != "zoom.us"
Stage 5: keep
| keep @timestamp, destination.domain, source.ip, destination.ip, network.protocol, network.transport, data_stream.dataset, _id, _version, _index
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | in |
| field:"data_stream.dataset" kind:in |
destination.domain | ne |
| field:"DestinationHostname" kind:ne value:"zoom.us" |
destination.domain | regex_match |
| field:"DestinationHostname" kind:regex_match value:"[a-zA-Z]{4,5}.(pw|us|club|info|site|top)" |
event.category | in |
| field:"event.category" kind:in |
network.protocol | in |
| field:"DestinationPortName" kind:in |
network.transport | eq |
| field:"Protocol" kind:eq value:"tcp" |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
@timestamp | KEEP @timestamp |
destination.domain | KEEP destination.domain |
source.ip | KEEP source.ip |
destination.ip | KEEP destination.ip |
network.protocol | KEEP network.protocol |
network.transport | KEEP network.transport |
data_stream.dataset | KEEP data_stream.dataset |
_id | KEEP _id |
_version | KEEP _version |
_index | KEEP _index |