Windows PowerShell Local User Account Manipulation via Script Block Logging

Alerts when PowerShell script blocks invoke local user management cmdlets that can be used to maintain persistence.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-12-28
Updated
2026-07-31

ATT&CK techniques

Persistence → Priv Esc
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule flags PowerShell script block activity that contains commands used to enumerate, create, modify, enable/disable, rename, or remove local user accounts. Such actions can help an attacker maintain persistence or preserve access by changing local credentials and user states on the host. It relies on Script Block Logging telemetry that captures the executed PowerShell text and matches specific LocalAccounts cmdlets.

Related detections9 linkedT1098 — drag to rearrange
Malicious Cluster-Admin Role Binding Creation (via audit)
Malicious User Password Change Using Current Hash Password - ChangeNTLM - Mimikatz (via security)
Suspicious Account Password Set to Never Expire. (via security)
Malicious Modification of a Computer Account SPN (via security)
Suspicious Massive Group Membership Changes (via security)
Malicious High Risk Active Directory Group Membership Change (via security)
Malicious Account Marked as Sensitive and Cannot Be Delegated Had Its Protection Removed (via security)
Malicious Host Constrained Delegation Settings Changed for Potential Abuse (Rubeus) - Kerberos Only (via security)
Malicious Host Set with Unconstrained Delegation (via security)
Windows PowerShell Local User Account Manipulation via Script Block Logging
Pivot detection · T1098 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No 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.