Windows PowerShell: DSInternals Get-ADReplAccount Enumeration

Alerts on PowerShell execution of Get-ADReplAccount with -All and -Server parameters for AD replication account enumeration.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-02-06
Updated
2026-07-31
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