Credential Hunting in Windows
π― Overview
Credential hunting is the process of performing detailed searches across the file system and through various applications to discover credentials after gaining access to a Windows system. This post-exploitation technique can provide significant advantages by uncovering:
Stored application passwords (browsers, email clients, FTP tools)
Configuration files with embedded credentials
User documents containing password lists
Script files with hardcoded credentials
Windows credential stores and password managers
"A user may have documented their passwords somewhere on the system. There may even be default credentials that could be found in various files."
π§ Search-Centric Methodology
Context-Driven Approach
Before starting credential hunting, consider the target system's purpose:
IT Admin workstation β Look for network device passwords, server credentials, documentation
Developer machine β Search for database connections, API keys, deployment scripts
User workstation β Focus on saved browser passwords, personal password files
Server system β Check service accounts, configuration files, application credentials
Strategic Questions
What might the user be doing on a day-to-day basis?
Which tasks require credentials?
What applications are installed?
What network resources does this system access?
π Key Terms and Search Patterns
Primary Keywords
Extended Search Terms
π§ Search Tools and Techniques
1. Windows Search (GUI)
Use Case: Quick desktop search for files containing credential keywords
Benefits:
β Built-in, no additional tools needed
β Searches file contents, not just names
β Includes system settings and applications
Limitations:
β Limited to indexed locations
β May miss hidden or system files
2. LaZagne - Automated Credential Extraction
LaZagne is a powerful tool with 60+ modules targeting different software for password extraction.
Core Module Categories
browsers
Web browser saved passwords
Chrome, Firefox, Edge, Opera, Safari
chats
Chat application credentials
Skype, Discord, Telegram
databases
Database connection strings
MySQL, PostgreSQL, SQLite
games
Gaming platform credentials
Steam, Battle.net
git
Git repository credentials
GitHub, GitLab tokens
Email client passwords
Outlook, Thunderbird
memory
In-memory password dumps
KeePass, LSASS
multimedia
Media application creds
VLC, Spotify
php
PHP application passwords
Composer, PHPMyAdmin
svn
Subversion credentials
TortoiseSVN
sysadmin
System administration tools
WinSCP, PuTTY, OpenVPN, FileZilla
windows
Windows credential stores
Credential Manager, LSA Secrets
wifi
Wireless network passwords
Saved WiFi profiles
LaZagne Usage
Example LaZagne Output
3. findstr - Command Line Pattern Searching
findstr allows flexible pattern matching across multiple file types.
Basic findstr Syntax
Advanced findstr Patterns
findstr Flags Explained
4. PowerShell Search Techniques
π High-Value Target Locations
File System Locations
Registry Locations
Network Share Locations
π’ Enterprise-Specific Locations
Group Policy and Domain Assets
Development and IT Infrastructure
Active Directory User Descriptions
π― Systematic Credential Hunting Methodology
Initial Reconnaissance and Planning
Before beginning credential hunting, assess the target environment:
System Purpose Assessment
User Context Analysis
Credential Discovery Workflow
Phase 1: Automated Discovery
Phase 2: Manual File System Search
Phase 3: Registry and System Analysis
Application-Specific Hunting Techniques
Browser Credential Extraction
Network Administration Tools
Development Environment Credentials
Advanced Discovery Techniques
Memory-Based Credential Extraction
Network Share Enumeration
Alternative Data Streams and Hidden Files
Documentation and Validation
Credential Organization
Immediate Validation
π‘οΈ Detection and Evasion
Common Detection Methods
File access monitoring - Unusual file access patterns
Process monitoring - LaZagne execution
Network monitoring - Data exfiltration
Registry monitoring - Credential store access
Evasion Techniques
π― Success Metrics and Validation
Credential Quality Assessment
Documentation Format
π Quick Reference Checklist
Initial Assessment
Automated Tools
Manual Searches
Advanced Techniques
Validation
π‘ Key Takeaways
Context is king - Understanding the system's purpose guides search strategy
LaZagne is powerful - 60+ modules make it essential for Windows credential hunting
findstr is versatile - Native tool with powerful pattern matching
Multiple approaches - Combine automated tools with manual searches
Document everything - Track credential sources and validation status
Test immediately - Validate credentials as soon as they're found
Think like the user - Where would you store passwords if you were them?
This guide provides comprehensive coverage of credential hunting techniques for Windows environments, based on HTB Academy's Password Attacks module.
Last updated