Rapid7

module

Microsoft Windows SMB to MSSQL Relay

Disclosed
N/A
Created
Nov 24, 2025

Description

This module supports running an SMB server which validates credentials, and then attempts to execute a relay
attack against an MSSQL server on the configured RHOSTS hosts.

If the relay succeeds, an MSSQL session to the target will be created. This can be used by any modules that
support MSSQL sessions, like `admin/mssql/mssql_enum`. The session can also be used to run arbitrary queries.

Supports SMBv2, SMBv3, and captures NTLMv1 as well as NTLMv2 hashes.
SMBv1 is not supported - please see https://github.com/rapid7/metasploit-framework/issues/16261

Author

Spencer McIntyre

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use auxiliary/server/relay/smb_to_mssql
msf auxiliary(smb_to_mssql) > show actions
...actions...
msf auxiliary(smb_to_mssql) > set ACTION < action-name >
msf auxiliary(smb_to_mssql) > show options
...show and set options...
msf auxiliary(smb_to_mssql) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.