Detection rules › Sigma

Active Directory User Backdoors

Status
test
Severity
high
Log source
product windows, service security
Author
@neu5ron
Source
github.com/SigmaHQ/sigma

Detects scenarios where one can control another users or computers account without having to use their credentials.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1098 Account Manipulation
Privilege EscalationT1098 Account Manipulation

Event coverage

Rule body yaml

title: Active Directory User Backdoors
id: 300bac00-e041-4ee2-9c36-e262656a6ecc
status: test
description: Detects scenarios where one can control another users or computers account without having to use their credentials.
references:
    - https://msdn.microsoft.com/en-us/library/cc220234.aspx
    - https://adsecurity.org/?p=3466
    - https://blog.harmj0y.net/redteaming/another-word-on-delegation/
author: '@neu5ron'
date: 2017-04-13
modified: 2024-02-26
tags:
    - attack.privilege-escalation
    - attack.t1098
    - attack.persistence
logsource:
    product: windows
    service: security
    definition: 'Requirements: Audit Policy : Account Management > Audit User Account Management, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies\Account Management\Audit User Account Management, DS Access > Audit Directory Service Changes, Group Policy : Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies\DS Access\Audit Directory Service Changes'
detection:
    selection1:
        EventID: 4738
    filter_empty:
        AllowedToDelegateTo:
            - ''
            - '-'
    filter_null:
        AllowedToDelegateTo: null
    selection_5136_1:
        EventID: 5136
        AttributeLDAPDisplayName: 'msDS-AllowedToDelegateTo'
    selection_5136_2:
        EventID: 5136
        ObjectClass: 'user'
        AttributeLDAPDisplayName: 'servicePrincipalName'
    selection_5136_3:
        EventID: 5136
        AttributeLDAPDisplayName: 'msDS-AllowedToActOnBehalfOfOtherIdentity'
    condition: (selection1 and not 1 of filter_*) or 1 of selection_5136_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

(selection1 and not 1 of filter_*) or 1 of selection_5136_*

Stage 1: selection1

selection1:
    EventID: 4738

Stage 2: not filter_*

filter_empty:
    AllowedToDelegateTo:
        - ''
        - '-'
filter_null:
    AllowedToDelegateTo: null

Stage 3: selection_5136_1

selection_5136_1:
    EventID: 5136
    AttributeLDAPDisplayName: 'msDS-AllowedToDelegateTo'

Stage 4: selection_5136_2

selection_5136_2:
    EventID: 5136
    ObjectClass: 'user'
    AttributeLDAPDisplayName: 'servicePrincipalName'

Stage 5: selection_5136_3

selection_5136_3:
    EventID: 5136
    AttributeLDAPDisplayName: 'msDS-AllowedToActOnBehalfOfOtherIdentity'

Exclusions

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

FieldKindExcluded values
AllowedToDelegateToeq-
AllowedToDelegateTois_null(no value, null check)

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
AttributeLDAPDisplayNameeq
  • msDS-AllowedToActOnBehalfOfOtherIdentity corpus 3 (sigma 2, kusto 1)
  • msDS-AllowedToDelegateTo
  • servicePrincipalName corpus 9 (sigma 4, splunk 3, elastic 1, kusto 1)
ObjectClasseq
  • user corpus 6 (sigma 2, splunk 2, elastic 1, kusto 1)