Skip to content
WETNav

Investigation · Credentials

Were credentials stolen from LSASS or the domain controller?

Check for LSASS memory access and dumping on a host, and for DCSync or NTDS.dit theft on the domain controller, with the exact events and access masks to read.

When you would ask thisYou need to know whether the attacker harvested credentials, which determines whether a domain-wide password and ticket reset is required.

Steps

  1. 1

    Look for direct LSASS memory access

    Sysmon event 10 (ProcessAccess) records one process opening a handle to another. Filter TargetImage for C:\Windows\system32\lsass.exe and read SourceImage, GrantedAccess and CallTrace. Access masks such as 0x1010, 0x1410 and 0x1438 include the read and query rights used to dump memory, and a CallTrace mentioning dbghelp.dll or dbgcore.dll indicates a MiniDump call. Baseline the legitimate accessors (antivirus, EDR, wininit.exe) first so you are judging the anomalous SourceImage, not normal platform behavior.

    LSASS handle opens (live host)
    Get-WinEvent -LogName 'Microsoft-Windows-Sysmon/Operational' `
      -FilterXPath "*[System[EventID=10]] and *[EventData[Data[@Name='TargetImage']='C:\Windows\system32\lsass.exe']]" |
      ForEach-Object { $x = [xml]$_.ToXml(); [pscustomobject]@{
        Time   = $_.TimeCreated
        Source = ($x.Event.EventData.Data | Where-Object Name -eq 'SourceImage').'#text'
        Access = ($x.Event.EventData.Data | Where-Object Name -eq 'GrantedAccess').'#text' } }
  2. 2

    Check for injection into LSASS

    Some tooling injects rather than dumps. Sysmon event 8 (CreateRemoteThread) records a thread created in another process; one targeting lsass.exe, with a StartModule or StartAddress outside a normal module, points to code injection to harvest credentials in place. This is quieter than a memory read and will not show the large GrantedAccess masks, so treat event 8 against LSASS as its own indicator alongside the event 10 search rather than a substitute for it.

  3. 3

    Find the dumping tooling by process

    Dumping often runs through living-off-the-land binaries. Review process creation (4688 and Sysmon 1) for command lines such as rundll32 with comsvcs.dll MiniDump, procdump with -ma against lsass, Task Manager creating a dump, or an -EncodedCommand PowerShell. Read the full CommandLine and the parent process. A dump of lsass by any process other than a known crash handler, especially spawned from a shell or a remote-exec tool, is strong evidence of credential theft even without the Sysmon handle event.

  4. 4

    Detect DCSync on the domain controller

    DCSync pulls secrets by asking a DC to replicate them. On the DC, event 4662 records an operation on a directory object; a DCSync attempt shows Properties containing the replication control-access rights, specifically DS-Replication-Get-Changes {1131f6aa-9c07-11d1-f79f-00c04fc2dcd2} and Get-Changes-All {1131f6ad-9c07-11d1-f79f-00c04fc2dcd2}. The telling condition is a SubjectUserName that is not a domain controller computer account requesting those rights, because only DCs legitimately replicate. This requires directory-service object-access auditing to be enabled.

  5. 5

    Detect NTDS.dit theft

    The alternative to DCSync is copying the AD database directly. Watch process creation for ntdsutil, esentutl, vssadmin or diskshadow creating a shadow copy or an Install-From-Media set. When the copied ntds.dit is attached and detached, the ESENT engine logs it in the Application log as events 325 (database created), 326 (database attached) and 327 (database detached), with 216 marking a database location change. ESENT activity referencing a path other than the live NTDS directory on a DC is a copy being handled.

  6. 6

    Follow the stolen credentials forward

    If theft is confirmed, look for the credentials being used. Pass-the-hash appears as 4624 LogonType 9 (NewCredentials) and 4648 explicit-credential logons; a sudden spread of 4769 service-ticket requests, especially with RC4 encryption type 0x17, can indicate forged or replayed tickets. This both confirms the impact and helps scope which accounts and hosts the harvested secrets reached, which drives the reset plan.

Where it goes wrong

  • Legitimate processes open LSASS constantly (antivirus, EDR, wininit.exe, the platform itself), so a Sysmon 10 event against LSASS is only meaningful after you baseline the normal SourceImage and GrantedAccess values.
  • Sysmon only logs LSASS access (event 10) and injection (event 8) if the deployed configuration includes rules for them; a thin config sees none of this.
  • GrantedAccess masks are not a fixed allowlist; tools vary them to evade signatures, so judge the SourceImage and CallTrace together, not the mask alone.
  • With RunAsPPL or LSA protection, a dump attempt may be blocked and logged by Code Integrity rather than producing a Sysmon 10, so a missing handle event can still mean an attempt occurred.
  • 4662 DCSync detection requires auditing of directory-service object access and the right SACL; without it the replication request is invisible, so absence is not proof.
  • The Security log records PIDs in hexadecimal while Sysmon records them in decimal, so convert before joining a 4688 to a Sysmon 1 or 10 for the same process.

Beyond event logs

LSASS dump files

lsass.dmp or *.dmp in %TEMP%, C:\Windows\Temp, or an attacker staging folder

A memory dump of LSASS on disk is direct evidence; its creation time dates the theft and its presence confirms the sysmon/process findings even if the dumping process itself was not logged.

ntds.dit copies and IFM output

C:\, C:\Windows\Temp, or an 'IFM' / Install-From-Media folder on a DC

A second copy of ntds.dit, often alongside the SYSTEM hive, is the payload of NTDS theft. Finding it (and the shadow copy it came from) confirms domain credentials were exposed.

Credential-dumping tool execution evidence

Prefetch and Amcache for procdump.exe, rundll32.exe, ntdsutil.exe and unknown binaries

Prefetch and Amcache date when the dumping tools ran and give their hashes, independent of whether Sysmon or process auditing captured the run.

References