Detectionmediumtest

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.

Open in Detection LabConvert ruleBuild Package
François Hubaut, Nasreddine BencherchaliCreated 2023-01-229e620995-f2d8-4630-8430-4afd89f77604windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enable

Detection Logic
Detection Logic2 selectors
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_*
False Positives

Legitimate use of the library for administrative activity