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

Module
Description
Software Targets

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

mail

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 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

  1. Context is king - Understanding the system's purpose guides search strategy

  2. LaZagne is powerful - 60+ modules make it essential for Windows credential hunting

  3. findstr is versatile - Native tool with powerful pattern matching

  4. Multiple approaches - Combine automated tools with manual searches

  5. Document everything - Track credential sources and validation status

  6. Test immediately - Validate credentials as soon as they're found

  7. 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