Overview
SharpUp is a privilege escalation enumeration tool that identifies common Windows misconfigurations and vulnerabilities. This guide provides practical workflows for different scenarios.Common Workflows
Workflow 1: Initial System Enumeration
When you first gain access to a Windows system as a non-privileged user:- SharpUp checks if you’re already in high integrity or local administrator
- If not, it runs all 15 vulnerability checks
- Results are displayed showing vulnerable configurations
- You can then target specific vulnerabilities for exploitation
Workflow 2: Comprehensive Security Audit
For security assessments where you need to identify all potential issues:- Security audits and compliance checks
- Vulnerability assessments
- Finding all potential escalation paths
- Documenting system weaknesses
Workflow 3: Targeted Service Exploitation
Focus on service-related privilege escalation vectors:- Services with weak permissions
- Service binaries you can modify
- Service registry keys you can change
- Unquoted service paths you can exploit
- Review the Modifiable Services check for exploitation
- See Unquoted Service Path for hijacking techniques
Workflow 4: Credential Hunting
Search for plaintext credentials and password storage issues:- GPP passwords in cached policy files or SYSVOL
- Auto-logon credentials in registry
- Credentials in unattended install files
- McAfee SiteList.xml files with encrypted credentials
- Extract and decrypt found credentials
- Use credentials for lateral movement
- Escalate privileges if credentials belong to privileged users
Workflow 5: Registry-Based Escalation
Target registry misconfigurations:- Modifiable autorun binaries
- Auto-logon credentials
- AlwaysInstallElevated policy misconfigurations
- Replace autorun binaries with malicious versions
- Use auto-logon credentials
- Create malicious MSI installers if AlwaysInstallElevated is set
Workflow 6: DLL Hijacking Opportunities
Identify DLL hijacking possibilities:- Writable DLLs loaded by privileged processes
- Modifiable folders in system PATH
- Replace vulnerable DLLs
- Place malicious executables in modifiable PATH folders
- Wait for privileged processes to load your code
Scenario-Based Examples
Scenario: Domain Joined Workstation
Scenario: Domain Joined Workstation
- Domain environments often have GPP passwords in SYSVOL
- Cached policies may contain old GPP credentials
- Auto-logon may be configured for service accounts
Scenario: Standalone Workstation
Scenario: Standalone Workstation
- Standalone systems rely on local services
- May have remnants from unattended installations
- PATH and DLL hijacking are common on workstations
Scenario: Server Environment
Scenario: Server Environment
- Servers often have special privileges assigned
- Many services run on servers
- Scheduled tasks are common for automation
Scenario: Limited User Context
Scenario: Limited User Context
- Some checks work better with limited privileges
- Audit mode may reveal additional opportunities
- User-level checks don’t require admin access
Interpreting Results
Understanding Output Format
Example Output Analysis
- Service Vulnerabilities
- Unquoted Paths
- Registry Credentials
- Token Privileges
- You have permissions to modify the VulnSvc service
- The service is currently running
- It starts automatically (will restart on reboot)
- Use
sc configto change the service binary path - Restart the service or reboot to execute your code
- See Modifiable Services for details
Practical Exploitation Examples
Example 1: Exploiting Modifiable Service
Example 2: Exploiting Unquoted Service Path
Example 3: Using AlwaysInstallElevated
Example 4: Leveraging Registry Autoruns
Integration with Other Tools
Combining with Mimikatz
Combining with PowerShell Empire
Combining with Metasploit
Best Practices
Start Broad
Begin with a full SharpUp scan to identify all potential vectors before focusing on specific checks.
Prioritize Quick Wins
Target easily exploitable vulnerabilities first (registry credentials, AlwaysInstallElevated).
Document Findings
Save SharpUp output for reporting and tracking which vectors you’ve attempted.
Chain Techniques
Combine multiple vulnerabilities to increase success rate and maintain persistence.
Operational Considerations
Stealth Considerations
- File Naming: Rename SharpUp.exe to something innocuous
- Execution Method: Use in-memory execution when possible
- Targeted Checks: Run specific checks instead of all checks to reduce noise
- Timing: Avoid running during business hours for stealth operations
Environmental Awareness
- Domain vs Standalone: Tailor your checks to the environment type
- Server vs Workstation: Different check priorities based on system role
- Patching Level: Older systems may have more vulnerabilities
- Security Tools: Be aware of EDR/AV that may detect enumeration
Troubleshooting Common Issues
No Vulnerabilities Found
No Vulnerabilities Found
Possible reasons:
- System is properly hardened
- Running with insufficient permissions
- Specific configurations not present
- Need to use audit mode
Access Denied on Specific Checks
Access Denied on Specific Checks
Common with:
- ProcessDLLHijack (needs access to process modules)
- ModifiableScheduledTask (needs access to tasks folder)
- Domain checks (needs domain connectivity)
- This is expected in some contexts
- Try with higher privileges if available
- Focus on checks that work in your context
False Positives in Audit Mode
False Positives in Audit Mode
Why it happens:
- Running in high integrity shows more results
- Some checks assume low-privilege context
- Access control checks behave differently when elevated
- Run without audit mode for accurate results
- Manually verify findings before exploitation
- Understand which checks are context-dependent