Detection rules › Sigma

Persistence Via New SIP Provider

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

Detects when an attacker register a new SIP provider for persistence and defense evasion

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Persistence Via New SIP Provider
id: 5a2b21ee-6aaa-4234-ac9d-59a59edf90a1
status: test
description: Detects when an attacker register a new SIP provider for persistence and defense evasion
references:
    - https://persistence-info.github.io/Data/codesigning.html
    - https://github.com/gtworek/PSBits/tree/master/SIP
    - https://specterops.io/assets/resources/SpecterOps_Subverting_Trust_in_Windows.pdf
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-21
modified: 2023-08-17
tags:
    - attack.persistence
    - attack.defense-impairment
    - attack.t1553.003
logsource:
    category: registry_set
    product: windows
detection:
    selection_root:
        TargetObject|contains:
            - '\SOFTWARE\Microsoft\Cryptography\Providers\'
            - '\SOFTWARE\Microsoft\Cryptography\OID\EncodingType'
            - '\SOFTWARE\WOW6432Node\Microsoft\Cryptography\Providers\'
            - '\SOFTWARE\WOW6432Node\Microsoft\Cryptography\OID\EncodingType'
    selection_dll:
        TargetObject|contains:
            - '\Dll'
            - '\$DLL'
    filter:
        Details:
            # Add more legitimate SIP providers according to your env
            - WINTRUST.DLL
            - mso.dll
    filter_poqexec:
        Image: 'C:\Windows\System32\poqexec.exe'
        TargetObject|contains: '\CryptSIPDll'
        Details: 'C:\Windows\System32\PsfSip.dll'
    condition: all of selection_* and not 1 of filter*
falsepositives:
    - Legitimate SIP being registered by the OS or different software.
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter*

Stage 1: selection_root

selection_root:
    TargetObject|contains:
        - '\SOFTWARE\Microsoft\Cryptography\Providers\'
        - '\SOFTWARE\Microsoft\Cryptography\OID\EncodingType'
        - '\SOFTWARE\WOW6432Node\Microsoft\Cryptography\Providers\'
        - '\SOFTWARE\WOW6432Node\Microsoft\Cryptography\OID\EncodingType'

Stage 2: selection_dll

selection_dll:
    TargetObject|contains:
        - '\Dll'
        - '\$DLL'

Stage 3: not filter*

filter:
    Details:
        - WINTRUST.DLL
        - mso.dll
filter_poqexec:
    Image: 'C:\Windows\System32\poqexec.exe'
    TargetObject|contains: '\CryptSIPDll'
    Details: 'C:\Windows\System32\PsfSip.dll'

Exclusions

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

FieldKindExcluded values
DetailseqC:\Windows\System32\PsfSip.dll
ImageeqC:\Windows\System32\poqexec.exe
TargetObjectmatch\CryptSIPDll
DetailseqWINTRUST.DLL
Detailseqmso.dll

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
TargetObjectmatch
  • \$DLL
  • \Dll
  • \SOFTWARE\Microsoft\Cryptography\OID\EncodingType corpus 2 (sigma 2)
  • \SOFTWARE\Microsoft\Cryptography\Providers\ corpus 2 (sigma 2)
  • \SOFTWARE\WOW6432Node\Microsoft\Cryptography\OID\EncodingType corpus 2 (sigma 2)
  • \SOFTWARE\WOW6432Node\Microsoft\Cryptography\Providers\ corpus 2 (sigma 2)