Detection rules › Sigma

Add Port Monitor Persistence in Registry

Status
test
Severity
medium
Log source
product windows, category registry_set
Author
frack113
Source
github.com/SigmaHQ/sigma

Adversaries may use port monitors to run an attacker supplied DLL during system boot for persistence or privilege escalation. A port monitor can be set through the AddMonitor API call to set a DLL to be loaded at startup.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Add Port Monitor Persistence in Registry
id: 944e8941-f6f6-4ee8-ac05-1c224e923c0e
status: test
description: |
    Adversaries may use port monitors to run an attacker supplied DLL during system boot for persistence or privilege escalation.
    A port monitor can be set through the AddMonitor API call to set a DLL to be loaded at startup.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1547.010/T1547.010.md
author: frack113
date: 2021-12-30
modified: 2024-03-25
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1547.010
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\Control\Print\Monitors\'
        Details|endswith: '.dll'
    filter_optional_cutepdf:
        Image: 'C:\Windows\System32\spoolsv.exe'
        TargetObject|contains: '\Control\Print\Monitors\CutePDF Writer Monitor v4.0\Driver'
        Details: 'cpwmon64_v40.dll'
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
    filter_optional_monvnc:
        TargetObject|contains: '\Control\Print\Monitors\MONVNC\Driver'
    filter_optional_vnc:
        TargetObject|contains|all:
            - 'Control\Print\Environments\'
            - '\Drivers\'
            - '\VNC Printer'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules/windows/registry/registry_set/registry_set_add_port_monitor/info.yml
simulation:
    - type: atomic-red-team
      name: Add Port Monitor persistence in Registry
      technique: T1547.010
      atomic_guid: d34ef297-f178-4462-871e-9ce618d44e50

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_optional_*

Stage 1: selection

selection:
    TargetObject|contains: '\Control\Print\Monitors\'
    Details|endswith: '.dll'

Stage 2: not filter_optional_*

filter_optional_cutepdf:
    Image: 'C:\Windows\System32\spoolsv.exe'
    TargetObject|contains: '\Control\Print\Monitors\CutePDF Writer Monitor v4.0\Driver'
    Details: 'cpwmon64_v40.dll'
    User|contains:
        - 'AUTHORI'
        - 'AUTORI'
filter_optional_monvnc:
    TargetObject|contains: '\Control\Print\Monitors\MONVNC\Driver'
filter_optional_vnc:
    TargetObject|contains|all:
        - 'Control\Print\Environments\'
        - '\Drivers\'
        - '\VNC Printer'

Exclusions

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

FieldKindExcluded values
UsermatchAUTHORI
UsermatchAUTORI
Detailseqcpwmon64_v40.dll
ImageeqC:\Windows\System32\spoolsv.exe
TargetObjectmatch\Control\Print\Monitors\CutePDF Writer Monitor v4.0\Driver
TargetObjectmatchControl\Print\Environments\
TargetObjectmatch\Drivers\
TargetObjectmatch\VNC Printer
TargetObjectmatch\Control\Print\Monitors\MONVNC\Driver

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
Detailsends_with
  • .dll corpus 8 (sigma 4, elastic 3, splunk 1)
TargetObjectmatch
  • \Control\Print\Monitors\