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