Overview
The search command searches for potential DPAPI blobs in the Windows registry, files, folders, and base64-encoded strings. It identifies data containing DPAPI blob headers, helping discover hidden or non-standard DPAPI-protected data.The search command looks for the DPAPI blob header signature to identify encrypted data that can then be decrypted with the blob command.
Basic Usage
Command Arguments
Search Types
| Type | Description | Required Arguments |
|---|---|---|
registry | Search Windows registry for DPAPI blobs | Optional: /path, /showErrors |
folder | Search folder recursively for DPAPI blobs | Required: /path, Optional: /maxBytes, /showErrors |
file | Search specific file for DPAPI blobs | Required: /path, Optional: /maxBytes |
base64 | Validate if base64 string contains DPAPI blob | Required: /base |
Additional Arguments
| Argument | Description |
|---|---|
/path:PATH | Registry path or file/folder path to search |
/maxBytes:N | Max bytes to read from each file (default: 1024) |
/showErrors | Display errors during enumeration |
/base:BASE64 | Base64 string to validate for DPAPI blob |
DPAPI Blob Header Signature
The search command looks for this byte sequence:- Version:
0x01000000(Version 1) - Provider GUID:
DF9D8CD0-0115-D111-8C7A-00C04FC297EB
Search Type: Registry
- Full Registry Search
- Specific Path
- Searches HKLM and HKU hives by default
- Recursively enumerates all subkeys
- Checks all registry values for DPAPI headers
/showErrorsdisplays access denied and other errors
Search Type: Folder
- Recursively searches all files in folder
- Reads up to
/maxBytesfrom beginning of each file (default: 1024) - Searches read bytes for DPAPI blob header
/showErrorsdisplays file access errors
Search Type: File
- Reads up to
/maxBytesfrom beginning of file (default: 1024) - Searches read bytes for DPAPI blob header
- Reports offset and approximate size
Search Type: Base64
- Decodes base64 string
- Checks for DPAPI blob header signature
- Validates blob structure
Common Search Scenarios
Discovering Hidden Credentials
Discovering Hidden Credentials
Custom Application Analysis
Custom Application Analysis
Find DPAPI usage in custom applications:
Complete System Enumeration
Complete System Enumeration
Comprehensive DPAPI discovery:
Forensic Analysis
Forensic Analysis
Analyze extracted data:
Using Search Results
Once DPAPI blobs are found, decrypt them with the blob command:1
Search for Blobs
2
Note File Paths
Record paths of files containing DPAPI blobs
3
Decrypt Discovered Blobs
Registry Search Targets
High-value registry locations for DPAPI blobs:- Custom enterprise software
- Third-party credential managers
- Backup/sync applications
- Remote access tools
- Automation software
File System Search Targets
Common locations containing DPAPI blobs:- Configuration files (
.config,.xml,.json) - Database files (
.db,.sqlite) - Binary data files (
.dat,.bin) - Application-specific formats
Performance Considerations
Optimization Tips:- Use specific
/pathinstead of full searches - Reduce
/maxBytesfor faster file scanning - Target known application directories
- Use
/showErrorsonly when troubleshooting - Search user-specific locations instead of system-wide
Detection Considerations
Host-Based Indicators:- Bulk registry enumeration
- File system traversal patterns
- High volume of file reads
- Access to protected registry keys
- Systematic directory enumeration
- Monitor for registry enumeration tools
- Alert on bulk file access patterns
- Track process accessing many files quickly
- Detect systematic directory traversal
- Monitor protected registry key access
Related Commands
blob
Decrypt discovered DPAPI blobs
credentials
Decrypt Credential Manager files
vaults
Decrypt Windows Vault data
masterkeys
Decrypt user masterkeys
Tips
Effective Searching
Effective Searching
- Start with known application directories
- Use registry searches for custom software
- Increase
/maxBytesfor large configuration files - Combine with file system analysis tools
- Document all discovered blob locations
OPSEC Considerations
OPSEC Considerations
- Targeted searches are less noisy than full scans
- Consider time-of-day for extensive searches
- File system searches generate disk I/O patterns
- Registry enumeration may trigger alerts
- Use
/showErrorssparingly (generates noise)
Troubleshooting
Troubleshooting
No blobs found:
- Application may not use DPAPI
- Blobs may be in non-standard locations
- Check file encoding (may need larger
/maxBytes) - Verify search path is correct
- Try searching parent directories
- Need elevation for protected registry keys
- Some files require admin access
- System directories may be restricted
- Use
/showErrorsto see all errors
- Reduce scope to specific directories
- Lower
/maxBytesvalue - Target specific registry paths
- Exclude large directories
Advanced Usage
Combining with PowerShell
Combining with PowerShell
Registry Export and Search
Registry Export and Search