Detection rules › Sigma

Process Memory Dump Via Comsvcs.DLL

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Modexp, Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects a process memory dump via "comsvcs.dll" using rundll32, covering multiple different techniques (ordinal, minidump function, etc.)

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Process Memory Dump Via Comsvcs.DLL
id: 646ea171-dded-4578-8a4d-65e9822892e3
related:
    - id: 09e6d5c0-05b8-4ff8-9eeb-043046ec774c
      type: obsolete
status: test
description: Detects a process memory dump via "comsvcs.dll" using rundll32, covering multiple different techniques (ordinal, minidump function, etc.)
references:
    - https://twitter.com/shantanukhande/status/1229348874298388484
    - https://twitter.com/pythonresponder/status/1385064506049630211?s=21
    - https://twitter.com/Hexacorn/status/1224848930795552769
    - https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/
    - https://twitter.com/SBousseaden/status/1167417096374050817
    - https://twitter.com/Wietze/status/1542107456507203586
    - https://github.com/Hackndo/lsassy/blob/14d8f8ae596ecf22b449bfe919829173b8a07635/lsassy/dumpmethod/comsvcs.py
    - https://www.youtube.com/watch?v=52tAmVLg1KM&t=2070s
author: Florian Roth (Nextron Systems), Modexp, Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2020-02-18
modified: 2025-02-23
tags:
    - attack.credential-access
    - attack.stealth
    - attack.t1036
    - attack.t1003.001
    - car.2013-05-009
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
        - CommandLine|contains: 'rundll32'
    selection_cli_1:
        CommandLine|contains|all:
            - 'comsvcs'
            - 'full'
        CommandLine|contains:
            - '#-'
            - '#+'
            - '#24'
            - '24 '
            - 'MiniDump' # Matches MiniDump and MinidumpW
            - '#65560' # ordinal is 16 bit ordinal, so if you make the number large enough (don't fit in 16 bit space), then it normally wraps around.  for e.g ordinal 24 can be also represented by 65560 (65536+24)
    selection_generic:
        CommandLine|contains|all:
            - '24'
            - 'comsvcs'
            - 'full'
        CommandLine|contains:
            - ' #'
            - ',#'
            - ', #'
            - '"#'
    condition: (selection_img and 1 of selection_cli_*) or selection_generic
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

(selection_img and 1 of selection_cli_*) or selection_generic

Stage 1: selection_img

selection_img:
    - Image|endswith: '\rundll32.exe'
    - OriginalFileName: 'RUNDLL32.EXE'
    - CommandLine|contains: 'rundll32'

Stage 2: selection_cli_1

selection_cli_1:
    CommandLine|contains|all:
        - 'comsvcs'
        - 'full'
    CommandLine|contains:
        - '#-'
        - '#+'
        - '#24'
        - '24 '
        - 'MiniDump'
        - '#65560'

Stage 3: selection_generic

selection_generic:
    CommandLine|contains|all:
        - '24'
        - 'comsvcs'
        - 'full'
    CommandLine|contains:
        - ' #'
        - ',#'
        - ', #'
        - '"#'

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
CommandLinematch
  • # corpus 2 (sigma 1, chronicle 1)
  • "#
  • #+ corpus 4 (sigma 3, chronicle 1)
  • #- corpus 4 (sigma 3, chronicle 1)
  • #24 corpus 2 (sigma 1, chronicle 1)
  • #65560
  • , # corpus 3 (sigma 2, chronicle 1)
  • ,# corpus 3 (sigma 2, chronicle 1)
  • 24 corpus 2 (sigma 1, chronicle 1)
  • 24
  • MiniDump corpus 5 (sigma 4, chronicle 1)
  • comsvcs corpus 3 (sigma 2, chronicle 1)
  • full corpus 3 (sigma 2, chronicle 1)
  • rundll32 corpus 26 (sigma 23, chronicle 2, kusto 1)
Imageends_with
  • \rundll32.exe corpus 95 (sigma 95)
OriginalFileNameeq
  • RUNDLL32.EXE corpus 62 (sigma 35, splunk 21, elastic 6)