Insecure service permission
Last updated
Last updated
This vulnerability is based on the mis-configuration on the service's permission, rather than the service's executable itself.
Given a service with insecure permission allowing us to change the configurations, it can be exploited to change the executable to one defined by us.
The following command allows us to view the service permissions using the AcessChk
tool:
Eg. Suppose there is a vulnerable service named vuln_service
:
The following shows that the BUILTIN\Users
group has the SERVICE_ALL_ACCESS
permission, which means that any user can configure the service.
After creating an executable payload with msfvenom
, and granting the appropriate permission on the created executable (usually full access (F)
for the Everyone
group). The associated executable and account for the vulnerable service can be updated.
To grant full access (F) to a binary for the Everyone group:
The following sets the vuln_service
service associated executable to the attacker created path, and the account to LocalSystem
(highest privileged account available).
Take note of the space after the equals sign (=) for the options passed to the
sc
command