Abusing Services
A service is basically an executable that runs in the background. When configuring a service, you define which executable will be used and select if the service will automatically run when the machine starts or should be manually started.
Creating backdoor services
First, lets create a reverse shell using msfvenom.
Transfer and save this reverse shell into c:\windows and create new service pointing to this revshell.
Modifying existing services
Instead of creating new service, we can reuse an existing service to avoid detection.
List available services using
After finding the desired service, query the configuration as.
The key things to look here are,
START_TYPE
BINARY_PATH_NAME
SERVICE_START_NAME
This service auto executes C:\MyService\newservice.exe
under the LocalService (Low Privilege) account.
Lets change the Binary path to point to our revshell executable we created using msfvenom and run it as LocalSystem (Highest Privilege).
Then we can stop and start the service as
Last updated
Was this helpful?