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