Windows Registry SIP Persistence via New Cryptography Provider Registration

Detects suspicious Windows registry writes that register a new SIP/Cryptography provider DLL for persistence or defense impairment.

FreeUnreviewedSigmamediumv1
title: Windows Registry SIP Persistence via New Cryptography Provider Registration
id: 59939c0d-1af0-44e0-8c9b-5018005d209d
status: test
description: This rule flags registry activity consistent with registering or updating a Security Information Provider (SIP) by targeting Cryptography provider and EncodingType keys. Attackers may use SIP changes to influence trust decisions or impede defense mechanisms by persisting malicious trust-related configuration. It relies on Windows registry set telemetry matching specific provider-related registry paths and SIP-related DLL string patterns, while excluding known legitimate provider details and suppressing events involving poqexec and CryptSIPDll.
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
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_set/registry_set_sip_persistence.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
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:
      - 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
license: DRL-1.1
related:
  - id: 5a2b21ee-6aaa-4234-ac9d-59a59edf90a1
    type: derived

What it detects

This rule flags registry activity consistent with registering or updating a Security Information Provider (SIP) by targeting Cryptography provider and EncodingType keys. Attackers may use SIP changes to influence trust decisions or impede defense mechanisms by persisting malicious trust-related configuration. It relies on Windows registry set telemetry matching specific provider-related registry paths and SIP-related DLL string patterns, while excluding known legitimate provider details and suppressing events involving poqexec and CryptSIPDll.

Known false positives

  • Legitimate SIP being registered by the OS or different software.

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.