Detection rules › Sigma

Potential Active Directory Enumeration Using AD Module - ProcCreation

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

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.

Known false positives

  • Legitimate use of the library for administrative activity

MITRE ATT&CK coverage

TacticTechniques
ReconnaissanceNo specific technique
DiscoveryNo specific technique
ImpactNo specific technique

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Active Directory Enumeration Using AD Module - ProcCreation
id: 70bc5215-526f-4477-963c-a47a5c9ebd12
related:
    - id: 9e620995-f2d8-4630-8430-4afd89f77604
      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
date: 2023-01-22
tags:
    - attack.reconnaissance
    - attack.discovery
    - attack.impact
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_cmdlet:
        CommandLine|contains:
            - 'Import-Module '
            - 'ipmo '
    selection_dll:
        CommandLine|contains: 'Microsoft.ActiveDirectory.Management.dll'
    condition: all of selection_*
falsepositives:
    - Legitimate use of the library for administrative activity
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'

Stage 2: selection_cmdlet

selection_cmdlet:
    CommandLine|contains:
        - 'Import-Module '
        - 'ipmo '

Stage 3: selection_dll

selection_dll:
    CommandLine|contains: 'Microsoft.ActiveDirectory.Management.dll'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • Import-Module corpus 3 (sigma 3)
  • Microsoft.ActiveDirectory.Management.dll
  • ipmo corpus 3 (sigma 3)
field:"CommandLine" kind:match
Imageends_with
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
field:"Image" kind:ends_with
OriginalFileNameeq
  • PowerShell.EXE corpus 138 (sigma 84, splunk 30, elastic 24)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
field:"OriginalFileName" kind:eq