Overview
The blob command decrypts arbitrary DPAPI blobs provided as base64 strings or binary files. This is a general-purpose decryption tool for any DPAPI-protected data not covered by other specific commands.DPAPI blobs are the fundamental encrypted data structure used throughout Windows. This command can decrypt any DPAPI blob if you have the appropriate masterkeys.
Basic Usage
Command Arguments
Required Arguments
| Argument | Description |
|---|---|
/target:BASE64 | Base64-encoded DPAPI blob to decrypt |
/target:blob.bin | Path to binary file containing DPAPI blob |
Decryption Methods
- CryptUnprotectData
- Domain Backup Key
- Masterkey Mappings
- User Credentials
The
/server argument is not applicable to the blob command since you must specify a specific target blob or file.Example: Decrypting Binary Blob File with /unprotect
Example: Decrypting with Masterkey Mappings
Binary data is displayed as hex bytes. Text data is displayed as a string.
Example: Decrypting with Domain Backup Key
DPAPI Blob Structure
A DPAPI blob contains:| Field | Description |
|---|---|
| guidMasterKey | GUID of masterkey used for encryption |
| size | Size of encrypted data |
| flags | Protection flags (e.g., CRYPTPROTECT_SYSTEM) |
| algHash | Hash algorithm used (e.g., CALG_SHA) |
| algCrypt | Encryption algorithm used (e.g., CALG_3DES, CALG_AES_256) |
| description | Optional description string |
| encrypted data | The actual encrypted content |
Common DPAPI Blob Sources
Registry Values
Registry Values
- Browser saved passwords
- Application credentials
- Windows settings
- Software configurations
File System
File System
- Configuration files
- Credential stores
- Encrypted user data
- Application data
Memory Dumps
Memory Dumps
- Process memory containing DPAPI data
- Crash dumps with credentials
- Hibernation files
Custom Applications
Custom Applications
- Third-party software using DPAPI
- Custom credential management
- Encrypted configuration data
Finding DPAPI Blobs
Use the search command to find DPAPI blobs:Common Scenarios
Analyzing Custom Application Data
Analyzing Custom Application Data
Decrypt DPAPI blobs from custom applications:
Registry-Based Credentials
Registry-Based Credentials
Extract and decrypt registry DPAPI blobs:
Post-Domain Compromise
Post-Domain Compromise
Decrypt arbitrary DPAPI blobs with domain backup key:
Offline/Forensic Analysis
Offline/Forensic Analysis
Analyze extracted DPAPI blobs:
Blob Flags
Common DPAPI protection flags:| Flag | Value | Description |
|---|---|---|
| CRYPTPROTECT_UI_FORBIDDEN | 0x1 | No UI prompts |
| CRYPTPROTECT_LOCAL_MACHINE | 0x4 | Machine-scope protection |
| CRYPTPROTECT_SYSTEM | 0x20000000 | System credential protection |
The
CRYPTPROTECT_SYSTEM flag (0x20000000) indicates credentials saved by Windows services or scheduled tasks.Encryption Algorithms
Common DPAPI encryption algorithms:| Algorithm | Value | Description |
|---|---|---|
| CALG_3DES | 26115 | Triple DES encryption |
| CALG_AES_128 | 26126 | AES-128 encryption |
| CALG_AES_256 | 26128 | AES-256 encryption (newer Windows) |
Detection Considerations
Host-Based Indicators:- Reading unknown/arbitrary files
- Processing base64-encoded data
- Decryption attempts on multiple blobs
- Access patterns suggesting blob enumeration
- Monitor for bulk file access patterns
- Alert on DPAPI-related process activity
- Track access to application credential stores
- Detect registry value enumeration
- Monitor for LSASS access (when not using /unprotect)
Related Commands
search
Find DPAPI blobs in registry, files, and folders
ps
Decrypt PowerShell credential XML files
credentials
Decrypt Credential Manager files
masterkeys
Decrypt user masterkeys
Tips
Working with Blobs
Working with Blobs
- Use the search command to locate DPAPI blobs first
- Extract blobs from registry using PowerShell
- Binary data may require further parsing after decryption
- Check blob flags to understand protection scope
- Text data will be displayed directly, binary as hex
OPSEC Considerations
OPSEC Considerations
- Prefer
/unprotectwhen running as target user - Target specific blobs to avoid bulk processing
- Redirect output to file with
/consoleoutfile - Consider the visibility of accessing unusual files
- Base64 blobs in command line may be logged
Troubleshooting
Troubleshooting
Decryption fails with /unprotect:
- Must run from user context who created the blob
- Try using masterkeys or backup key instead
- Verify you’re running as correct user
- Blob may use machine-scope protection
- Data may not be a DPAPI blob
- File may be corrupted
- Check file header for DPAPI signature
- Verify base64 encoding is correct
- Data is not plain text
- May require additional parsing
- Check application documentation
- Could be encrypted with additional layer