Detection rules › Sigma

Suspicious Spool Service Child Process

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)
Source
github.com/SigmaHQ/sigma

Detects suspicious print spool service (spoolsv.exe) child processes.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious Spool Service Child Process
id: dcdbc940-0bff-46b2-95f3-2d73f848e33b
status: test
description: Detects suspicious print spool service (spoolsv.exe) child processes.
references:
    - https://github.com/microsoft/Microsoft-365-Defender-Hunting-Queries/blob/efa17a600b43c897b4b7463cc8541daa1987eeb4/Exploits/Print%20Spooler%20RCE/Suspicious%20Spoolsv%20Child%20Process.md
author: Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)
date: 2021-07-11
modified: 2024-12-01
tags:
    - attack.execution
    - attack.t1203
    - attack.privilege-escalation
    - attack.t1068
logsource:
    category: process_creation
    product: windows
detection:
    spoolsv:
        ParentImage|endswith: '\spoolsv.exe'
        IntegrityLevel:
            - 'System'
            - 'S-1-16-16384'
    suspicious_unrestricted:
        Image|endswith:
            - '\gpupdate.exe'
            - '\whoami.exe'
            - '\nltest.exe'
            - '\taskkill.exe'
            - '\wmic.exe'
            - '\taskmgr.exe'
            - '\sc.exe'
            - '\findstr.exe'
            - '\curl.exe'
            - '\wget.exe'
            - '\certutil.exe'
            - '\bitsadmin.exe'
            - '\accesschk.exe'
            - '\wevtutil.exe'
            - '\bcdedit.exe'
            - '\fsutil.exe'
            - '\cipher.exe'
            - '\schtasks.exe'
            - '\write.exe'
            - '\wuauclt.exe'
            - '\systeminfo.exe'
            - '\reg.exe'
            - '\query.exe'
    suspicious_net:
        Image|endswith:
            - '\net.exe'
            - '\net1.exe'
    suspicious_net_filter:
        CommandLine|contains: 'start'
    suspicious_cmd:
        Image|endswith: '\cmd.exe'
    suspicious_cmd_filter:
        CommandLine|contains:
            - '.spl'
            - 'route add'
            - 'program files'
    suspicious_netsh:
        Image|endswith: '\netsh.exe'
    suspicious_netsh_filter:
        CommandLine|contains:
            - 'add portopening'
            - 'rule name'
    suspicious_powershell:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
    suspicious_powershell_filter:
        CommandLine|contains: '.spl'
    suspicious_rundll32_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
    suspicious_rundll32_cli:
        CommandLine|endswith: 'rundll32.exe'
    condition: spoolsv and ( suspicious_unrestricted or (suspicious_net and not suspicious_net_filter) or (suspicious_cmd and not suspicious_cmd_filter) or (suspicious_netsh and not suspicious_netsh_filter) or (suspicious_powershell and not suspicious_powershell_filter) or all of suspicious_rundll32_* )
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

spoolsv and ( suspicious_unrestricted or (suspicious_net and not suspicious_net_filter) or (suspicious_cmd and not suspicious_cmd_filter) or (suspicious_netsh and not suspicious_netsh_filter) or (suspicious_powershell and not suspicious_powershell_filter) or all of suspicious_rundll32_* )

Stage 1: spoolsv

spoolsv:
    ParentImage|endswith: '\spoolsv.exe'
    IntegrityLevel:
        - 'System'
        - 'S-1-16-16384'

Stage 2: suspicious_unrestricted

suspicious_unrestricted:
    Image|endswith:
        - '\gpupdate.exe'
        - '\whoami.exe'
        - '\nltest.exe'
        - '\taskkill.exe'
        - '\wmic.exe'
        - '\taskmgr.exe'
        - '\sc.exe'
        - '\findstr.exe'
        - '\curl.exe'
        - '\wget.exe'
        - '\certutil.exe'
        - '\bitsadmin.exe'
        - '\accesschk.exe'
        - '\wevtutil.exe'
        - '\bcdedit.exe'
        - '\fsutil.exe'
        - '\cipher.exe'
        - '\schtasks.exe'
        - '\write.exe'
        - '\wuauclt.exe'
        - '\systeminfo.exe'
        - '\reg.exe'
        - '\query.exe'

Stage 3: suspicious_net

suspicious_net:
    Image|endswith:
        - '\net.exe'
        - '\net1.exe'

Stage 4: not suspicious_net_filter

suspicious_net_filter:
    CommandLine|contains: 'start'

Stage 5: suspicious_cmd

suspicious_cmd:
    Image|endswith: '\cmd.exe'

Stage 6: not suspicious_cmd_filter

suspicious_cmd_filter:
    CommandLine|contains:
        - '.spl'
        - 'route add'
        - 'program files'

Stage 7: suspicious_netsh

suspicious_netsh:
    Image|endswith: '\netsh.exe'

Stage 8: not suspicious_netsh_filter

suspicious_netsh_filter:
    CommandLine|contains:
        - 'add portopening'
        - 'rule name'

Stage 9: suspicious_powershell

suspicious_powershell:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'

Stage 10: not suspicious_powershell_filter

suspicious_powershell_filter:
    CommandLine|contains: '.spl'

Stage 11: suspicious_rundll32_img

suspicious_rundll32_img:
    - Image|endswith: '\rundll32.exe'
    - OriginalFileName: 'RUNDLL32.EXE'

Stage 12: suspicious_rundll32_cli

suspicious_rundll32_cli:
    CommandLine|endswith: 'rundll32.exe'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematchstart
CommandLinematch.spl
CommandLinematchprogram files
CommandLinematchroute add
CommandLinematchadd portopening
CommandLinematchrule name
CommandLinematch.spl

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
CommandLineends_with
  • rundll32.exe corpus 2 (sigma 2)
Imageends_with
  • \accesschk.exe corpus 3 (sigma 3)
  • \bcdedit.exe corpus 5 (sigma 5)
  • \bitsadmin.exe corpus 29 (sigma 29)
  • \certutil.exe corpus 43 (sigma 43)
  • \cipher.exe corpus 2 (sigma 2)
  • \cmd.exe corpus 130 (sigma 130)
  • \curl.exe corpus 30 (sigma 30)
  • \findstr.exe corpus 12 (sigma 12)
  • \fsutil.exe corpus 5 (sigma 5)
  • \gpupdate.exe corpus 2 (sigma 2)
  • \net.exe corpus 49 (sigma 49)
  • \net1.exe corpus 47 (sigma 47)
  • \netsh.exe corpus 28 (sigma 28)
  • \nltest.exe corpus 9 (sigma 9)
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)
  • \query.exe corpus 6 (sigma 6)
  • \reg.exe corpus 58 (sigma 58)
  • \rundll32.exe corpus 95 (sigma 95)
  • \sc.exe corpus 30 (sigma 30)
  • \schtasks.exe corpus 56 (sigma 56)
  • \systeminfo.exe corpus 11 (sigma 11)
  • \taskkill.exe corpus 4 (sigma 4)
  • \taskmgr.exe corpus 5 (sigma 5)
  • \wevtutil.exe corpus 9 (sigma 9)
  • \wget.exe corpus 9 (sigma 9)
  • \whoami.exe corpus 19 (sigma 19)
  • \wmic.exe corpus 60 (sigma 60)
  • \write.exe
  • \wuauclt.exe corpus 3 (sigma 3)
IntegrityLeveleq
  • S-1-16-16384 corpus 29 (sigma 22, splunk 4, elastic 3)
  • System corpus 29 (sigma 22, splunk 4, elastic 3)
OriginalFileNameeq
  • RUNDLL32.EXE corpus 62 (sigma 35, splunk 21, elastic 6)
ParentImageends_with
  • \spoolsv.exe corpus 5 (sigma 5)