Change the timeout from 0
git-svn-id: file:///home/svn/framework3/trunk@9750 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
adf33feb0e
commit
42f8dc10c0
|
@ -10,7 +10,7 @@ module Msf
|
|||
#
|
||||
# This mixin provides utility methods for interacting with a DCERPC service on
|
||||
# a remote machine. These methods may generally be useful in the context of
|
||||
# exploitation. This mixin extends the Tcp exploit mixin. Only one DCERPC
|
||||
# exploitation. This mixin extends the Tcp exploit mixin. Only one DCERPC
|
||||
# service can be accessed at a time using this class.
|
||||
#
|
||||
###
|
||||
|
@ -26,15 +26,15 @@ module Exploit::Remote::DCERPC
|
|||
|
||||
# Support TCP-based RPC services
|
||||
include Exploit::Remote::Tcp
|
||||
|
||||
# Helper methods for specific services
|
||||
|
||||
# Helper methods for specific services
|
||||
include Exploit::Remote::DCERPC_EPM
|
||||
include Exploit::Remote::DCERPC_MGMT
|
||||
include Exploit::Remote::DCERPC_LSA
|
||||
|
||||
|
||||
def initialize(info = {})
|
||||
super
|
||||
|
||||
|
||||
register_evasion_options(
|
||||
[
|
||||
OptInt.new('DCERPC::max_frag_size', [ true, 'Set the DCERPC packet fragmentation size', 4096]),
|
||||
|
@ -42,7 +42,7 @@ module Exploit::Remote::DCERPC
|
|||
OptInt.new('DCERPC::fake_bind_multi_prepend', [ false, 'Set the number of UUIDs to prepend before the target', 0]),
|
||||
OptInt.new('DCERPC::fake_bind_multi_append', [ false, 'Set the number of UUIDs to append the target', 0]),
|
||||
OptEnum.new('DCERPC::smb_pipeio', [ false, 'Use a different delivery method for accessing named pipes', 'rw', ['rw', 'trans']] )
|
||||
|
||||
|
||||
], Msf::Exploit::Remote::DCERPC)
|
||||
|
||||
register_options(
|
||||
|
@ -53,8 +53,8 @@ module Exploit::Remote::DCERPC
|
|||
|
||||
register_advanced_options(
|
||||
[
|
||||
OptInt.new('DCERPC::ReadTimeout', [ true, 'The number of seconds to wait for DCERPC responses', 0] )
|
||||
], Msf::Exploit::Remote::DCERPC)
|
||||
OptInt.new('DCERPC::ReadTimeout', [ true, 'The number of seconds to wait for DCERPC responses', 10] )
|
||||
], Msf::Exploit::Remote::DCERPC)
|
||||
|
||||
end
|
||||
|
||||
|
@ -71,27 +71,27 @@ module Exploit::Remote::DCERPC
|
|||
|
||||
if datastore['DCERPC::fake_bind_multi']
|
||||
opts['fake_multi_bind'] = 1
|
||||
|
||||
|
||||
if datastore['DCERPC::fake_bind_multi_prepend']
|
||||
opts['fake_multi_bind_prepend'] = datastore['DCERPC::fake_bind_multi_prepend']
|
||||
end
|
||||
|
||||
|
||||
if datastore['DCERPC::fake_bind_multi_append']
|
||||
opts['fake_multi_bind_append'] = datastore['DCERPC::fake_bind_multi_append']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
opts['connect_timeout'] = (datastore['ConnectTimeout'] || 10).to_i
|
||||
|
||||
|
||||
opts['read_timeout'] = (datastore['DCERPC::ReadTimeout'] || 10).to_i
|
||||
|
||||
|
||||
|
||||
|
||||
# Configure the SMB evasion options
|
||||
|
||||
|
||||
if (datastore['SMBUser'])
|
||||
opts['smb_user'] = datastore['SMBUser']
|
||||
end
|
||||
|
||||
|
||||
if (datastore['SMBPass'])
|
||||
opts['smb_pass'] = datastore['SMBPass']
|
||||
end
|
||||
|
@ -99,7 +99,7 @@ module Exploit::Remote::DCERPC
|
|||
if (datastore['DCERPC::smb_pipeio'])
|
||||
opts['smb_pipeio'] = datastore['DCERPC::smb_pipeio']
|
||||
end
|
||||
|
||||
|
||||
if (datastore['SMB::pipe_write_min_size'])
|
||||
opts['pipe_write_min_size'] = datastore['SMB::pipe_write_min_size']
|
||||
end
|
||||
|
@ -119,8 +119,8 @@ module Exploit::Remote::DCERPC
|
|||
if (self.respond_to?('simple') and self.simple)
|
||||
opts['smb_client'] = self.simple
|
||||
end
|
||||
|
||||
# Create the DCERPC client
|
||||
|
||||
# Create the DCERPC client
|
||||
self.dcerpc = Rex::Proto::DCERPC::Client.new(h, self.sock, opts)
|
||||
|
||||
if (self.handle.protocol == 'ncacn_np' and not self.simple)
|
||||
|
@ -130,7 +130,7 @@ module Exploit::Remote::DCERPC
|
|||
|
||||
def dcerpc_call(function, stub = '', timeout=nil)
|
||||
otimeout = dcerpc.options['read_timeout']
|
||||
|
||||
|
||||
begin
|
||||
dcerpc.options['read_timeout'] = timeout if timeout
|
||||
dcerpc.call(function, stub)
|
||||
|
@ -146,10 +146,11 @@ module Exploit::Remote::DCERPC
|
|||
def unicode(str)
|
||||
Rex::Text.to_unicode(str)
|
||||
end
|
||||
|
||||
|
||||
# Useful accessors for tracking DCERPC state
|
||||
attr_accessor :handle, :dcerpc
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue