githubEdit

Weak Permissions

Weak Permissions

we can find it in open source application and Custom Applications

Permissive File System ACLs

Running SharpUp

we use this tool to check for service binaries suffering from weak ACLs.

PS C:\htb> .\SharpUp.exe audit

=== SharpUp: Running Privilege Escalation Checks ===

=== Modifiable Service Binaries ===

  Name             : SecurityService
  **DisplayName      : PC Security Management Service**
  Description      : Responsible for managing PC security
  State            : Stopped
  StartMode        : Auto
  **PathName         : "C:\Program Files (x86)\PCProtect\SecurityService.exe"**
  
  <SNIP>

The tool identifies the PC Security Management Service, which executes the SecurityService.exe binary when started.

Checking Permissions with icacls

we can verify the vulnerability and see that the EVERYONE and BUILTIN\Users groups have been granted full permissions to the directory, and therefore any unprivileged system user can manipulate the directory and its contents.

Replacing Service Binary

this service startable by unprivileged users

we can take a copy of this service(to clean up) and create a reverse shell then move it to the main file



Weak Service Permissions

in this case the problem not in ACL for service but in this service (Service control manager)

Reviewing SharpUp Again

We see the WindscribeService is potentially misconfigured.

Checking Permissions with AccessChk

to check permission of this service

we found all Auth Users have all access

Check Local Admin Group

Changing the Service Binary Path

Let's change it to add our user to the local administrator group.

Stopping & Starting Service

Confirming Local Admin Group Addition



Check Startup Programs