Suspicious Powershell LocalAccount Manipulation (via ps_script)
This rule detects threat actors may manipulate accounts to maintain access to victim systems. Account manipulation may consist of any action that preserves adversary access to a compromised account, such as modifying credentials or permission groups
SigmamediumWindowsv1
sigma
suspicious-powershell-localaccount-manipulation-via-ps-script
title: Suspicious Powershell LocalAccount Manipulation (via ps_script)
id: c227b7ca-e819-5a10-b19d-c731c4e82850
status: stable
description: This rule detects threat actors may manipulate accounts to maintain access to victim systems. Account manipulation may consist of any action that preserves adversary access to a compromised account, such as modifying credentials or permission groups
references:
- https://attack.mitre.org/techniques/T1098/
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1098/T1098.md#atomic-test-1---admin-account-manipulate
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/?view=powershell-5.1
author: Huntrule Team
date: 2026-06-06
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1098
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains:
- 'Disable-LocalUser'
- 'Enable-LocalUser'
- 'Get-LocalUser'
- 'Set-LocalUser'
- 'New-LocalUser'
- 'Rename-LocalUser'
- 'Remove-LocalUser'
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.