Land #18848, Add Proxies support to creating a session with mssql_login

This commit is contained in:
cgranleese-r7 2024-02-19 16:10:37 +00:00 committed by GitHub
commit 3be5988679
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -77,7 +77,7 @@ module Metasploit
}
begin
client = Rex::Proto::MSSQL::Client.new(framework_module, framework, host, port)
client = Rex::Proto::MSSQL::Client.new(framework_module, framework, host, port, proxies)
if client.mssql_login(credential.public, credential.private, '', credential.realm)
result_options[:status] = Metasploit::Model::Login::Status::SUCCESSFUL
if use_client_as_proof

View File

@ -43,7 +43,7 @@ module Rex
# @return [Integer] The delay between sending packets
attr_accessor :send_delay
def initialize(framework_module, framework, rhost, rport = 1433)
def initialize(framework_module, framework, rhost, rport = 1433, proxies = nil)
@framework_module = framework_module
@framework = framework
@connection_timeout = framework_module.datastore['ConnectTimeout'] || 30
@ -60,6 +60,7 @@ module Rex
@domain_controller_rhost = framework_module.datastore['DomainControllerRhost'] || ''
@rhost = rhost
@rport = rport
@proxies = proxies
end
#

View File

@ -33,6 +33,7 @@ class MetasploitModule < Msf::Auxiliary
}
)
register_options([
Opt::Proxies,
OptBool.new('TDSENCRYPTION', [ true, 'Use TLS/SSL for TDS data "Force Encryption"', false]),
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', false])
])