What is SharpUp?
SharpUp is a C# port of PowerUp functionality for enumerating common Windows privilege escalation vectors. It performs automated checks to identify potential privilege escalation opportunities on Windows systems without requiring weaponization or exploitation.Key Features
Privilege Escalation Checks
15 different vulnerability checks for common Windows privesc vectors
No Weaponization
Enumeration only - no exploitation or modification of systems
Audit Mode
Run checks regardless of current privilege level
Selective Checks
Run all checks or specify individual checks to execute
Available Checks
SharpUp includes 15 privilege escalation enumeration checks:Service-Based Checks
ModifiableServices
ModifiableServices
Identifies services where the current user can modify the service configuration
ModifiableServiceBinaries
ModifiableServiceBinaries
Finds service binaries that the current user can modify
ModifiableServiceRegistryKeys
ModifiableServiceRegistryKeys
Locates service registry keys that can be modified by the current user
UnquotedServicePath
UnquotedServicePath
Identifies services with unquoted paths containing spaces (DLL hijacking opportunity)
Registry-Based Checks
RegistryAutoLogons
RegistryAutoLogons
Searches for plaintext credentials in registry AutoLogon configuration
RegistryAutoruns
RegistryAutoruns
Finds modifiable registry autoruns (HKLM and HKCU Run keys)
AlwaysInstallElevated
AlwaysInstallElevated
Checks if AlwaysInstallElevated policy is enabled (MSI privilege escalation)
File-Based Checks
UnattendedInstallFiles
UnattendedInstallFiles
Searches for unattended installation files that may contain credentials
McAfeeSitelistFiles
McAfeeSitelistFiles
Locates McAfee SiteList.xml files containing encrypted passwords
CachedGPPPassword
CachedGPPPassword
Searches local cache for Group Policy Preference passwords
DomainGPPPassword
DomainGPPPassword
Searches domain SYSVOL for Group Policy Preference passwords
Scheduled Task Checks
ModifiableScheduledTask
ModifiableScheduledTask
Identifies scheduled tasks with modifiable binaries or scripts
PATH & DLL Checks
HijackablePaths
HijackablePaths
Finds modifiable directories in the system %PATH% variable
ProcessDLLHijack
ProcessDLLHijack
Identifies running processes with missing DLLs (DLL hijacking opportunity)
Token & Privileges
TokenPrivileges
TokenPrivileges
Enumerates current user token privileges
Basic Usage
Audit Mode
By default, SharpUp will not run checks if you’re already a local administrator or in high integrity. Use
audit mode to force all checks to run anyway.- High Integrity: SharpUp detects this and skips checks (already privileged)
- Medium Integrity + Local Admin: SharpUp suggests UAC bypass instead
- Standard User: All checks run normally
- Runs all specified checks regardless of current privilege level
- Useful for security auditing and compliance checking
- Will produce false positives when run in high integrity
Typical Workflow
1
Initial Enumeration
Run all checks to identify potential privilege escalation vectors
2
Review Results
Analyze the output to identify the most promising vulnerabilities
3
Targeted Checks
Re-run specific checks for verification or detailed information
4
Exploitation
Use the information to manually exploit identified vulnerabilities (SharpUp doesn’t include weaponization)
Example Output
Detection Considerations
Host-Based Detection
- Registry Enumeration: Reading service configurations and Run keys
- File System Enumeration: Searching for unattended install files and GPP passwords
- Service Queries: Enumerating service ACLs and configurations
- Scheduled Task Queries: Enumerating task configurations
- Token Queries: Reading current process token privileges
Behavioral Indicators
- Process making numerous registry queries to service keys
- Rapid enumeration of file system for specific file patterns
- Querying service security descriptors
- SYSVOL/netlogon share access (for Domain GPP checks)
- Sequential execution of multiple privilege checks
Defensive Measures
Detection Strategies
Detection Strategies
- Monitor for rapid service configuration enumeration
- Alert on SYSVOL access from non-DC systems
- Track unusual registry key access patterns
- Monitor for SharpUp.exe execution
- Detect sequential privilege escalation check patterns
Prevention Strategies
Prevention Strategies
- Remove unattended install files from systems
- Disable AlwaysInstallElevated policy
- Properly configure service ACLs
- Quote all service paths
- Remove cached GPP passwords
- Implement least privilege for service accounts
- Audit and restrict PATH directory permissions
Prerequisites
Build Requirements
Build Requirements
- Visual Studio 2015 Community Edition or later
- .NET Framework 3.5 (default target)
Execution Requirements
Execution Requirements
- Windows operating system
- .NET Framework 3.5 or later
- Standard user privileges (no elevation required)
Privilege Requirements
Privilege Requirements
Standard User:
- Can run all enumeration checks
- Identifies privilege escalation opportunities
- SharpUp will detect and skip checks (use
auditmode to force) - May produce false positives in high integrity
Comparison with PowerUp
| Feature | PowerUp | SharpUp |
|---|---|---|
| Language | PowerShell | C# |
| Checks | 15+ enumeration + exploitation | 15 enumeration only |
| Weaponization | Included | Not included |
| Execution | PowerShell.exe | Native .exe |
| AMSI/CLM | Affected | Bypasses |
| Footprint | Script loaded in memory | Binary execution |
SharpUp focuses purely on enumeration. For exploitation, you’ll need to manually leverage the identified vulnerabilities or use other tools.
Use Cases
Penetration Testing
Quickly identify privilege escalation vectors during assessments
Red Team Operations
Enumerate local privilege escalation opportunities post-compromise
Security Auditing
Identify and remediate privilege escalation vulnerabilities
Compliance Checking
Verify proper security configurations are in place
Additional Resources
PowerUp (Original)
Original PowerShell implementation
GitHub Repository
Official SharpUp repository
Windows Privilege Escalation
Comprehensive Windows privesc guide
GhostPack Tools
Other GhostPack security tools
Next Steps
Compilation Guide
Build SharpUp from source
Check Reference
Detailed check documentation
Usage Examples
Practical usage scenarios
Remediation Guide
Fix identified vulnerabilities
License
SharpUp is licensed under the BSD 3-Clause license.SharpUp is developed by @harmj0y and is a port of PowerUp by @mattifestation.