Skip to main content

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.
Unattended install files can contain local administrator passwords, domain join credentials, and product keys.

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

Interpretation:
  • 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

  • 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

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
Impact:
  • 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
Lesson: Always clean up deployment artifacts.
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
Solution:
  • Remove answer files from master image
  • Use dynamic credential injection
  • LAPS for local administrator passwords
Context: Penetration tester gains low-privilege shell on workstation.Attack Path:
  1. Run SharpUp to identify unattended files
  2. Find C:\Windows\Panther\Unattend.xml
  3. Extract domain join account credentials
  4. Use credentials to access domain resources
  5. Escalate to domain admin
Prevention: Regular cleanup and credential rotation.

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

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

References

Microsoft Docs

Automate Windows Setup

MITRE ATT&CK

T1552.003 - Unsecured Credentials: Bash History

Offline Domain Join

Offline Domain Join (Djoin.exe)