Unusual Child Process of dns.exe

Identifies an unexpected process spawning from 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", "m365_defender", "sentinel_one_cloud_funnel"]
  4maturity = "production"
  5updated_date = "2024/10/10"
  6min_stack_version = "8.13.0"
  7min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12Identifies an unexpected process spawning from 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"""
 15false_positives = [
 16    """
 17    Werfault.exe will legitimately spawn when dns.exe crashes, but the DNS service is very stable and so this is a low
 18    occurring event. Denial of Service (DoS) attempts by intentionally crashing the service will also cause werfault.exe
 19    to spawn.
 20    """,
 21]
 22from = "now-9m"
 23index = [
 24    "winlogbeat-*",
 25    "logs-endpoint.events.process-*",
 26    "logs-windows.forwarded*",
 27    "logs-windows.sysmon_operational-*",
 28    "endgame-*",
 29    "logs-system.security*",
 30    "logs-m365_defender.event-*",
 31    "logs-sentinel_one_cloud_funnel.*",
 32]
 33language = "eql"
 34license = "Elastic License v2"
 35name = "Unusual Child Process of dns.exe"
 36note = """## Triage and analysis
 37
 38### Investigating Unusual Child Process of dns.exe
 39
 40SIGRed (CVE-2020-1350) is a wormable, critical vulnerability in the Windows DNS server that affects Windows Server versions 2003 to 2019 and can be triggered by a malicious DNS response. Because the service is running in elevated privileges (SYSTEM), an attacker that successfully exploits it is granted Domain Administrator rights. This can effectively compromise the entire corporate infrastructure.
 41
 42This rule looks for unusual children of the `dns.exe` process, which can indicate the exploitation of the SIGRed or a similar remote code execution vulnerability in the DNS server.
 43
 44#### Possible investigation steps
 45
 46- Investigate the process execution chain (parent process tree) for unknown processes.
 47  - Any suspicious or abnormal child process spawned from dns.exe should be carefully reviewed and investigated. It's impossible to predict what an adversary may deploy as the follow-on process after the exploit, but built-in discovery/enumeration utilities should be top of mind (`whoami.exe`, `netstat.exe`, `systeminfo.exe`, `tasklist.exe`).
 48  - Built-in Windows programs that contain capabilities used to download and execute additional payloads should also be considered. This is not an exhaustive list, but ideal candidates to start out would be: `mshta.exe`, `powershell.exe`, `regsvr32.exe`, `rundll32.exe`, `wscript.exe`, `wmic.exe`.
 49  - If a denial-of-service (DoS) exploit is successful and DNS Server service crashes, be mindful of potential child processes related to `werfault.exe` occurring.
 50- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
 51- Investigate other alerts associated with the host during the past 48 hours.
 52- Check whether the server is vulnerable to CVE-2020-1350.
 53- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
 54
 55### False positive analysis
 56
 57- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
 58
 59### Response and remediation
 60
 61- Initiate the incident response process based on the outcome of the triage.
 62- Isolate the involved hosts to prevent further post-compromise behavior.
 63- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
 64- Reimage the host operating system or restore the compromised server to a clean state.
 65- Install the latest patches on systems that run Microsoft DNS Server.
 66- Consider the implementation of a patch management system, such as the Windows Server Update Services (WSUS).
 67- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 68- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 69- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
 70- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 71"""
 72references = [
 73    "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/",
 74    "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/",
 75    "https://github.com/maxpl0it/CVE-2020-1350-DoS",
 76    "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability",
 77]
 78risk_score = 73
 79rule_id = "8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45"
 80severity = "high"
 81tags = [
 82    "Domain: Endpoint",
 83    "OS: Windows",
 84    "Use Case: Threat Detection",
 85    "Tactic: Lateral Movement",
 86    "Resources: Investigation Guide",
 87    "Data Source: Elastic Endgame",
 88    "Use Case: Vulnerability",
 89    "Data Source: Elastic Defend",
 90    "Data Source: System",
 91    "Data Source: Microsoft Defender for Endpoint",
 92    "Data Source: Sysmon",
 93    "Data Source: SentinelOne",
 94]
 95timestamp_override = "event.ingested"
 96type = "eql"
 97
 98query = '''
 99process where host.os.type == "windows" and event.type == "start" and process.parent.name : "dns.exe" and
100  not process.name : "conhost.exe"
101'''
102
103
104[[rule.threat]]
105framework = "MITRE ATT&CK"
106[[rule.threat.technique]]
107id = "T1210"
108name = "Exploitation of Remote Services"
109reference = "https://attack.mitre.org/techniques/T1210/"
110
111
112[rule.threat.tactic]
113id = "TA0008"
114name = "Lateral Movement"
115reference = "https://attack.mitre.org/tactics/TA0008/"

Triage and analysis

Investigating Unusual Child Process of dns.exe

SIGRed (CVE-2020-1350) is a wormable, critical vulnerability in the Windows DNS server that affects Windows Server versions 2003 to 2019 and can be triggered by a malicious DNS response. Because the service is running in elevated privileges (SYSTEM), an attacker that successfully exploits it is granted Domain Administrator rights. This can effectively compromise the entire corporate infrastructure.

This rule looks for unusual children of the dns.exe process, which can indicate the exploitation of the SIGRed or a similar remote code execution vulnerability in the DNS server.

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes.
    • Any suspicious or abnormal child process spawned from dns.exe should be carefully reviewed and investigated. It's impossible to predict what an adversary may deploy as the follow-on process after the exploit, but built-in discovery/enumeration utilities should be top of mind (whoami.exe, netstat.exe, systeminfo.exe, tasklist.exe).
    • Built-in Windows programs that contain capabilities used to download and execute additional payloads should also be considered. This is not an exhaustive list, but ideal candidates to start out would be: mshta.exe, powershell.exe, regsvr32.exe, rundll32.exe, wscript.exe, wmic.exe.
    • If a denial-of-service (DoS) exploit is successful and DNS Server service crashes, be mindful of potential child processes related to werfault.exe occurring.
  • Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
  • Investigate other alerts associated with the host during the past 48 hours.
  • Check whether the server is vulnerable to CVE-2020-1350.
  • Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.

False positive analysis

  • This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved hosts to prevent further post-compromise behavior.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Reimage the host operating system or restore the compromised server to a clean state.
  • Install the latest patches on systems that run Microsoft DNS Server.
  • Consider the implementation of a patch management system, such as the Windows Server Update Services (WSUS).
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top