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.
author: '@neu5ron'
references:
  - https://msdn.microsoft.com/en-us/library/cc220234.aspx
  - https://adsecurity.org/?p=3466
  - https://www.harmj0y.net/blog/redteaming/another-word-on-delegation/
date: 2017/04/13
modified: 2021/11/27
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_null:
    - AllowedToDelegateTo: '-'
    - AllowedToDelegateTo: 
  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 filter_null) or 1 of selection_5136_*
falsepositives:
  - Unknown
level: high
tags:
  - attack.t1098
  - attack.persistence
