Detection rules › Sigma
Potential Active Directory Enumeration Using AD Module - PsScript
Detects usage of the "Import-Module" cmdlet to load the "Microsoft.ActiveDirectory.Management.dl" DLL. Which is often used by attackers to perform AD enumeration.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Reconnaissance | No specific technique |
| Discovery | No specific technique |
| Impact | No specific technique |
Event coverage
| Provider | Event | Title |
|---|---|---|
| PowerShell | Event ID 4104 | Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule body yaml
title: Potential Active Directory Enumeration Using AD Module - PsScript
id: 9e620995-f2d8-4630-8430-4afd89f77604
related:
- id: 70bc5215-526f-4477-963c-a47a5c9ebd12
type: similar
- id: 74176142-4684-4d8a-8b0a-713257e7df8e
type: similar
status: test
description: Detects usage of the "Import-Module" cmdlet to load the "Microsoft.ActiveDirectory.Management.dl" DLL. Which is often used by attackers to perform AD enumeration.
references:
- https://github.com/samratashok/ADModule
- https://twitter.com/cyb3rops/status/1617108657166061568?s=20
- https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/active-directory-enumeration-with-ad-module-without-rsat-or-admin-privileges
author: frack113, Nasreddine Bencherchali
date: 2023-01-22
tags:
- attack.reconnaissance
- attack.discovery
- attack.impact
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enable'
detection:
selection_generic:
ScriptBlockText|contains|all:
- 'Import-Module '
- 'Microsoft.ActiveDirectory.Management.dll'
selection_specific:
ScriptBlockText|contains: 'ipmo Microsoft.ActiveDirectory.Management.dll'
condition: 1 of selection_*
falsepositives:
- Legitimate use of the library for administrative activity
level: medium
Stages and Predicates
Stage 0: condition
1 of selection_*Stage 1: selection_generic
selection_generic:
ScriptBlockText|contains|all:
- 'Import-Module '
- 'Microsoft.ActiveDirectory.Management.dll'
Stage 2: selection_specific
selection_specific:
ScriptBlockText|contains: 'ipmo Microsoft.ActiveDirectory.Management.dll'
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 |
|