PowerShell Local Account Creation With Self-Deleting Script

PremiumReviewedSigma · Medium · v1
Product
windows
Category
ps_script
Author
HuntRule
Published
2026-10-01
Updated
2026-10-01

ATT&CK techniques

Persistence
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Priv Esc

  6. Defense Evasion

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule detects a PowerShell script that creates a local user account and then removes itself from disk, a persistence-with-cleanup pattern observed during MSSQL server intrusions. Huntress recovered a user.ps1 that invoked New-LocalUser before deleting its own file. Combining account creation with self-deletion indicates covert backdoor account provisioning rather than routine administration.

Related detections9 linkedT1136.001 — drag to rearrange
Suspicious Creation of ctxsvc Local Account via net Command
Suspicious Local Administrator Account Addition via net localgroup
Suspicious Local Account Creation of DefaultService via Net User
Malicious Masquerading Local Account WDAGUtilltyAccount Created via net user
Suspicious Domain User Account Created via Net Command
Suspicious Local Account Creation Named DefaultService
ScreenConnect Administrator Provisioning XML Written to Temp Directory (CWE-288)
Suspicious Rogue VeeamBkp Account Creation by Estate Ransomware
Malicious Account Added to Domain Admins via net localgroup
PowerShell Local Account Creation With Self-Deleting Script
Pivot detection · T1136.001 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.