Detection rules › Splunk

Spoolsv Writing a DLL - Sysmon

Author
Mauricio Velazco, Splunk
Source
upstream

The following analytic detects spoolsv.exe writing a .dll file, which is unusual behavior and may indicate exploitation of vulnerabilities like CVE-2021-34527 (PrintNightmare). This detection leverages Sysmon EventID 11 to monitor file creation events in the \spool\drivers\x64\ directory. This activity is significant because spoolsv.exe typically does not write DLL files, and such behavior could signify an ongoing attack. If confirmed malicious, this could allow an attacker to execute arbitrary code, escalate privileges, or maintain persistence on the compromised system.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1547.012 Boot or Logon Autostart Execution: Print Processors
Privilege EscalationT1547.012 Boot or Logon Autostart Execution: Print Processors

Event coverage

ProviderEvent IDTitle
Sysmon11FileCreate

Stages and Predicates

Stage 1: search

search EventID=11 file_name="*.dll" file_path="*\\spool\\drivers\\x64\\*" process_name="spoolsv.exe"

Stage 2: stats

stats BY action, dest, file_name, file_path, process_guid, process_id, user_id, vendor_product

Stage 3: search

search

Stage 4: search

search

Stage 5: search

search `macro`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventIDeq
  • 11 corpus 10 (splunk 10)
file_nameeq
  • *.dll
file_patheq
  • "*\\spool\\drivers\\x64\\*" corpus 2 (splunk 2)
process_nameeq
  • spoolsv.exe corpus 2 (splunk 2)