Detection rules › Sigma

Weak Encryption Enabled and Kerberoast

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

Detects scenario where weak encryption is enabled for a user profile which could be used for hash/password cracking.

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

ProviderEventTitle
Security-AuditingEvent ID 4738A user account was changed.

Rule body yaml

title: Weak Encryption Enabled and Kerberoast
id: f6de9536-0441-4b3f-a646-f4e00f300ffd
status: test
description: Detects scenario where weak encryption is enabled for a user profile which could be used for hash/password cracking.
references:
    - https://adsecurity.org/?p=2053
    - https://blog.harmj0y.net/redteaming/another-word-on-delegation/
author: '@neu5ron'
date: 2017-07-30
modified: 2021-11-27
tags:
    - attack.defense-impairment
    - attack.t1685
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'
detection:
    selection:
        EventID: 4738
    # According to Microsoft, the bit values are listed here: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4720
    # However, that seems to be a simple copy from https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/useraccountcontrol-manipulate-account-properties
    # and the actual flags that are used are quite different and, unfortunately, not documented.
    # https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/ contains a number of EVTX files with relevant events, which can be used to extract
    # the following values.
    olduac_des: # 0x8000
        OldUacValue|endswith:
            - 8???
            - 9???
            - A???
            - B???
            - C???
            - D???
            - E???
            - F???
    newuac_des:
        NewUacValue|endswith:
            - 8???
            - 9???
            - A???
            - B???
            - C???
            - D???
            - E???
            - F???
    olduac_preauth: # 0x10000
        OldUacValue|endswith:
            - 1????
            - 3????
            - 5????
            - 7????
            - 9????
            - B????
            - D????
            - F????
    newuac_preauth:
        NewUacValue|endswith:
            - 1????
            - 3????
            - 5????
            - 7????
            - 9????
            - B????
            - D????
            - F????
    olduac_encrypted: # 0x800
        OldUacValue|endswith:
            - 8??
            - 9??
            - A??
            - B??
            - C??
            - D??
            - E??
            - F??
    newuac_encrypted:
        NewUacValue|endswith:
            - 8??
            - 9??
            - A??
            - B??
            - C??
            - D??
            - E??
            - F??
    condition: selection and ((newuac_des and not olduac_des) or (newuac_preauth and not olduac_preauth) or (newuac_encrypted and not olduac_encrypted))
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and ((newuac_des and not olduac_des) or (newuac_preauth and not olduac_preauth) or (newuac_encrypted and not olduac_encrypted))

Stage 1: selection

selection:
    EventID: 4738

Stage 2: newuac_des

newuac_des:
    NewUacValue|endswith:
        - 8???
        - 9???
        - A???
        - B???
        - C???
        - D???
        - E???
        - F???

Stage 3: not olduac_des

olduac_des:
    OldUacValue|endswith:
        - 8???
        - 9???
        - A???
        - B???
        - C???
        - D???
        - E???
        - F???

Stage 4: newuac_preauth

newuac_preauth:
    NewUacValue|endswith:
        - 1????
        - 3????
        - 5????
        - 7????
        - 9????
        - B????
        - D????
        - F????

Stage 5: not olduac_preauth

olduac_preauth:
    OldUacValue|endswith:
        - 1????
        - 3????
        - 5????
        - 7????
        - 9????
        - B????
        - D????
        - F????

Stage 6: newuac_encrypted

newuac_encrypted:
    NewUacValue|endswith:
        - 8??
        - 9??
        - A??
        - B??
        - C??
        - D??
        - E??
        - F??

Stage 7: not olduac_encrypted

olduac_encrypted:
    OldUacValue|endswith:
        - 8??
        - 9??
        - A??
        - B??
        - C??
        - D??
        - E??
        - F??

Exclusions

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

FieldKindExcluded values
OldUacValueends_with8???
OldUacValueends_with9???
OldUacValueends_withA???
OldUacValueends_withB???
OldUacValueends_withC???
OldUacValueends_withD???
OldUacValueends_withE???
OldUacValueends_withF???
OldUacValueends_with1????
OldUacValueends_with3????
OldUacValueends_with5????
OldUacValueends_with7????
OldUacValueends_with9????
OldUacValueends_withB????
OldUacValueends_withD????
OldUacValueends_withF????
OldUacValueends_with8??
OldUacValueends_with9??
OldUacValueends_withA??
OldUacValueends_withB??
OldUacValueends_withC??
OldUacValueends_withD??
OldUacValueends_withE??
OldUacValueends_withF??

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
NewUacValueends_with
  • 1????
  • 3????
  • 5????
  • 7????
  • 8??
  • 8???
  • 9??
  • 9???
  • 9????
  • A??
  • A???
  • B??
  • B???
  • B????
  • C??
  • C???
  • D??
  • D???
  • D????
  • E??
  • E???
  • F??
  • F???
  • F????