PRIVILEGE ESCALATION
LOCAL PRIVILEGE ESCALATION
Basic Privilege escalation
1. Service Enumeration
Get-ServiceUnquoted # returns services with unquoted paths that also have a space in the name
Get-ModifiableServiceFile # returns services where the current user can write to the service binary path or its config
Get-ModifiableService # returns services the current user can modify
Get-ServiceDetail # returns detailed information about a specified service
2. Service Abuse
Invoke-ServiceAbuse # modifies a vulnerable service to create a local admin or execute a custom command
Write-ServiceBinary # writes out a patched C # service binary that adds a local admin or executes a custom command
Install-ServiceBinary # replaces a service binary with one that adds a local admin or executes a custom command
Restore-ServiceBinary # restores a replaced service binary with the original executable
3. DLL Hijacking
Find-ProcessDLLHijack # finds potential DLL hijacking opportunities for currently running processes
Find-PathDLLHijack # finds service %PATH% DLL hijacking opportunities
Write-HijackDll # writes out a hijackable DLL
4. Registry Checks
Get-RegistryAlwaysInstallElevated # checks if the AlwaysInstallElevated registry key is set
Get-RegistryAutoLogon # checks for Autologon credentials in the registry
Get-ModifiableRegistryAutoRun # checks for any modifiable binaries/scripts (or their configs) in HKLM autoruns
5. Miscellaneous Checks
Get-ModifiableScheduledTaskFile # find schtasks with modifiable target files
Get-UnattendedInstallFile # finds remaining unattended installation files
Get-Webconfig # checks for any encrypted web.config strings
Get-ApplicationHost # checks for encrypted application pool and virtual directory passwords
Get-SiteListPassword # retrieves the plaintext passwords for any found McAfee`'s SiteList.xml files
Get-CachedGPPPassword # checks for passwords in cached Group Policy Preferences files
6. Other Helpers/Meta-Functions
Get-ModifiablePath # tokenizes an input string and returns the files in it the current user can modify
Get-CurrentUserTokenGroupSid # returns all SIDs that the current user is a part of, whether they are disabled or not
Add-ServiceDacl # adds a Dacl field to a service object returned by Get-Service
Set-ServiceBinPath # sets the binary path for a service to a specified value through Win32 API methods
Test-ServiceDaclPermission # tests one or more passed services or service names against a given permission set
Write-UserAddMSI # write out a MSI installer that prompts for a user to be added
7. Check ALL
Invoke-AllChecks # runs all current escalation checks and returns a reportAutorun
Detection
Exploitation
AlwaysInstallElevated
Detection
exploitation
Registry
Detection
Exploitation
Exec Path
Detection
Exploitation
Startup Applications
Detection
Exploitation
DLL Hijacking
Detection
Exploitation
BinPath
Detection
Exploitation
Unquoted Service Paths
Detection
Exploitation
Hot Potato
Exploitation
Configuration Files
Exploitation
Memory
Exploitation
Stuff
Last updated