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"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies an unexpected process spawning from 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"""
 13false_positives = [
 14    """
 15    Werfault.exe will legitimately spawn when dns.exe crashes, but the DNS service is very stable and so this is a low
 16    occurring event. Denial of Service (DoS) attempts by intentionally crashing the service will also cause werfault.exe
 17    to spawn.
 18    """,
 19]
 20from = "now-9m"
 21index = [
 22    "winlogbeat-*",
 23    "logs-endpoint.events.process-*",
 24    "logs-windows.*",
 25    "endgame-*",
 26    "logs-system.security*",
 27]
 28language = "eql"
 29license = "Elastic License v2"
 30name = "Unusual Child Process of dns.exe"
 31note = """## Triage and analysis
 32
 33### Investigating Unusual Child Process of dns.exe
 34
 35SIGRed (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.
 36
 37This 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.
 38
 39#### Possible investigation steps
 40
 41- Investigate the process execution chain (parent process tree) for unknown processes.
 42  - 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`).
 43  - 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`.
 44  - 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.
 45- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
 46- Investigate other alerts associated with the host during the past 48 hours.
 47- Check whether the server is vulnerable to CVE-2020-1350.
 48- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
 49
 50### False positive analysis
 51
 52- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
 53
 54### Response and remediation
 55
 56- Initiate the incident response process based on the outcome of the triage.
 57- Isolate the involved hosts to prevent further post-compromise behavior.
 58- 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.
 59- Reimage the host operating system or restore the compromised server to a clean state.
 60- Install the latest patches on systems that run Microsoft DNS Server.
 61- Consider the implementation of a patch management system, such as the Windows Server Update Services (WSUS).
 62- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 63- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 64- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
 65- 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).
 66"""
 67references = [
 68    "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/",
 69    "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/",
 70    "https://github.com/maxpl0it/CVE-2020-1350-DoS",
 71    "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability",
 72]
 73risk_score = 73
 74rule_id = "8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45"
 75setup = """## Setup
 76
 77If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
 78events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
 79Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
 80`event.ingested` to @timestamp.
 81For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
 82"""
 83severity = "high"
 84tags = [
 85    "Domain: Endpoint",
 86    "OS: Windows",
 87    "Use Case: Threat Detection",
 88    "Tactic: Lateral Movement",
 89    "Resources: Investigation Guide",
 90    "Data Source: Elastic Endgame",
 91    "Use Case: Vulnerability",
 92    "Data Source: Elastic Defend",
 93]
 94timestamp_override = "event.ingested"
 95type = "eql"
 96
 97query = '''
 98process where host.os.type == "windows" and event.type == "start" and process.parent.name : "dns.exe" and
 99  not process.name : "conhost.exe"
100'''
101
102
103[[rule.threat]]
104framework = "MITRE ATT&CK"
105[[rule.threat.technique]]
106id = "T1210"
107name = "Exploitation of Remote Services"
108reference = "https://attack.mitre.org/techniques/T1210/"
109
110
111[rule.threat.tactic]
112id = "TA0008"
113name = "Lateral Movement"
114reference = "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