Unusual File Modification by dns.exe

Identifies an unexpected file being modified by dns.exe, the process responsible for Windows DNS Server services, which may indicate activity related to remote code execution or other forms of exploitation.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/07/16"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/03/28"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies an unexpected file being modified by dns.exe, the process responsible for Windows DNS Server services, which
13may indicate activity related to remote code execution or other forms of exploitation.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Unusual File Modification by dns.exe"
20note = """## Triage and analysis
21
22### Investigating Unusual File Write
23Detection alerts from this rule indicate potential unusual/abnormal file writes from the DNS Server service process (`dns.exe`) after exploitation from CVE-2020-1350 (SigRed) has occurred. Here are some possible avenues of investigation:
24- Post-exploitation, adversaries may write additional files or payloads to the system as additional discovery/exploitation/persistence mechanisms.
25- Any suspicious or abnormal files written from `dns.exe` should be reviewed and investigated with care.
26"""
27references = [
28    "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/",
29    "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/",
30    "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability",
31]
32risk_score = 73
33rule_id = "c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9"
34setup = """## Setup
35
36If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
37events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
38Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
39`event.ingested` to @timestamp.
40For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
41"""
42severity = "high"
43tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Lateral Movement", "Data Source: Elastic Endgame", "Use Case: Vulnerability", "Data Source: Elastic Defend", "Data Source: Sysmon"]
44timestamp_override = "event.ingested"
45type = "eql"
46
47query = '''
48file where host.os.type == "windows" and process.name : "dns.exe" and event.type in ("creation", "deletion", "change") and
49  not file.name : "dns.log" and not
50  (file.extension : ("old", "temp", "bak", "dns", "arpa") and file.path : "C:\\Windows\\System32\\dns\\*")
51'''
52
53
54[[rule.threat]]
55framework = "MITRE ATT&CK"
56[[rule.threat.technique]]
57id = "T1210"
58name = "Exploitation of Remote Services"
59reference = "https://attack.mitre.org/techniques/T1210/"
60
61
62[rule.threat.tactic]
63id = "TA0008"
64name = "Lateral Movement"
65reference = "https://attack.mitre.org/tactics/TA0008/"

Triage and analysis

Investigating Unusual File Write

Detection alerts from this rule indicate potential unusual/abnormal file writes from the DNS Server service process (dns.exe) after exploitation from CVE-2020-1350 (SigRed) has occurred. Here are some possible avenues of investigation:

  • Post-exploitation, adversaries may write additional files or payloads to the system as additional discovery/exploitation/persistence mechanisms.
  • Any suspicious or abnormal files written from dns.exe should be reviewed and investigated with care.

References

Related rules

to-top