Skip to content

Commit d53f42c

Browse files
committed
Support relaying to MSSQL server that require TLS
1 parent 865aca3 commit d53f42c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/msf/core/exploit/remote/smb/relay/ntlm/target/mssql/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def relay_ntlmssp_type1(client_type1_msg)
4343
pkt_hdr.packet_length += pkt_body.num_bytes
4444
pkt = pkt_hdr.to_binary_s + pkt_body.to_binary_s
4545

46+
@mstds_channel.starttls if tdsencryption
47+
4648
resp = mssql_send_recv(pkt, @timeout, false)
4749
server_type2_message = resp[3..-1]
4850

lib/msf/core/exploit/remote/smb/relay_server.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def start_service(_opts = {})
143143
}
144144
}
145145
)
146+
rescue Errno::EACCES => e
147+
fail_with(Msf::Module::Failure::BadConfig, "Failed to create the relay server: #{e.to_s}")
146148
end
147149

148150
def relay_targets

0 commit comments

Comments
 (0)