Overview
The machinetriage command is a comprehensive wrapper that executes all machine/SYSTEM DPAPI extraction commands in a single run. It automatically extracts machine credentials, vaults, and certificates for complete system-level DPAPI triage.This is the recommended starting point for machine DPAPI triage. It runs the equivalent of
machinecredentials, machinevaults, and certificates /machine commands.Basic Usage
What Gets Triaged
The machinetriage command executes the following operations:1
DPAPI_SYSTEM Retrieval
Elevates to SYSTEM and retrieves the DPAPI_SYSTEM LSA secret
2
Machine Masterkeys
Decrypts all machine DPAPI masterkeys using DPAPI_SYSTEM
3
Machine Credentials
Searches system credential directories and decrypts all credential files (scheduled tasks, service accounts, etc.)
4
Machine Vaults
Searches system vault folders and decrypts vault data (web credentials, network passwords, etc.)
5
Machine Certificates
Searches system certificate directories and decrypts certificate private keys
Execution Flow
Example Output
What You’ll Find
Scheduled Task Credentials
Scheduled Task Credentials
- Domain and local account passwords for scheduled tasks
- Service account credentials
- Automated job credentials
- Look for:
Domain:batch=TaskScheduler:Task:{GUID}
Service Account Passwords
Service Account Passwords
- Windows service credentials
- Application pool identities
- Background service accounts
- System process credentials
RDP Saved Credentials
RDP Saved Credentials
- System-level saved RDP passwords
- Service account RDP connections
- Jump box credentials
- Look for:
Domain:target=TERMSRV/HOSTNAME
Web Credentials
Web Credentials
- Internet Explorer saved passwords (system context)
- Internal portal credentials
- Administrative web interface passwords
- Service web authentication
Network Credentials
Network Credentials
- SMB share credentials
- Network resource passwords
- Domain authentication
- Generic Windows credentials
Certificate Private Keys
Certificate Private Keys
- Machine authentication certificates
- SSL/TLS server certificates
- Code signing certificates
- Client authentication certificates
When to Use machinetriage
Initial Compromise
First action after gaining admin access to a system
Privilege Escalation
Discover privileged credentials for escalation
Lateral Movement
Find credentials for moving to other systems
Persistence
Identify long-lived service account credentials
Common Scenarios
Post-Exploitation Standard Operating Procedure
Post-Exploitation Standard Operating Procedure
After gaining admin access:
Comprehensive System Assessment
Comprehensive System Assessment
Full credential sweep:
Service Account Discovery Workflow
Service Account Discovery Workflow
Find and exploit service accounts:
Scheduled Task Enumeration
Scheduled Task Enumeration
Find privileged task credentials:
Comparison: User vs Machine Triage
| Aspect | triage (User) | machinetriage (Machine) |
|---|---|---|
| Target | User profiles | System profiles |
| Privilege | User/Admin | Admin (SYSTEM) |
| Decryption Key | Domain backup key / user password | DPAPI_SYSTEM secret |
| Credentials | User saved passwords | Service/scheduled task credentials |
| Vaults | User web passwords | System web credentials |
| Certificates | User certificates | Machine certificates |
| Typical Value | User credentials, browser data | Service accounts, system credentials |
For complete coverage, run both
triage and machinetriage commands.Detection Considerations
Host-Based Indicators:- Elevation to SYSTEM privileges
- LSA secret retrieval (DPAPI_SYSTEM)
- Bulk access to system credential directories
- Reading system vault files
- Enumeration of machine certificate stores
- High volume of DPAPI operations
- Monitor SYSTEM token impersonation
- Alert on LSA secret access (DPAPI_SYSTEM)
- Track bulk system credential directory access
- Detect system vault enumeration
- Monitor machine certificate access
- Alert on SharpDPAPI or similar tools
Related Commands
triage
Comprehensive user DPAPI triage
machinecredentials
Machine credentials only
machinevaults
Machine vaults only
sccm
SCCM NAA credentials
Tips
Maximizing Value
Maximizing Value
- Run immediately after gaining admin access
- Focus on scheduled task credentials (often privileged)
- Test RDP credentials for lateral movement
- Check certificate EKUs for authentication capabilities
- Correlate task GUIDs with schtasks output
- Look for domain accounts vs local accounts
OPSEC Considerations
OPSEC Considerations
- Requires elevation (high visibility)
- Comprehensive operation generates many events
- SYSTEM privilege elevation triggers alerts
- Consider breaking into individual commands if stealth needed
- Redirect output to file to minimize console activity
- Clean up output files after exfiltration
Troubleshooting
Troubleshooting
Access denied:
- Need Administrator privileges
- UAC may block elevation
- Security software may prevent SYSTEM access
- AV/EDR may terminate process
- Some components may fail while others succeed
- Check individual command outputs
- Verify DPAPI_SYSTEM was retrieved correctly
- Review error messages for specific failures
- System may not have machine credentials/vaults
- Scheduled tasks may use group policy credentials
- Services may not store credentials locally
- Check ServiceProfiles directories manually
Output Analysis Tips
Prioritize Credentials:- Domain Accounts - Highest value, potential lateral movement
- Scheduled Task Credentials - Often privileged accounts
- RDP Credentials - Direct lateral movement
- Service Accounts - May have elevated privileges
- Web Portal Credentials - Internal infrastructure access
- Client Authentication - Can authenticate to services
- Code Signing - Sign executables/scripts
- Server Authentication - SSL/TLS impersonation
- Expired certificates - Lower value but may still work
Integration with Other Tools
PowerShell Analysis:Summary
The machinetriage command is your one-stop shop for machine/SYSTEM DPAPI credential extraction. It combines:- machinecredentials - Scheduled tasks, service accounts
- machinevaults - Web and network credentials
- certificates /machine - Certificate private keys