you can handcode some shellcode or use your favorite pentesting framework like canvas or metasploit[ to generate it for you picked some windows callback shellcode for canvas in my case store the raw shellcode (not the string buffer!in /tmp/shellcode raw on your linux machine and run the followingjustinbase - shellcode raw shellcode bin justinpython - simplehttpserver serving http on port we simply base -encoded the shellcode using the standard linux command line the next little trick uses the simplehttpserver module to treat your current working directory (in our case/tmp/as its web root any requests for files will be served automatically for you now drop your shell_exec py script in your windows vm and execute it you should see the following in your linux terminal [ /jan/ : : "get /shellcode bin http/ this indicates that your script has retrieved the shellcode from the simple web server that you set up using the simplehttpserver module if all goes wellyou'll receive shell back to your frameworkand have popped calc exeor displayed message box or whatever your shellcode was compiled for