Malicious DirectorySearcher Powershell Exploitation (via ps_script)
This rule detects enumerates Active Directory to determine computers that are joined to the domain
SigmamediumWindowsv1
sigma
malicious-directorysearcher-powershell-exploitation-via-ps-script
title: Malicious DirectorySearcher Powershell Exploitation (via ps_script)
id: 9de9e6d0-0245-5615-b8c7-4f4367b3fc7b
status: stable
description: This rule detects enumerates Active Directory to determine computers that are joined to the domain
references:
- https://attack.mitre.org/techniques/T1018/
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1018/T1018.md#atomic-test-15---enumerate-domain-computers-within-active-directory-using-directorysearcher
author: Huntrule Team
date: 2026-01-29
tags:
- attack.discovery
- attack.t1018
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- 'New-Object '
- 'System.DirectoryServices.DirectorySearcher'
- '.PropertiesToLoad.Add'
- '.findall()'
- 'Properties.name'
condition: selection
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.