Windows PowerShell: DSInternals Get-ADReplAccount Enumeration
Alerts on PowerShell execution of Get-ADReplAccount with -All and -Server parameters for AD replication account enumeration.
- Product
- windows
- Category
- ps_script
- Author
- frack113 (SigmaHQ), DRL 1.1
- Published
- 2022-02-06
- Updated
- 2026-07-31
ATT&CK techniques
Cred AccessRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags PowerShell script block content that includes a Get-ADReplAccount call with -All and -Server parameters. Such enumeration can help an attacker gather Active Directory replication account information for credential access and further targeting. It relies on Script Block Logging telemetry that captures the executed PowerShell command text.
Reporting behind it
- powershellgallery.comhttps://www.powershellgallery.com/packages/DSInternals
- github.comhttps://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1003.006/T1003.006.md#atomic-test-2---run-dsinternals-get-adreplaccount
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_get_adreplaccount.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Windows PowerShell: DSInternals Get-ADReplAccount Enumeration"
id: 1b621876-90fb-4027-8d8d-af942adce4fb
status: test
description: This rule flags PowerShell script block content that includes a Get-ADReplAccount call with -All and -Server parameters. Such enumeration can help an attacker gather Active Directory replication account information for credential access and further targeting. It relies on Script Block Logging telemetry that captures the executed PowerShell command text.
references:
- https://www.powershellgallery.com/packages/DSInternals
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1003.006/T1003.006.md#atomic-test-2---run-dsinternals-get-adreplaccount
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_get_adreplaccount.yml
author: frack113, Huntrule Team
date: 2022-02-06
tags:
- attack.credential-access
- attack.t1003.006
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection:
ScriptBlockText|contains|all:
- Get-ADReplAccount
- "-All "
- "-Server "
condition: selection
falsepositives:
- Legitimate PowerShell scripts
level: medium
license: DRL-1.1
related:
- id: 060c3ef1-fd0a-4091-bf46-e7d625f60b73
type: derived