Skip to content

Commit f8203b8

Browse files
committed
Remove the old MS-TDS SSL Proxy code
1 parent 6fe2d16 commit f8203b8

File tree

2 files changed

+3
-160
lines changed

2 files changed

+3
-160
lines changed

lib/metasploit/framework/mssql/tdssslproxy.rb

Lines changed: 0 additions & 145 deletions
This file was deleted.

lib/rex/proto/mssql/client.rb

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,7 @@ def mssql_login(user='sa', pass='', db='', domain_name='')
372372
# has a strange behavior that differs from the specifications
373373
# upon receiving the ntlm_negociate request it send an ntlm_challenge but the status flag of the tds packet header
374374
# is set to STATUS_NORMAL and not STATUS_END_OF_MESSAGE, then internally it waits for the ntlm_authentification
375-
if tdsencryption == true
376-
#proxy = TDSSSLProxy.new(sock, sslkeylogfile: sslkeylogfile)
377-
#proxy.setup_ssl
378-
#resp = proxy.send_recv(pkt)
379-
@mstds_channel.starttls
380-
end
375+
@mstds_channel.starttls if tdsencryption
381376
resp = mssql_send_recv(pkt, 15, false)
382377

383378
# Strip the TDS header
@@ -484,15 +479,8 @@ def mssql_login(user='sa', pass='', db='', domain_name='')
484479
# Packet header and total length including header
485480
pkt = "\x10\x01" + [pkt.length + 8].pack('n') + [0].pack('n') + [1].pack('C') + "\x00" + pkt
486481

487-
if self.tdsencryption == true
488-
proxy = TDSSSLProxy.new(sock, sslkeylogfile: sslkeylogfile)
489-
proxy.setup_ssl
490-
resp = mssql_ssl_send_recv(pkt, proxy)
491-
proxy.cleanup
492-
proxy = nil
493-
else
494-
resp = mssql_send_recv(pkt)
495-
end
482+
@mstds_channel.starttls if tdsencryption
483+
resp = mssql_send_recv(pkt)
496484

497485
end
498486

0 commit comments

Comments
 (0)