T1531 Elastic Security · Elastic

Detect Account Access Removal in Elastic Security

Adversaries may interrupt availability of system and network resources by inhibiting access to accounts utilized by legitimate users. Accounts may be deleted, locked, or manipulated (changed credentials, revoked permissions) to remove access. In Windows, the Net utility, Set-LocalUser, and Set-ADAccountPassword PowerShell cmdlets may be used to modify user accounts. In Linux, the passwd utility may be used to change passwords. Ransomware families such as LockerGoga, MegaCortex, and Akira use this technique to impede incident response before completing their encryption objective. LAPSUS$ has removed global admin accounts to lock organizations out of all access.

MITRE ATT&CK

Tactic
Impact
Technique
T1531 Account Access Removal
Canonical reference
https://attack.mitre.org/techniques/T1531/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
  (
    event.code in ("4723", "4724", "4725", "4726", "4740") and
    winlog.channel : "Security" and
    not winlog.event_data.TargetUserName : "*$"
  ) or
  (
    event.category : "process" and
    event.type : "start" and
    process.command_line : (
      "*net user*/del*", "*net user*/delete*",
      "*Set-LocalUser*", "*Set-ADAccountPassword*",
      "*Disable-ADAccount*", "*Remove-ADUser*",
      "*Remove-LocalUser*", "*userdel *", "*usermod -L*"
    )
  )
high severity high confidence

Detects T1531 Account Access Removal by monitoring Windows Security Event Log account lifecycle events (EventIDs 4723, 4724, 4725, 4726, 4740 — password changes, resets, account disabling, deletion, and lockout) and process-based account manipulation commands via Elastic Endpoint or Sysmon telemetry. Uses ECS field winlog.event_data.TargetUserName with wildcard filter to exclude computer accounts (trailing $) and process.command_line wildcard matching for net user /delete, PowerShell Active Directory cmdlets, and Linux passwd/userdel utilities. Aligns detection fidelity with the KQL/SPL implementation covering both event-log and process-telemetry branches.

Data Sources

Windows Security Event Log (via Winlogbeat or Elastic Agent)Elastic Endpoint process telemetryWindows Sysmon (via Winlogbeat)Linux Auditbeat

Required Tables

winlog-*logs-endpoint.events.process-*logs-system.security-*

False Positives & Tuning

  • IT administrators performing authorized account lifecycle management during employee offboarding, including bulk disable and delete operations for departing employees via Active Directory Users and Computers or RSAT PowerShell modules
  • Automated identity governance and administration platforms such as SailPoint, Saviynt, or Microsoft Identity Governance executing access certification remediations that disable or delete accounts at scale
  • Password expiration enforcement scripts and privileged access management solutions (CyberArk, BeyondTrust, Thycotic) that programmatically reset service account credentials on rotation schedules via Set-ADAccountPassword
Download portable Sigma rule (.yml)

Other platforms for T1531


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Delete Local Windows User Account via Net Command

    Expected signal: Security Event ID 4726 (A user account was deleted) with SubjectUserName=current admin account and TargetUserName=df00techtest. Sysmon Event ID 1 for net.exe and net1.exe with CommandLine containing 'user df00techtest /delete'. Security Event ID 4720 (account created) for the creation step.

  2. Test 2Disable Local User Account via PowerShell Set-LocalUser

    Expected signal: Security Event ID 4725 (A user account was disabled) with TargetUserName=df00techtest2. Sysmon Event ID 1 for powershell.exe with CommandLine containing 'Set-LocalUser' and '-Enabled $false'. PowerShell ScriptBlock Log Event ID 4104 with the full Set-LocalUser command.

  3. Test 3Bulk Account Password Change Simulation via Net Command

    Expected signal: Security Event ID 4723 (password change attempt) and/or 4724 (password reset) for df00techtest3. Sysmon Event ID 1 for net.exe with CommandLine containing 'user df00techtest3 NewL0ckedP@ssw0rd!'. The password value itself will appear in process creation logs if command line auditing is enabled.

  4. Test 4Linux Account Lock via passwd -l

    Expected signal: Linux auditd records: syscall=execve for useradd and passwd commands with argv showing '-l df00techtest_linux'. Syslog entries in /var/log/auth.log or /var/log/secure: 'passwd: password changed for df00techtest_linux'. If auditd is configured with USER_MGMT rules, generates AUDIT_USER_MGMT events for account modification.

Unlock Pro Content

Get the full detection package for T1531 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections