Weak service permissions occur when a service's configuration or binary can be modified by non-administrative users. This allows us to either replace the service binary with a malicious one, or change the service's configuration to point to our payload.
Think of it like having write access to a security guard's instruction manual. You can tell the guard (running as SYSTEM) to do whatever you want - including giving you the master keys.
Two Attack Vectors
Weak permissions can apply to: (1) the service binary file itself, or (2) the service configuration in the registry. Both lead to SYSTEM access, but exploitation differs.
Finding Weak Permissions
Weak Binary Permissions
Weak Service Configuration
accesschk is Essential
Always upload accesschk.exe for permission checking. It's part of Sysinternals and isn't flagged as malicious by most AV.
Binary Replacement Attack
Using PowerUp for Binary Replacement
Configuration Modification Attack
Using PowerUp for Config Abuse
Service May Fail to Start
After changing binPath to a command or non-service binary, the service will fail to start properly. But the command/binary still executes as SYSTEM once! Plan for this.
Triggering the Service
Cleanup and Restoration
Exploitation Methodology
Weak Service Permissions Exploitation
1
Enumerateaccesschk for service and file permissions
2
IdentifyFind services we can modify or binaries we can replace
3
Verify SYSTEMCheck SERVICE_START_NAME is LocalSystem
4
BackupSave original binary/config for cleanup
5
PayloadCreate malicious binary or command
6
ModifyReplace binary or change binPath
7
TriggerRestart service or wait for reboot
8
AccessCatch shell or verify admin access
Knowledge Check
Challenges
Key Takeaways
- Weak binary permissions = replace the service executable
- Weak service permissions = change the binPath configuration
- SERVICE_CHANGE_CONFIG or file Modify (M) enables exploitation
- Service must run as LocalSystem for SYSTEM access
- PowerUp automates both enumeration and exploitation
- Always backup originals for cleanup