Unusual Child Process of dns.exe

edit

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.

Rule type: eql

Rule indices:

  • winlogbeat-*
  • logs-endpoint.events.*
  • logs-windows.*

Severity: high

Risk score: 73

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Initial Access

Version: 8 (version history)

Added (Elastic Stack release): 7.10.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic

Rule license: Elastic License v2

Potential false positives

edit

Werfault.exe will legitimately spawn when dns.exe crashes, but the DNS service is very stable and so this is a low occurring event. Denial of Service (DoS) attempts by intentionally crashing the service will also cause werfault.exe to spawn.

Investigation guide

edit
## 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 abnormal behaviors observed 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 scan using the antimalware tool in place. This scan can 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).

Rule query

edit
process where event.type == "start" and process.parent.name :
"dns.exe" and not process.name : "conhost.exe"

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 8 (8.4.0 release)
  • Formatting only
Version 6 (8.2.0 release)
  • Formatting only
Version 5 (7.13.0 release)
  • Updated query, changed from:

    event.category:process and event.type:start and
    process.parent.name:dns.exe and not process.name:conhost.exe
Version 4 (7.12.0 release)
  • Formatting only
Version 3 (7.11.2 release)
  • Formatting only
Version 2 (7.11.0 release)
  • Formatting only