Overview
The Unattended Install Files check searches for Windows unattended installation answer files that may contain plaintext or base64-encoded credentials. These files are used during automated Windows deployments and often left behind after installation, accessible to any user on the system.How It Works
SharpUp checks common locations for unattended installation files: File Locations Checked:%windir%\sysprep\sysprep.xml%windir%\sysprep\sysprep.inf%windir%\sysprep.inf%windir%\Panther\Unattended.xml%windir%\Panther\Unattend.xml%windir%\Panther\Unattend\Unattend.xml%windir%\Panther\Unattend\Unattended.xml%windir%\System32\Sysprep\unattend.xml%windir%\System32\Sysprep\Panther\unattend.xml
Example Output
- Unattended install files found on system
- May contain credentials for:
- Local administrator account
- Domain join account
- Auto-logon account
- Product keys
Exploitation
Method 1: Extract Credentials from XML
Method 2: Extract Domain Join Credentials
Method 3: Decode Base64 Passwords
Method 4: Search All Answer Files
Remediation
1
Locate Unattended Files
2
Review File Contents
Before deletion, review files for credentials that need to be changed:
3
Delete Unattended Files
4
Change Exposed Credentials
5
Secure Deployment Process
For future deployments:
- Don’t store passwords in answer files
- Use offline domain join (djoin.exe)
- Implement MDT/SCCM with proper credential management
- Delete answer files after successful deployment
- Use secure variables instead of plaintext passwords
Automated Cleanup Script
Detection
Defensive Monitoring
Detection Strategies
- File Access Monitoring
- Process Monitoring
- Preventive Scanning
- Monitor read access to Panther and Sysprep directories
- Alert on access to *.xml and *.inf files in these locations
- Track which users are accessing these files
Real-World Scenarios
Scenario 1: Enterprise Deployment Remnants
Scenario 1: Enterprise Deployment Remnants
Context: 5,000 workstations deployed using MDT 2 years ago. Unattend.xml files never cleaned up.Contents:
- Local administrator password (same on all workstations)
- Domain join service account credentials
- Attacker compromises one workstation
- Finds unattend.xml with local admin password
- Gains local admin on all 5,000 workstations
- Uses domain join credentials for lateral movement
Scenario 2: Sysprep Answer File
Scenario 2: Sysprep Answer File
Context: Custom Windows image created with Sysprep, answer file included in image.Risk:
- Every deployed system has same answer file
- Contains built-in administrator password
- Auto-logon configured for initial setup
- Remove answer files from master image
- Use dynamic credential injection
- LAPS for local administrator passwords
Scenario 3: Penetration Test Discovery
Scenario 3: Penetration Test Discovery
Context: Penetration tester gains low-privilege shell on workstation.Attack Path:
- Run SharpUp to identify unattended files
- Find C:\Windows\Panther\Unattend.xml
- Extract domain join account credentials
- Use credentials to access domain resources
- Escalate to domain admin
Prevention Best Practices
Clean After Deployment
Always delete answer files after successful Windows installation.
Don't Store Passwords
Avoid storing passwords in answer files. Use alternative methods.
Use LAPS
Implement Local Administrator Password Solution for randomized admin passwords.
Offline Domain Join
Use djoin.exe for domain joining without storing credentials.
Secure Deployment Alternatives
MDT/SCCM Best Practices
- Store credentials in variables, not answer files
- Use separate deployment accounts with limited privileges
- Rotate deployment account passwords regularly
- Clean up deployment directories post-installation
- Audit deployment processes
Related Checks
Registry AutoLogons
Plaintext auto-logon credentials in registry
Cached GPP Password
Cached Group Policy Preference passwords
Domain GPP Password
GPP passwords in SYSVOL
Remediation Guide
Comprehensive remediation guidance