Attacking LSASS

LSASS (Local Security Authority Subsystem Service) is a critical Windows service responsible for:

  • Caching credentials in memory

  • Creating access tokens

  • Enforcing security policies

  • Writing security logs

Accessing LSASS process memory can expose sensitive authentication data such as hashes and plaintext credentials.


Dumping LSASS Process Memory

To extract credentials, we first create a memory dump of the LSASS process. This allows offline analysis, minimizing time spent on the target system and avoiding detection.

βœ… Method 1: Task Manager

Steps:

  1. Open Task Manager

  2. Go to the Processes tab

  3. Locate Local Security Authority Process (lsass.exe)

  4. Right-click β†’ Create dump file

Dump Location:

πŸ“€ Transfer the dump to your attack machine using a file transfer method from the Attacking SAM section.


βœ… Method 2: Rundll32.exe & Comsvcs.dll

Useful in CLI-only environments and faster than GUI.

πŸ” Step 1: Find LSASS PID

CMD:

PowerShell:

Example Output:

πŸ’Ύ Step 2: Dump LSASS

PowerShell (Admin):

❗ Modern antivirus solutions may block this method. AV bypassing is outside this module’s scope.

Moving the File to the attacker

On attack Box

  1. Start the SMB Server

On Target Machine

  1. Move files from the Windows machine to your SMB share:


Using Pypykatz to Extract Credentials

Pypykatzarrow-up-right is a Python-based implementation of Mimikatz and can parse LSASS dumps offline on Linux.

Run Command:


Pypykatz Output Breakdown

πŸ” MSV (MSV1_0)

Used to authenticate against the SAM database.


πŸ” WDIGEST

An older authentication protocol. If enabled, may contain cleartext passwords.

πŸ”’ WDIGEST is disabled by default on modern Windows versions.

πŸ›‘οΈ Microsoft Security Update: View detailsarrow-up-right


🏷️ Kerberos

Used in Active Directory environments. LSASS may store:

  • Tickets

  • Credentials

  • Encryption keys (ekeys)


πŸ”‘ DPAPI (Data Protection API)

Used to encrypt/decrypt sensitive data across apps:

Application
Usage

Internet Explorer

Saved form data

Google Chrome

Saved passwords

Outlook

Email account passwords

Remote Desktop

Saved session credentials

Credential Manager

Wi-Fi, VPN, and network credentials

πŸ” This masterkey can decrypt data protected by DPAPI.


Cracking the NT Hash with Hashcat

We can now crack the NT hash extracted via Pypykatz.

Command:

Result:

βœ… Password successfully cracked – attack completed.


Last updated