Windows Password Techniques

Overview

Windows stores password hashes in various locations that can be extracted and cracked with administrative access. This guide covers techniques for extracting and cracking Windows password hashes.

Registry Hives

Key Registry Locations

Registry Hive
Location
Description

HKLM\SAM

C:\Windows\System32\config\SAM

Local user password hashes

HKLM\SYSTEM

C:\Windows\System32\config\SYSTEM

System boot key (needed to decrypt SAM)

HKLM\SECURITY

C:\Windows\System32\config\SECURITY

LSA secrets, cached domain creds (DCC2), DPAPI keys

Backing Up Registry Hives

# Run as Administrator
reg.exe save hklm\sam C:\sam.save
reg.exe save hklm\system C:\system.save
reg.exe save hklm\security C:\security.save

File Transfer Methods

Using Impacket SMB Server

Other Transfer Methods

Hash Extraction

Using Impacket secretsdump

Alternative Tools

Remote Hash Dumping

Using NetExec (formerly CrackMapExec)

Using Impacket remotely

Hash Types and Formats

NT Hash (NTLM)

  • Format: 32-character hexadecimal

  • Example: 64f12cddaa88057e06a81b54e73b949b

  • Hashcat Mode: 1000

  • Most common in modern Windows

LM Hash (Legacy)

  • Format: 32-character hexadecimal

  • Example: aad3b435b51404eeaad3b435b51404ee

  • Hashcat Mode: 3000

  • Weak, usually disabled in modern Windows

DCC2 (Domain Cached Credentials)

  • Format: $DCC2$iterations#username#hash

  • Example: $DCC2$10240#administrator#23d97555681813db79b2ade4b4a6ff25

  • Hashcat Mode: 2100

  • Much slower to crack (uses PBKDF2)

Cracking Windows Hashes

NT Hash Cracking

DCC2 Hash Cracking

Batch Hash Cracking

DPAPI (Data Protection API)

What DPAPI Protects

  • Browser passwords (Chrome, Edge, Firefox)

  • Email passwords (Outlook)

  • Saved RDP credentials

  • Wireless network passwords

  • Credential Manager entries

DPAPI Keys from secretsdump

Decrypting DPAPI Blobs

LSA Secrets

What LSA Secrets Contain

  • Service account passwords

  • Scheduled task credentials

  • Auto-logon passwords

  • DPAPI machine keys

  • Cached domain credentials

Extracting LSA Secrets

LSASS Attacks

Overview

LSASS (Local Security Authority Subsystem Service) is a core Windows process that:

  • Enforces security policies

  • Handles user authentication

  • Stores sensitive credential material in memory

  • Caches credentials from active logon sessions

LSASS Memory Dumping Methods

1. Task Manager Method (GUI Required)

2. Rundll32.exe & Comsvcs.dll Method

3. Using Procdump

4. Using PowerShell

Extracting Credentials from LSASS Dumps

Using Pypykatz (Linux)

Using Mimikatz (Windows)

Credential Types in LSASS

MSV (Microsoft Authentication Package)

WDIGEST (Legacy Authentication)

Kerberos (Active Directory)

DPAPI (Data Protection API)

Live Memory Extraction

Using Mimikatz (Direct)

Using PowerShell Empire

Remote LSASS Attacks

Using NetExec

Using Impacket

Cracking Extracted Credentials

NT Hashes from LSASS

Defense Evasion for LSASS

Avoiding Detection

Cleanup

Common Issues and Solutions

Access Denied

Antivirus Detection

Large Dump Files

Practical LSASS Attack Workflow

Complete Example: Task Manager Method

Command-line Method Workflow

1. Enumerate Running Processes

2. Create Memory Dump

3. Transfer Dump File

4. Extract Credentials

5. Crack or Use Hashes

Advanced Techniques

Pass-the-Hash

Memory Dumping (Legacy)

Practical Workflow

1. Gain Administrative Access

2. Extract Registry Hives

3. Transfer Files

4. Extract Hashes

5. Crack Hashes

Defense Evasion

Avoiding Detection

Cleanup

Common Issues and Solutions

Access Denied

Large Hash Files

Slow Cracking

Hash Identification

Windows Credential Manager Attacks

Overview

Windows Credential Manager stores encrypted credentials in special folders:

  • *%UserProfile%\AppData\Local\Microsoft\Vault*

  • *%UserProfile%\AppData\Local\Microsoft\Credentials*

  • *%UserProfile%\AppData\Roaming\Microsoft\Vault*

  • *%ProgramData%\Microsoft\Vault*

  • *%SystemRoot%\System32\config\systemprofile\AppData\Roaming\Microsoft\Vault*

Credential Types

Type
Description

Web Credentials

Website passwords, online accounts (IE, legacy Edge)

Windows Credentials

Domain users, OneDrive, network resources, services

Enumerating Stored Credentials

Using Stored Credentials

Extracting Credentials with Mimikatz

Alternative Tools

LaZagne - Multi-Platform Password Recovery

Overview

LaZagne is an open-source application used to retrieve passwords stored on a local computer. It can extract passwords from various software including browsers, email clients, databases, WiFi, and more.

Key Features

  • Multi-platform support (Windows, Linux, macOS)

  • 60+ software modules for password extraction

  • Standalone executable - no installation required

  • Comprehensive reporting with found credentials

  • Silent operation possible

Installation

Basic Usage

Supported Software Categories

Browsers

  • Chrome, Firefox, Internet Explorer, Edge

  • Opera, Safari, SeaMonkey

  • UC Browser, Chromium-based browsers

Email Clients

  • Outlook, Thunderbird

  • Windows Mail, Mailbird

Chat Applications

  • Pidgin, Psi, Skype

  • Jitsi, IceChat

Databases

  • SQLite, MySQL, PostgreSQL

  • MongoDB, CouchDB

FTP Clients

  • FileZilla, WinSCP, FlashFXP

  • SmartFTP, FTPNavigator

System Credentials

  • Windows Credential Manager

  • LSA Secrets, Autologon

  • IIS Application Pool

HTB Academy Scenario Walkthrough

Scenario Setup

Step 1: Initial Enumeration

Step 2: Privilege Escalation

Step 3: LaZagne Deployment

Step 4: Credential Extraction

LaZagne Modules

Common Modules

Module-Specific Examples

Output Formats

Console Output

JSON Output

Advanced Usage

Silent Mode with Output

Specific Categories

Remote Deployment

Detection and Evasion

Common Detections

  • Antivirus signatures - LaZagne often flagged as malicious

  • Behavioral analysis - Multiple password extraction attempts

  • Process monitoring - Unusual file access patterns

Evasion Techniques

Defense Against LaZagne

Preventive Measures

  • Don't save passwords in browsers/applications

  • Use password managers with strong encryption

  • Enable Credential Guard on Windows 10/11

  • Regular security awareness training

Detection Methods

  • Monitor for LaZagne signatures in AV/EDR

  • Process monitoring for credential access patterns

  • File integrity monitoring for credential stores

  • Network monitoring for C2 traffic

LaZagne vs Other Tools

Tool
Platform
Coverage
Stealth
Ease of Use

LaZagne

Multi

High

Low

High

Mimikatz

Windows

High

Low

Medium

SharpChrome

Windows

Chrome only

Medium

Medium

HackBrowserData

Multi

Browsers only

Medium

High

Manual Credential Hunting

Manual Credential Export

Common Credential Targets

  • OneDrive - Microsoft account credentials

  • Domain accounts - Cached domain user passwords

  • Network resources - UNC paths, shared folders

  • VPN connections - Saved VPN credentials

  • RDP connections - Saved RDP passwords

  • Web applications - Browser-saved passwords

Credential Manager Attack Workflow

Defense Considerations

  • Credential Guard - Protects DPAPI master keys in secure enclaves

  • DPAPI protection - Credentials encrypted with user-specific keys

  • AES encryption - Policy.vpol files use AES-128/256

  • Virtualization-based Security - Modern Windows protection

Tools Summary

Extraction Tools

  • reg.exe - Windows registry export

  • secretsdump.py - Impacket hash extraction

  • NetExec - Remote hash dumping

  • Mimikatz - Memory and registry dumping

  • cmdkey - Credential Manager enumeration

  • LaZagne - Multi-platform password recovery

  • Kerbrute - Kerberos username enumeration and password attacks

Cracking Tools

  • Hashcat - GPU-accelerated cracking

  • John the Ripper - CPU-based cracking

  • Rainbow tables - Pre-computed hash lookups

Transfer Tools

  • smbserver.py - Impacket SMB server

  • PowerShell - Native Windows transfer

  • certutil - Windows certificate utility (can download files)

Kerbrute - Kerberos Pre-Authentication Attack Tool

Overview

Kerbrute is a tool to quickly bruteforce and enumerate valid Active Directory accounts through Kerberos Pre-Authentication. It's much faster than traditional password attacks and potentially stealthier since pre-authentication failures don't trigger the standard "An account failed to log on" event 4625.

Key Features

  • Fast enumeration - Single UDP frame to KDC (Domain Controller)

  • Username enumeration - No login failures, no account lockouts

  • Password spraying - Test single password against user list

  • Brute force attacks - Traditional password attacks

  • Multithreaded - 10 threads by default (configurable)

Installation

Pre-compiled Binaries

Compile from Source (ARM64/M1 Mac)

Docker Alternative (x86_64 emulation)

Basic Usage

Username Enumeration (Safest)

Password Spraying (Careful - Can Lock Accounts!)

Brute Force Single User (High Risk!)

Brute Force Credential Combos

Advanced Usage

Thread Control

Hash Capture (AS-REP Roasting)

Force Downgraded Encryption

Creating Username Lists

Common Username Conventions

Automated Username Generation

Attack Workflows

HTB Academy Scenario

PJPT Exam Strategy

Event Log Analysis

Windows Event IDs Generated

Defense and Detection

Detection Methods

Mitigation Strategies

  • Account lockout policies - But affects legitimate users

  • Rate limiting - Throttle authentication requests

  • Network monitoring - Detect unusual Kerberos traffic

  • Honey accounts - Fake accounts to detect enumeration

Alternative Tools

If Kerbrute Doesn't Work

Troubleshooting

Common Issues and Solutions

Integration with Other Tools

Complete Attack Chain

Last updated