Try in Splunk Security Cloud

Description

The following analytic detects the addition of new printer drivers by monitoring Windows PrintService operational logs, specifically EventCode 316. This detection leverages log data to identify messages indicating the addition or update of printer drivers, such as "kernelbase.dll" and "UNIDRV.DLL." This activity is significant as it may indicate exploitation attempts related to vulnerabilities like CVE-2021-34527 (PrintNightmare). If confirmed malicious, attackers could gain code execution or escalate privileges, potentially compromising the affected system. Immediate isolation and investigation of the endpoint are recommended.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-18
  • Author: Mauricio Velazco, Michael Haag, Teoderick Contreras, Splunk
  • ID: 313681a2-da8e-11eb-adad-acde48001122

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1547.012 Print Processors Persistence, Privilege Escalation
T1547 Boot or Logon Autostart Execution Persistence, Privilege Escalation
Kill Chain Phase
  • Installation
  • Exploitation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
`printservice` EventCode=316 category = "Adding a printer driver" Message = "*kernelbase.dll,*" Message = "*UNIDRV.DLL,*" Message = "*.DLL.*" 
| stats  count min(_time) as firstTime max(_time) as lastTime by OpCode EventCode ComputerName Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `print_spooler_adding_a_printer_driver_filter`

Macros

The SPL above uses the following Macros:

:information_source: print_spooler_adding_a_printer_driver_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • OpCode
  • EventCode
  • ComputerName
  • Message

How To Implement

You will need to ensure PrintService Admin and Operational logs are being logged to Splunk from critical or all systems.

Known False Positives

Unknown. This may require filtering.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
72.0 80 90 Suspicious print driver was loaded on endpoint $ComputerName$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2