Skip to content
WETNav

Credential accessCritical

LSASS Memory Dumping

Also known as Credential dumping from LSASS

How LSASS dumping shows up: a 4656/4663 handle to lsass.exe, or Sysmon 10 process access, with read rights from an unexpected process.

Signals in the logs

  1. 01Sysmon10Process AccessedAny host

    A process opening LSASS with the access mask combinations used to read its memory, often with a call stack through debugging DLLs.

    TargetImage
    ends with \lsass.exe
    GrantedAccess
    0x1010, 0x1410, 0x1438, 0x143a or 0x1fffff (read and query combinations)
    CallTrace
    references dbghelp.dll or dbgcore.dll when a dump API is used
  2. 02Security4656A handle to an object was requestedAny host

    A handle to the LSASS process requested with read access by a non-system account.

    ObjectName
    ends with \lsass.exe
    ObjectType
    Process
    AccessMask
    0x1010, 0x1410, 0x1438, 0x143a or 0x1fffff
    SubjectUserName
    an account that does not end with $ and is not SYSTEM
  3. 03Security4663An attempt was made to access an objectAny host

    An access actually performed against the LSASS process object, confirming the handle in 4656 was used.

    ObjectName
    ends with \lsass.exe
    ObjectType
    Process
    AccessList
    includes the read/query rights that permit memory reads

What happens

The Local Security Authority process holds the secrets of active logon sessions in memory, including password hashes and Kerberos tickets. An adversary who can open a handle to that process with read access can copy its memory and extract those secrets offline. The act requires a process to request specific access rights against LSASS, which is the detectable moment: a handle or process-access request to the LSASS image carrying read and query rights, made by a process and account that have no legitimate reason to inspect it.

Logging you need

  • Sysmon with a configuration that logs ProcessAccess (event 10) for a TargetImage of lsass.exe. This is the practical source; it is not present without Sysmon.
  • For the Security-log path, Object Access > Kernel Object auditing with a SACL on the LSASS process, which is high volume and off by default; most environments rely on Sysmon or EDR instead.

Hunt queries

Starting points. Tune thresholds and exclusions to your environment before alerting on them.

$masks = '0x1010','0x1410','0x1438','0x143a','0x1fffff'
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; Id=10} | ForEach-Object {
    $x = [xml]$_.ToXml(); $d = @{}; $x.Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]@{ Time=$_.TimeCreated; Source=$d['SourceImage']; Target=$d['TargetImage']; Access=$d['GrantedAccess']; Call=$d['CallTrace'] }
} | Where-Object {
    $_.Target -like '*\lsass.exe' -and ($masks -contains $_.Access) -and
    $_.Source -notlike '*\Program Files*' -and $_.Source -notlike '*\System32\*'
}

Benign look-alikes

  • Antivirus and EDR agents, and Windows components such as wininit.exe, csrss.exe, MsMpEng.exe and Defender, legitimately open LSASS; maintain an allow list of signed products.
  • Diagnostic tools (Task Manager, Process Explorer, procdump, WER / WerFault) can open LSASS for crash and performance handling.
  • Some access masks such as 0x1000 (query basic info) and 0x100000 (synchronize) are too noisy to alert on alone and are usually excluded.

Notes

  • A dump written to disk often follows; pair process-access events with Sysmon 11 file creates matching lsass dump names (for example *.dmp) for higher confidence.
  • Direct-syscall and handle-duplication techniques can blur the call stack, so treat GrantedAccess and the source identity as the primary signal and CallTrace as supporting.

References