Detection rules › Sigma
AD Groups Or Users Enumeration Using PowerShell - ScriptBlock
Adversaries may attempt to find domain-level groups and permission settings. The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as domain administrators.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery | T1069.001 Permission Groups Discovery: Local Groups |
Event coverage
| Provider | Event | Title |
|---|---|---|
| PowerShell | Event ID 4104 | Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule body yaml
title: AD Groups Or Users Enumeration Using PowerShell - ScriptBlock
id: 88f0884b-331d-403d-a3a1-b668cf035603
status: test
description: |
Adversaries may attempt to find domain-level groups and permission settings.
The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group.
Adversaries may use this information to determine which users have elevated permissions, such as domain administrators.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1069.002/T1069.002.md
author: frack113
date: 2021-12-15
modified: 2022-12-25
tags:
- attack.discovery
- attack.t1069.001
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
test_2:
ScriptBlockText|contains: get-ADPrincipalGroupMembership
test_7:
ScriptBlockText|contains|all:
- get-aduser
- '-f '
- '-pr '
- DoesNotRequirePreAuth
condition: 1 of test_*
falsepositives:
- Unknown
level: low
Stages and Predicates
Stage 0: condition
1 of test_*Stage 1: test_2
test_2:
ScriptBlockText|contains: get-ADPrincipalGroupMembership
Stage 2: test_7
test_7:
ScriptBlockText|contains|all:
- get-aduser
- '-f '
- '-pr '
- DoesNotRequirePreAuth
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.
| Field | Kind | Values |
|---|---|---|
ScriptBlockText | match |
|