Skip to main content

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

This command requires elevation (Administrator privileges) to:
  • Elevate to SYSTEM via token duplication
  • Retrieve the DPAPI_SYSTEM LSA secret
  • Access all system credential directories

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

Output:
The machinetriage command provides comprehensive output. Redirect to a file for easier analysis: SharpDPAPI.exe machinetriage > machine_triage.txt

What You’ll Find

  • Domain and local account passwords for scheduled tasks
  • Service account credentials
  • Automated job credentials
  • Look for: Domain:batch=TaskScheduler:Task:{GUID}
  • Windows service credentials
  • Application pool identities
  • Background service accounts
  • System process credentials
  • System-level saved RDP passwords
  • Service account RDP connections
  • Jump box credentials
  • Look for: Domain:target=TERMSRV/HOSTNAME
  • Internet Explorer saved passwords (system context)
  • Internal portal credentials
  • Administrative web interface passwords
  • Service web authentication
  • SMB share credentials
  • Network resource passwords
  • Domain authentication
  • Generic Windows credentials
  • 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

After gaining admin access:
Full credential sweep:
Find and exploit service accounts:
Find privileged task credentials:

Comparison: User vs Machine Triage

For complete coverage, run both triage and machinetriage commands.

Detection Considerations

Machine triage is a high-privilege, comprehensive operation that should trigger multiple security alerts.
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
Event Log Indicators:
Defensive Monitoring:
  • 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

triage

Comprehensive user DPAPI triage

machinecredentials

Machine credentials only

machinevaults

Machine vaults only

sccm

SCCM NAA credentials

Tips

  • 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
  • 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
Access denied:
  • Need Administrator privileges
  • UAC may block elevation
  • Security software may prevent SYSTEM access
  • AV/EDR may terminate process
Partial results:
  • Some components may fail while others succeed
  • Check individual command outputs
  • Verify DPAPI_SYSTEM was retrieved correctly
  • Review error messages for specific failures
No data found:
  • 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:
  1. Domain Accounts - Highest value, potential lateral movement
  2. Scheduled Task Credentials - Often privileged accounts
  3. RDP Credentials - Direct lateral movement
  4. Service Accounts - May have elevated privileges
  5. Web Portal Credentials - Internal infrastructure access
Certificate Value Assessment:
  • Client Authentication - Can authenticate to services
  • Code Signing - Sign executables/scripts
  • Server Authentication - SSL/TLS impersonation
  • Expired certificates - Lower value but may still work
Immediate Actions:

Integration with Other Tools

PowerShell Analysis:
Credential Testing:

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
Use this as your first command after gaining admin access to maximize credential discovery and lateral movement opportunities.