Added ARCH_POWER constant and fixed AIX payload modules

git-svn-id: file:///home/svn/framework3/trunk@5663 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Ramon de C Valle 2008-09-17 01:42:51 +00:00
parent e2027604e8
commit 58cef5775e
6 changed files with 11 additions and 9 deletions

View File

@ -52,8 +52,8 @@ module Exploit::Remote::SunRPC
# end
end
def sunrpc_call(proc, buf)
rpcobj.call(proc, buf)
def sunrpc_call(proc, buf, timeout=60)
rpcobj.call(proc, buf, timeout)
end
def sunrpc_destroy

View File

@ -68,6 +68,7 @@ ARCH_X86 = 'x86'
ARCH_MIPS = 'mips'
ARCH_MIPSLE = 'mipsle'
ARCH_MIPSBE = 'mipsbe'
ARCH_POWER = 'power'
ARCH_PPC = 'ppc'
ARCH_SPARC = 'sparc'
ARCH_CMD = 'cmd'
@ -80,6 +81,7 @@ ARCH_TYPES =
ARCH_MIPS,
ARCH_MIPSLE,
ARCH_MIPSBE,
ARCH_POWER,
ARCH_PPC,
ARCH_SPARC,
ARCH_ARMLE,

View File

@ -89,7 +89,7 @@ class Client
@pport = arr[5]
end
def call(procedure, buffer)
def call(procedure, buffer, timeout=60)
buf =
Rex::Encoder::XDR.encode(CALL, 2, @program, @version, procedure,
@auth_type, [@auth_data, 400], AUTH_NULL, '')+
@ -100,7 +100,7 @@ class Client
end
send_rpc(@call_sock, buf)
ret = recv_rpc(@call_sock)
ret = recv_rpc(@call_sock, timeout)
if ret
arr = Rex::Encoder::XDR.decode!(ret, Integer, Integer, Integer, String, Integer)
@ -220,8 +220,8 @@ class Client
sock.write(buf)
end
def recv_rpc(sock)
buf = sock.get(60) # 5 secs was WAY too slow for some RPC calls
def recv_rpc(sock, timeout=60)
buf = sock.get(timeout)
buf.slice!(0..3)
if sock.type?.eql?('tcp')
buf.slice!(0..3)

View File

@ -32,7 +32,7 @@ module ShellBindTcp
'Author' => 'Ramon de Carvalho Valle <ramon@risesecurity.org>',
'License' => MSF_LICENSE,
'Platform' => 'aix',
'Arch' => ARCH_X86,
'Arch' => ARCH_POWER,
'Handler' => Msf::Handler::BindTcp,
'Session' => Msf::Sessions::CommandShell,
'Payload' =>

View File

@ -32,7 +32,7 @@ module ShellFindPort
'Author' => 'Ramon de Carvalho Valle <ramon[at]risesecurity.org>',
'License' => MSF_LICENSE,
'Platform' => 'aix',
'Arch' => ARCH_X86,
'Arch' => ARCH_POWER,
'Handler' => Msf::Handler::FindPort,
'Session' => Msf::Sessions::CommandShell,
'Payload' =>

View File

@ -32,7 +32,7 @@ module ShellReverseTcp
'Author' => 'Ramon de Carvalho Valle <ramon[at]risesecurity.org>',
'License' => MSF_LICENSE,
'Platform' => 'aix',
'Arch' => ARCH_X86,
'Arch' => ARCH_POWER,
'Handler' => Msf::Handler::ReverseTcp,
'Session' => Msf::Sessions::CommandShell,
'Payload' =>