Convert Figma logo to code with AI

AlessandroZ logoLaZagne

Credentials recovery project

9,431
2,020
9,431
8

Top Related Projects

19,244

A little tool to play with Windows security

A tool to dump the login password from the current linux user

Extract and decrypt browser data, supporting multiple data types, runnable on various operating systems (macOS, Windows, Linux).

SessionGopher is a PowerShell tool that uses WMI to extract saved session information for remote access tools such as WinSCP, PuTTY, SuperPuTTY, FileZilla, and Microsoft Remote Desktop. It can be run remotely or locally.

a tool for pentesters to help find delicious candy, by @l0ss and @Sh3r4 ( Twitter: @/mikeloss and @/sh3r4_hax )

Quick Overview

LaZagne is an open-source password recovery tool designed to retrieve passwords stored on local computers. It can extract passwords from various sources, including web browsers, email clients, databases, and system configurations. LaZagne is primarily used for security auditing and penetration testing purposes.

Pros

  • Supports a wide range of applications and software for password extraction
  • Cross-platform compatibility (Windows, Linux, macOS)
  • Regularly updated with new modules and features
  • Can be run as a standalone executable or integrated into other tools

Cons

  • May be flagged by antivirus software as a potential threat
  • Requires administrative privileges for full functionality
  • Can be misused for malicious purposes if it falls into the wrong hands
  • Some modules may become outdated as applications change their password storage methods

Code Examples

# Example 1: Running LaZagne for all modules
from lazagne.config.run import run_lazagne

password_found = run_lazagne()
print(password_found)
# Example 2: Running LaZagne for specific modules
from lazagne.config.run import run_lazagne

password_found = run_lazagne(['chrome', 'firefox', 'outlook'])
print(password_found)
# Example 3: Saving results to a file
from lazagne.config.write_output import write_in_file
from lazagne.config.run import run_lazagne

results = run_lazagne()
write_in_file(results)

Getting Started

To use LaZagne as a Python library:

  1. Install LaZagne:

    pip install lazagne
    
  2. Import and use LaZagne in your Python script:

    from lazagne.config.run import run_lazagne
    
    results = run_lazagne()
    for result in results:
        print(f"Module: {result['module']}")
        print(f"Passwords found: {result['passwords']}")
    

Note: For standalone usage, download the latest release from the GitHub repository and run the executable with appropriate permissions.

Competitor Comparisons

19,244

A little tool to play with Windows security

Pros of Mimikatz

  • More powerful and versatile for Windows credential extraction
  • Supports a wider range of attack techniques (e.g., Pass-the-Hash, Golden Ticket)
  • Actively maintained with frequent updates

Cons of Mimikatz

  • Windows-specific, limiting cross-platform usage
  • More likely to be flagged by antivirus software due to its popularity
  • Requires administrative privileges for most operations

Code Comparison

Mimikatz (C):

BOOL WINAPI sekurlsa::AcquireKeys(PKIWI_BCRYPT_KEY_DATA KeyData)
{
    BOOL status = FALSE;
    NTSTATUS ntStatus;
    ULONG cbResult;

LaZagne (Python):

def run(self):
    pwd_found = []
    for root, dirs, files in os.walk(constant.profile['APPDATA']):
        for file in files:
            if file.startswith('Login Data'):

Mimikatz is written in C and focuses on low-level Windows API interactions, while LaZagne is written in Python and uses a more high-level, cross-platform approach to password recovery. Mimikatz offers more advanced techniques for Windows systems, whereas LaZagne provides broader support for various applications and operating systems.

A tool to dump the login password from the current linux user

Pros of mimipenguin

  • Focused specifically on Linux memory extraction
  • Lightweight and easy to use
  • Actively maintained with recent updates

Cons of mimipenguin

  • Limited to Linux systems only
  • Fewer supported password extraction methods
  • Less comprehensive documentation

Code comparison

mimipenguin:

function dump_pid () {
    pid=$1
    output_file="/tmp/dump_${pid}.dump"
    if [[ $kernel_major -gt 3 ]]; then
        gcore -o $output_file $pid > /dev/null 2>&1
    else
        gdb --batch --pid $pid -ex "generate-core-file $output_file" > /dev/null 2>&1
    fi
}

LaZagne:

def dump_to_file(self, string):
    with open(self.output, 'w') as f:
        f.write(string)
    
    if os.path.exists(self.output):
        return True
    return False

Summary

mimipenguin is a specialized tool for extracting passwords from Linux memory, while LaZagne is a more comprehensive password recovery tool supporting multiple operating systems. mimipenguin offers simplicity and focus for Linux environments, but LaZagne provides broader functionality and cross-platform support. The code snippets demonstrate the different approaches: mimipenguin uses bash for memory dumping, while LaZagne employs Python for file operations.

Extract and decrypt browser data, supporting multiple data types, runnable on various operating systems (macOS, Windows, Linux).

Pros of HackBrowserData

  • Cross-platform support (Windows, macOS, Linux)
  • Actively maintained with frequent updates
  • Supports a wider range of browsers and applications

Cons of HackBrowserData

  • Less comprehensive in terms of password recovery from non-browser applications
  • Requires Go programming language environment for compilation
  • May have a steeper learning curve for non-technical users

Code Comparison

LaZagne:

def run_lazagne(category_selected="all", subcategories={}, password=None):
    for r in runLaZagne(category_selected, subcategories, password):
        yield r

HackBrowserData:

func New(browser string) (results.Browsers, error) {
	var b results.Browsers
	switch strings.ToLower(browser) {
	case "chrome":
		b = browsers.NewChrome()
	case "edge":
		b = browsers.NewEdge()
	// ... (other browser cases)
	}
	return b, nil
}

Both projects aim to recover stored credentials, but HackBrowserData focuses more on browser data extraction, while LaZagne offers a broader scope including system and application passwords. HackBrowserData's code structure reflects its modular approach to supporting multiple browsers, whereas LaZagne's code shows a more generalized password recovery function.

SessionGopher is a PowerShell tool that uses WMI to extract saved session information for remote access tools such as WinSCP, PuTTY, SuperPuTTY, FileZilla, and Microsoft Remote Desktop. It can be run remotely or locally.

Pros of SessionGopher

  • Focused specifically on extracting session information from Windows systems
  • Lightweight and easy to use with PowerShell
  • Can retrieve PuTTY, WinSCP, and RDP session information

Cons of SessionGopher

  • Limited to Windows systems only
  • Fewer supported applications compared to LaZagne
  • Less actively maintained (last update in 2018)

Code Comparison

SessionGopher (PowerShell):

function Get-PuTTYSessions {
    $regPath = "HKCU:\Software\SimonTatham\PuTTY\Sessions"
    Get-ChildItem $regPath | ForEach-Object {
        $_.PSChildName
    }
}

LaZagne (Python):

class Putty(ModuleInfo):
    def run(self):
        pwd_found = []
        key_path = 'Software\\SimonTatham\\PuTTY\\Sessions'
        try:
            hkey = OpenKey(HKEY_CURRENT_USER, key_path)
        except Exception:
            return []

Both tools aim to extract session information, but SessionGopher is more focused on Windows-specific data, while LaZagne offers broader support for multiple operating systems and applications. LaZagne is more actively maintained and provides a more comprehensive set of features for password recovery across various software.

a tool for pentesters to help find delicious candy, by @l0ss and @Sh3r4 ( Twitter: @/mikeloss and @/sh3r4_hax )

Pros of Snaffler

  • Focused on finding sensitive information in Windows domains
  • Highly customizable with rule-based scanning
  • Actively maintained with regular updates

Cons of Snaffler

  • Limited to Windows environments
  • Requires more setup and configuration
  • Less comprehensive in terms of supported password sources

Code Comparison

Snaffler (C#):

public static void Snaffler(Options opts)
{
    PrintBanner();
    SetupLogging(opts);
    // ... (additional setup code)
}

LaZagne (Python):

def run_lazagne(category_selected='all', subcategories={}, password=None):
    for category in category_selected:
        for module in modules[category]:
            try:
                mod = modules[category][module].run(subcategories[module] if module in subcategories else None)
                # ... (result processing)
            except:
                pass

Snaffler is tailored for Windows domain environments, offering customizable rule-based scanning for sensitive information. It's actively maintained but requires more setup. LaZagne, on the other hand, is a multi-platform tool that supports a wider range of password sources and is easier to use out of the box. LaZagne's code is in Python, making it more accessible for scripting, while Snaffler's C# implementation may offer better performance in Windows environments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

The LaZagne Project !!!

Description

The LaZagne project is an open source application used to retrieve lots of passwords stored on a local computer. Each software stores its passwords using different techniques (plaintext, APIs, custom algorithms, databases, etc.). This tool has been developed for the purpose of finding these passwords for the most commonly-used software.

The LaZagne project

This project has been added to pupy as a post-exploitation module. Python code will be interpreted in memory without touching the disk and it works on Windows and Linux host.

Standalones

Standalones are now available here: https://github.com/AlessandroZ/LaZagne/releases/

Installation

pip install -r requirements.txt

Usage

  • Launch all modules
laZagne.exe all
  • Launch only a specific module
laZagne.exe browsers
  • Launch only a specific software script
laZagne.exe browsers -firefox
  • Write all passwords found into a file (-oN for Normal txt, -oJ for Json, -oA for All). Note: If you have problems to parse JSON results written as a multi-line strings, check this.
laZagne.exe all -oN
laZagne.exe all -oA -output C:\Users\test\Desktop
  • Get help
laZagne.exe -h
laZagne.exe browsers -h
  • Change verbosity mode (2 different levels)
laZagne.exe all -vv
  • Quiet mode (nothing will be printed on the standard output)
laZagne.exe all -quiet -oA
  • To decrypt domain credentials, it could be done specifying the user windows password. Otherwise it will try all passwords already found as windows passwords.
laZagne.exe all -password ZapataVive

Note: For wifi passwords \ Windows Secrets, launch it with administrator privileges (UAC Authentication / sudo)

Mac OS

Note: In Mac OS System, without the user password it is very difficult to retrieve passwords stored on the computer. So, I recommend using one of these options

  • If you know the user password, add it in the command line
laZagne all --password SuperSecurePassword
  • You could use the interactive mode that will prompt a dialog box to the user until the password will be correct
laZagne all -i

Supported software

WindowsLinuxMac
Browsers7Star
Amigo
Basilisk
BlackHawk
Brave
Centbrowser
Chedot
Chrome Beta
Chrome Canary
Chromium
Coccoc
Comodo Dragon
Comodo IceDragon
Cyberfox
DCBrowser
Elements Browser
Epic Privacy Browser
Firefox
Google Chrome
Icecat
K-Meleon
Kometa
Microsoft Edge
Opera
Opera GX
Orbitum
QQBrowser
pale Moon
SogouExplorer
Sputnik
Torch
Uran
Vivaldi
Brave
Chromium
Dissenter-Browser
Firefox
Google Chrome
IceCat
Microsoft Edge
Opera
SlimJet
Vivaldi
Chrome
Firefox
ChatsPidgin
Psi
Skype
Pidgin
Psi
DatabasesDBVisualizer
Postgresql
Robomongo
Squirrel
SQLdevelopper
DBVisualizer
Squirrel
SQLdevelopper
GamesGalconFusion
Kalypsomedia
RogueTale
Turba
GitGit for Windows
MailsEpyrus
Interlink
Outlook
Thunderbird
Clawsmail
Thunderbird
MavenMaven Apache
Dumps from memoryKeepass
Mimikatz method
System Password
MultimediaEyeCON
PHPComposer
SVNTortoise
SysadminApache Directory Studio
CoreFTP
CyberDuck
FileZilla
FileZilla Server
FTPNavigator
OpenSSH
OpenVPN
mRemoteNG
KeePass Configuration Files (KeePass1, KeePass2)
PuttyCM
Rclone
RDPManager
VNC
WinSCP
Windows Subsystem for Linux
Apache Directory Studio
AWS
Docker
Environnement variable
FileZilla
gFTP
History files
Shares
SSH private keys
KeePass Configuration Files (KeePassX, KeePass2)
Grub
Rclone
WifiWireless NetworkNetwork Manager
WPA Supplicant
Internal mechanism passwords storageAutologon
MSCache
Credential Files
Credman
DPAPI Hash
Hashdump (LM/NT)
LSA secret
Vault Files
GNOME Keyring
Kwallet
Hashdump
Keychains
Hashdump

Compile

  • Using Pyinstaller
pyinstaller --additional-hooks-dir=. -F --onefile laZagne.py
  • Using Nuitka
python3 -m nuitka --standalone --onefile --include-package=lazagne laZagne.py

For developers

Please refer to the wiki before opening an issue to understand how to compile the project or to develop a new module. https://github.com/AlessandroZ/LaZagne/wiki

Donation

If you want to support my work doing a donation, I will appreciate a lot:

Special thanks