You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 14, 2024. It is now read-only.
h4wkst3r edited this page Jan 5, 2020
·
2 revisions
Description
This persistence technique creates and registers a new service. In this module, you will supply a service name, and system command to execute by the service.
Privileges Required
Admin privileges
Arguments/Options Required
-c - command to execute
-a - arguments to command to execute (if applicable)
-n - service name
-m - method (add, remove, check, list)
Changes Made to Target System/Caveats
Adding New Service Persistence
Service is created and registered that will run automatically upon boot up and will run as SYSTEM
Needs to be ran as admin user in high integrity process (safe check for this)
Removing New Service Persistence
Service is deleted via the Service Control Manager (SCM).
Needs to be ran as admin user in high integrity process (safe check for this)
Usage/Examples
Adding New Service Persistence Trigger
SharPersist -t service -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Some Service" -m add
Removing New Service Persistence Trigger
SharPersist -t service -n "Some Service" -m remove
Perform Dry Run of New Service Persistence Trigger
SharPersist -t service -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Some Service" -m check