Detection rules › Sigma

Suspicious Shim Database Patching Activity

Status
test
Severity
high
Log source
product windows, category registry_set
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects installation of new shim databases that try to patch sections of known processes for potential process injection or persistence.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Suspicious Shim Database Patching Activity
id: bf344fea-d947-4ef4-9192-34d008315d3a
status: test
description: Detects installation of new shim databases that try to patch sections of known processes for potential process injection or persistence.
references:
    - https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/pillowmint-fin7s-monkey-thief/
    - https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-01
modified: 2023-12-06
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1546.011
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\'
        TargetObject|endswith:
            # Note: add other application to increase coverage
            - '\csrss.exe'
            - '\dllhost.exe'
            - '\explorer.exe'
            - '\RuntimeBroker.exe'
            - '\services.exe'
            - '\sihost.exe'
            - '\svchost.exe'
            - '\taskhostw.exe'
            - '\winlogon.exe'
            - '\WmiPrvSe.exe'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    TargetObject|contains: '\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\'
    TargetObject|endswith:
        - '\csrss.exe'
        - '\dllhost.exe'
        - '\explorer.exe'
        - '\RuntimeBroker.exe'
        - '\services.exe'
        - '\sihost.exe'
        - '\svchost.exe'
        - '\taskhostw.exe'
        - '\winlogon.exe'
        - '\WmiPrvSe.exe'

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
TargetObjectends_with
  • \RuntimeBroker.exe
  • \WmiPrvSe.exe
  • \csrss.exe
  • \dllhost.exe
  • \explorer.exe
  • \services.exe
  • \sihost.exe
  • \svchost.exe
  • \taskhostw.exe
  • \winlogon.exe
TargetObjectmatch
  • \SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\ corpus 2 (sigma 2)