Skip to content

Commit cfd2eda

Browse files
committed
Adds support to http scanners for network capture decryption
1 parent b74860a commit cfd2eda

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ def create_client(opts)
334334
rport = opts['rport'] || port
335335
cli_ssl = opts['ssl'] || ssl
336336
cli_ssl_version = opts['ssl_version'] || ssl_version
337+
cli_sslkeylogfile = opts['SSLKeyLogFile'] || sslkeylogfile
337338
cli_proxies = opts['proxies'] || proxies
338339
username = opts['credential'] ? opts['credential'].public : http_username
339340
password = opts['credential'] ? opts['credential'].private : http_password
@@ -357,7 +358,8 @@ def create_client(opts)
357358
username,
358359
password,
359360
kerberos_authenticator: kerberos_authenticator,
360-
subscriber: http_logger_subscriber
361+
subscriber: http_logger_subscriber,
362+
sslkeylogfile: cli_sslkeylogfile
361363
)
362364
configure_http_client(cli)
363365

lib/metasploit/framework/login_scanner/rex_socket.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module RexSocket
2121
# @!attribute ssl_verify_mode
2222
# @return [String] the SSL certification verification mechanism
2323
attr_accessor :ssl_verify_mode
24+
# @!attribute sslkeylogfile
25+
# @return [String, nil] The SSL key log file path
26+
attr_accessor :sslkeylogfile
2427
# @!attribute ssl_cipher
2528
# @return [String] The SSL cipher to use for the context
2629
attr_accessor :ssl_cipher

lib/msf/core/auxiliary/login_scanner.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def configure_login_scanner(conf)
2020
proxies: datastore['Proxies'],
2121
stop_on_success: datastore['STOP_ON_SUCCESS'],
2222
bruteforce_speed: datastore['BRUTEFORCE_SPEED'],
23+
sslkeylogfile: datastore['SSLKeyLogFile'],
2324
framework: framework,
2425
framework_module: self,
2526
local_port: datastore['CPORT'],

lib/rex/proto/http/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def connect(t = -1)
184184
'Context' => context,
185185
'SSL' => ssl,
186186
'SSLVersion' => ssl_version,
187-
'SSLKeyLogFile' => sslkeylogfile,
187+
'SSLKeyLogFile' => config['SSLKeyLogFile'] || sslkeylogfile,
188188
'Proxies' => proxies,
189189
'Timeout' => timeout,
190190
'Comm' => comm

0 commit comments

Comments
 (0)