Detection rules › Sigma

Allow Service Access Using Security Descriptor Tampering Via Sc.EXE

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

Detects suspicious DACL modifications to allow access to a service from a suspicious trustee. This can be used to override access restrictions set by previous ACLs.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Allow Service Access Using Security Descriptor Tampering Via Sc.EXE
id: 6c8fbee5-dee8-49bc-851d-c3142d02aa47
related:
    - id: a537cfc3-4297-4789-92b5-345bfd845ad0 # Generic SD tampering
      type: similar
status: test
description: Detects suspicious DACL modifications to allow access to a service from a suspicious trustee. This can be used to override access restrictions set by previous ACLs.
references:
    - https://twitter.com/0gtweet/status/1628720819537936386
    - https://itconnect.uw.edu/tools-services-support/it-systems-infrastructure/msinf/other-help/understanding-sddl-syntax/
    - https://learn.microsoft.com/en-us/windows/win32/secauthz/sid-strings
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-02-28
modified: 2025-10-22
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1543.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_sc:
        - Image|endswith: '\sc.exe'
        - OriginalFileName: 'sc.exe'
    selection_sdset:
        CommandLine|contains|all:
            - 'sdset'
            - 'A;' # Allow Access
    selection_trustee:
        CommandLine|contains:
            - ';IU' # Interactively logged-on user
            - ';SU' # Service logon user
            - ';BA' # Built-in administrators
            - ';SY' # Local system
            - ';WD' # Everyone
    filter_optional_hexnode:
        ParentImage: 'C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'
    condition: all of selection_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_optional_*

Stage 1: selection_sc

selection_sc:
    - Image|endswith: '\sc.exe'
    - OriginalFileName: 'sc.exe'

Stage 2: selection_sdset

selection_sdset:
    CommandLine|contains|all:
        - 'sdset'
        - 'A;'

Stage 3: selection_trustee

selection_trustee:
    CommandLine|contains:
        - ';IU'
        - ';SU'
        - ';BA'
        - ';SY'
        - ';WD'

Stage 4: not filter_optional_hexnode

filter_optional_hexnode:
    ParentImage: 'C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'

Exclusions

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

FieldKindExcluded values
ParentImageeqC:\Hexnode\Hexnode Agent\Current\HexnodeAgent.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
CommandLinematch
  • ;BA corpus 2 (sigma 2)
  • ;IU corpus 2 (sigma 2)
  • ;SU corpus 2 (sigma 2)
  • ;SY corpus 2 (sigma 2)
  • ;WD corpus 2 (sigma 2)
  • A;
  • sdset corpus 5 (sigma 5)
Imageends_with
  • \sc.exe corpus 30 (sigma 30)
OriginalFileNameeq
  • sc.exe corpus 26 (sigma 12, splunk 10, elastic 4)