diff --git a/lib/msf/core/exploit/sunrpc.rb b/lib/msf/core/exploit/sunrpc.rb index 898ba9d545..4155df3861 100644 --- a/lib/msf/core/exploit/sunrpc.rb +++ b/lib/msf/core/exploit/sunrpc.rb @@ -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 diff --git a/lib/rex/constants.rb b/lib/rex/constants.rb index 35b66a53b2..4bc5d585f5 100644 --- a/lib/rex/constants.rb +++ b/lib/rex/constants.rb @@ -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, diff --git a/lib/rex/proto/sunrpc/client.rb b/lib/rex/proto/sunrpc/client.rb index 157abd8733..60d5bed870 100644 --- a/lib/rex/proto/sunrpc/client.rb +++ b/lib/rex/proto/sunrpc/client.rb @@ -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) diff --git a/modules/payloads/singles/aix/power/shell_bind_tcp.rb b/modules/payloads/singles/aix/power/shell_bind_tcp.rb index f47c089580..e0664db308 100644 --- a/modules/payloads/singles/aix/power/shell_bind_tcp.rb +++ b/modules/payloads/singles/aix/power/shell_bind_tcp.rb @@ -32,7 +32,7 @@ module ShellBindTcp 'Author' => 'Ramon de Carvalho Valle ', 'License' => MSF_LICENSE, 'Platform' => 'aix', - 'Arch' => ARCH_X86, + 'Arch' => ARCH_POWER, 'Handler' => Msf::Handler::BindTcp, 'Session' => Msf::Sessions::CommandShell, 'Payload' => diff --git a/modules/payloads/singles/aix/power/shell_find_port.rb b/modules/payloads/singles/aix/power/shell_find_port.rb index 813a5c8e7b..9aa71a4e2a 100644 --- a/modules/payloads/singles/aix/power/shell_find_port.rb +++ b/modules/payloads/singles/aix/power/shell_find_port.rb @@ -32,7 +32,7 @@ module ShellFindPort 'Author' => 'Ramon de Carvalho Valle ', 'License' => MSF_LICENSE, 'Platform' => 'aix', - 'Arch' => ARCH_X86, + 'Arch' => ARCH_POWER, 'Handler' => Msf::Handler::FindPort, 'Session' => Msf::Sessions::CommandShell, 'Payload' => diff --git a/modules/payloads/singles/aix/power/shell_reverse_tcp.rb b/modules/payloads/singles/aix/power/shell_reverse_tcp.rb index 8f2386ae8c..986414090c 100644 --- a/modules/payloads/singles/aix/power/shell_reverse_tcp.rb +++ b/modules/payloads/singles/aix/power/shell_reverse_tcp.rb @@ -32,7 +32,7 @@ module ShellReverseTcp 'Author' => 'Ramon de Carvalho Valle ', 'License' => MSF_LICENSE, 'Platform' => 'aix', - 'Arch' => ARCH_X86, + 'Arch' => ARCH_POWER, 'Handler' => Msf::Handler::ReverseTcp, 'Session' => Msf::Sessions::CommandShell, 'Payload' =>