Detection rules › Splunk

Spoolsv Suspicious Loaded Modules

Author
Mauricio Velazco, Michael Haag, Teoderick Contreras, Splunk
Source
upstream

The following analytic detects the suspicious loading of DLLs by spoolsv.exe, potentially indicating PrintNightmare exploitation. It leverages Sysmon EventCode 7 to identify instances where spoolsv.exe loads multiple DLLs from the Windows System32 spool drivers x64 directory. This activity is significant as it may signify an attacker exploiting the PrintNightmare vulnerability to execute arbitrary code. If confirmed malicious, this could lead to unauthorized code execution, privilege escalation, and persistent access within the environment, posing a severe security risk.

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
Sysmon7Image loaded

Stages and Predicates

Stage 1: search

search EventCode=7 Image="*\\spoolsv.exe" ImageLoaded="*.dll" ImageLoaded="*\\Windows\\System32\\spool\\drivers\\x64\\*"

Stage 2: stats

stats dc(ImageLoaded) AS countImgloaded,AS ImageLoaded,AS loaded_file,AS loaded_file_path,AS original_file_name,AS process_exec,AS process_guid,AS process_hash,AS process_name,AS service_dll_signature_exists,AS service_dll_signature_verified,AS signature,AS signature_id,AS user_id,AS vendor_product,AS Image BY process_path, dest, process_id

Stage 3: where

where countImgloaded>=3

Stage 4: search

search

Stage 5: search

search

Stage 6: 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
EventCodeeq
  • 7 corpus 35 (splunk 35)
Imageeq
  • "*\\spoolsv.exe" corpus 2 (splunk 2)
ImageLoadedeq
  • "*.dll" corpus 3 (splunk 3)
  • "*\\Windows\\System32\\spool\\drivers\\x64\\*"
countImgloadedge
  • 3

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.