dpapi module extracts SCCM-related secrets stored in DPAPI (Data Protection API) encrypted blobs on remote Windows systems. This technique recovers sensitive information including Network Access Account credentials, task sequence variables, and other SCCM secrets stored locally on client systems.
DPAPI secrets are stored both in the WMI repository and on disk in OBJECTS.DATA files. This module can extract from both locations, providing comprehensive secret recovery capabilities.
Attack Overview
The DPAPI extraction process works by:- Remote Authentication: Establishing connection with local administrator credentials
- Secret Location: Identifying DPAPI blobs in WMI repository and/or disk storage
- DPAPI Decryption: Using system privileges to decrypt the protected data
- Credential Extraction: Parsing and extracting SCCM secrets from decrypted blobs
DPAPI Storage Locations
SCCM Secret Storage Methods
SCCM stores encrypted secrets in two primary locations:
- WMI Repository: Active secrets stored in the WMI database (
-wmiflag) - Disk Storage: Historical and cached secrets in OBJECTS.DATA files (
-diskflag) - Combined Approach: Both locations for comprehensive extraction (
-bothflag)
Prerequisites
Requirements
- Valid local administrator credentials for the target system
- Network connectivity to the target Windows machine
- Target system running SCCM client with stored secrets
- SMB/WMI access to the remote system (ports 135, 445)
Command Syntax
Parameters
Required Parameters
Required Parameters
| Parameter | Description | Example |
|---|---|---|
-u | Username for authentication | domainadmin |
-target | Target hostname or IP address | workstation.ludus.domain |
Authentication Options
Authentication Options
| Parameter | Description | Example |
|---|---|---|
-p | Password for authentication | password |
-d | Target domain name | ludus.domain |
-dc-ip | Domain controller IP or FQDN | 10.10.100.100 |
-hashes | NT:LM hash for authentication | aad3b435b51404ee:5fbc3d5fec8206a30f4b6c473d68ae76 |
-k | Use Kerberos authentication | |
-no-pass | Don’t prompt for password | |
-aesKey | AES key for Kerberos (128/256 bits) |
Extraction Methods
Extraction Methods
| Parameter | Description | Use Case |
|---|---|---|
-wmi | Extract from WMI repository | Active secrets currently in use |
-disk | Extract from OBJECTS.DATA files | Historical/cached secrets |
-both | Extract from both WMI and disk | Comprehensive secret recovery |
-debug | Enable verbose logging | Troubleshooting and detailed output |
-impacket-debug | Enable Impacket logging | Network protocol debugging |
Usage Examples
WMI Repository Secret Extraction
WMI Repository Secret Extraction
Extract active SCCM secrets from the WMI repositoryExpected Output:
WMI extraction recovers currently active Network Access Account credentials and task sequence variables stored in the WMI repository. This method is faster but may miss historical secrets.
Disk-Based Secret Extraction
Disk-Based Secret Extraction
Extract secrets from OBJECTS.DATA files on disk for comprehensive recoveryUse Case: This method accesses potentially changed or deleted secrets that may no longer be available in the WMI repository but are cached in disk storage.
Comprehensive Extraction (Both Methods)
Comprehensive Extraction (Both Methods)
Combine WMI and disk extraction for maximum secret recoveryBenefits:
- Recovers all active secrets from WMI repository
- Extracts historical/cached secrets from disk storage
- Provides the most complete picture of SCCM secrets on the target system
- Identifies secrets that may have been rotated or updated
Understanding Extracted Secrets
Types of SCCM Secrets Recovered
The DPAPI extraction can reveal several categories of sensitive information:
- Network Access Account (NAA) Credentials: Domain account used for content access
- Task Sequence Variables: Custom variables containing passwords and configuration data
- Collection Variables: Site-specific variables with embedded credentials
- Application Deployment Secrets: Credentials used for software installation
- LSA Secrets: Additional system-level credentials (when available)
WMI vs Disk Extraction
WMI Repository:
- Currently active secrets
- Faster extraction process
- Real-time SCCM configuration
- May miss historical data
- Historical and cached secrets
- Potentially deleted/rotated credentials
- Comprehensive secret archive
- Slower but more thorough
Operational Security
Detection Considerations:
- Requires local admin access (high privilege)
- WMI queries may be logged
- File system access creates audit trails
- Network authentication generates logs
- Consider timing and stealth requirements
Target Selection Strategy
Ideal Target Systems
Ideal Target Systems
High-Value DPAPI Targets:
- Workstations with frequent task sequences: Systems that regularly receive OS deployments
- Administrative workstations: Systems used by SCCM administrators
- Development/testing machines: Often contain additional variables and secrets
- Systems with custom applications: May have deployment-specific credentials
- Long-running systems: More likely to have cached historical secrets
- Use
smbprofiling to identify SCCM clients - Target systems with recent SCCM activity
- Focus on high-privilege user workstations
- Consider systems in different site codes for broader coverage
Troubleshooting and Error Handling
Common Issues and Solutions
Common Issues and Solutions
Authentication Failures:
- Verify local administrator privileges on target
- Check network connectivity and firewall rules
- Confirm WMI/SMB service availability
- Normal behavior in many environments
- Focus on recovered NAA credentials and task sequences
- Not critical for overall secret extraction success
- Target may not be an active SCCM client
- Try different extraction methods (-wmi, -disk, -both)
- Verify SCCM client installation and configuration
Next Steps
Credential Utilization
Use Extracted Secrets For:
- SMB share enumeration with NAA credentials
- Lateral movement with discovered accounts
- Additional SCCM infrastructure access
- Privilege escalation opportunities
Persistence
Maintain Access:
- Document all extracted credentials
- Test credential validity across environment
- Identify additional target systems
- Establish persistent access methods
Coverage Expansion
Broaden Assessment:
- Target multiple workstations for comprehensive coverage
- Extract from different SCCM sites
- Combine with other SCCMHunter modules
- Build complete credential database
Integration with Other Modules
SCCMHunter Workflow Integration
The DPAPI module complements other SCCMHunter capabilities: