Unusual Child Process for spoolsv.exe or connhost.exe

Description

In late August 2018, a new Windows Zero Day was announced via Twitter, and the only apparent defense is to detect unusual child processes from spoolsv.exe or connhost.exe. SSE already detected the POC, but this specifically looks for any potential detection.


Use Case

Advanced Threat Detection

Category

Endpoint Compromise

Security Impact

As described above, this detection is in response to a particular zero day exploit, described here. This exploit allows a user (either legitimate or an attacker-owned account) with limited privileges to escalate to the SYSTEM account. In practical terms, this would allow an attacker who gets the ability to log into a system to be able to permanently maintain persistence on that system, compromise any data persence, and more easily move laterally.

Alert Volume

Low (?)

SPL Difficulty

Medium

Journey

Stage 3

MITRE ATT&CK Tactics

Privilege Escalation

MITRE ATT&CK Techniques

Exploitation for Privilege Escalation

MITRE Threat Groups

APT28
APT32
APT33
Cobalt Group
FIN6
FIN8
PLATINUM
Threat Group-3390

Kill Chain Phases

Exploitation

Data Sources

Endpoint Detection and Response

   How to Implement

Implementation of this example (or any of the First Time Seen examples) is generally very simple.

  • Validate that you have the right data onboarded, and that the fields you want to monitor are properly extracted. For this search you may wish to alter the process names that are tracked.
  • Save the search.

For most environments, these searches can be run once a day, often overnight, without worrying too much about a slow search. If you wish to run this search more frequently, or if this search is too slow for your environment, we recommend leveraging a lookup cache. For more on this, see the lookup cache dropdown below and select the sample item. A window will pop up telling you more about this feature.

   Known False Positives

This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching over (or for the lookup cache feature, the first occurrence over whatever time period you built the lookup). But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.

This detection should have relatively few false positives given the rarity of new parent processes for these standard Windows processes. Most noise that will come from new systems management scripts, or from new software installers. These can be whitelisted in the search.

   How To Respond

When this search returns values, initiate your incident response process and identify what the child process did. Determine the system it is running on. Contact the user and system owner of this action. If it is authorized, document that this is and by whom. If not, the user credentials have been used by another party and additional investigation is warranted to ensure that processes are not spawning these commands.

   Help

Unusual Child Process for spoolsv.exe or connhost.exe Help

This example leverages the Detect New Values search assistant. Our dataset is a anonymized collection of process launch logs from Microsoft Sysmon (EventCode=1). For this analysis, we are looking at the processes spawned by spoolsv.exe or connhost.exe and comparing them against our baseline. If we've seen that process be spawned before, then all is fine, but if we've never seen it before we'll raise an alert.

SPL for Unusual Child Process for spoolsv.exe or connhost.exe

Demo Data

First we pull in our demo dataset.
Then we filter for spoolsv.exe or connhost.exe parent processes.
Here we use the stats command to calculate what the earliest and the latest time is that we have seen this combination of fields.
Next we calculate the most recent value in our demo dataset
We end by seeing if the earliest time we've seen this value is within the last day of the end of our demo dataset.

Live Data

First we pull in our basic dataset, which consists of XML format Sysmon logs from the endpoints (ingested via the Sysmon TA) with spoolsv.exe or connhost.exe parent processes. This could be any EDR data source that provides file hash information. Because we're looking for process launches, we then filter for EventCode=1 (the Sysmon Process Launch code).
Then we use table to include just the fields we're apt to care about. (Technically we need to use | table for this app because we show you the intermediate results, but in production you should drop this line because it will reduce search performance.)
Here we use the stats command to calculate what the earliest and the latest time is that we have seen this combination of fields.
We end by seeing if the earliest time we've seen this value is within the last day.

Screenshot of Demo Data