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 = "2023/10/23"
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.*", "logs-windows.*", "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
27"""
28references = [
29 "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/",
30 "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/",
31 "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability",
32]
33risk_score = 73
34rule_id = "c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9"
35setup="""
36
37If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
38events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
39Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
40`event.ingested` to @timestamp.
41For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
42"""
43severity = "high"
44tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Lateral Movement", "Data Source: Elastic Endgame", "Use Case: Vulnerability", "Data Source: Elastic Defend"]
45timestamp_override = "event.ingested"
46type = "eql"
47
48query = '''
49file where host.os.type == "windows" and process.name : "dns.exe" and event.type in ("creation", "deletion", "change") and
50 not file.name : "dns.log" and not
51 (file.extension : ("old", "temp", "bak", "dns", "arpa") and file.path : "C:\\Windows\\System32\\dns\\*")
52'''
53
54
55[[rule.threat]]
56framework = "MITRE ATT&CK"
57[[rule.threat.technique]]
58id = "T1210"
59name = "Exploitation of Remote Services"
60reference = "https://attack.mitre.org/techniques/T1210/"
61
62
63[rule.threat.tactic]
64id = "TA0008"
65name = "Lateral Movement"
66reference = "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
- Microsoft Exchange Server UM Spawning Suspicious Processes
- Microsoft Exchange Server UM Writing Suspicious Files
- Unusual Child Process of dns.exe
- Execution via TSClient Mountpoint
- Lateral Movement via Startup Folder