Weak Permissions
Here would be an examples of weak permissions abuse
Permissive File System ACLs
Running SharpUp
Tool: SharpUp from GhostPack to check for weak ACLs.
Example vulnerable service:
Name: SecurityService
Path:
"C:\Program Files (x86)\PCProtect\SecurityService.exe"
Checking Permissions with icacls
icacls
Output shows
Everyone
andBUILTIN\Users
haveFull Control
.
Replacing Service Binary with malicious one
Replace with a malicious binary to gain SYSTEM privileges.
Weak Service Permissions
Checking Modifiable Services with SharpUp
Example vulnerable service:
Name: WindscribeService
Path:
"C:\Program Files (x86)\Windscribe\WindscribeService.exe"
Checking Permissions with accesschk
accesschk
NT AUTHORITY\Authenticated Users
hasSERVICE_ALL_ACCESS
(full control).
Changing the Service Binary Path
Grants user
ven17
administrator rights.
Stopping & Starting the Service
Executes the new binary path.
Confirming Privilege Escalation
Verify if
ven17
was added to the Administrators group.
Resetting the Binary Path (Cleanup)
Unquoted Service Path
If a service binary path is not enclosed in quotes, Windows may execute unintended binaries.
Example vulnerable service:
Windows may execute:
C:\Program.exe
C:\Program Files\System.exe
Finding Unquoted Service Paths
Permissive Registry ACLs
Checking for Weak Service ACLs in the Registry
Example vulnerable service: ModelManagerService
Allows modification of the
ImagePath
.
Changing ImagePath
with PowerShell
ImagePath
with PowerShellExecutes Netcat shell upon service start.
Modifiable Registry Autorun Binaries
Checking Startup Programs
If the attacker can modify a startup binary, they can execute malicious code on user login.
Last updated