Rapid7

module

Microsoft Windows SMB to LDAP Relay

Disclosed
N/A
Created
Mar 17, 2025

Description

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

It is not possible to relay NTLMv2 to LDAP due to the Message Integrity Check
(MIC). As a result, this will only work with NTLMv1. The module takes care of
removing the relevant flags to bypass signing.

If the relay succeeds, an LDAP session to the target will be created. This can
be used by any modules that support LDAP sessions, like `admin/ldap/rbcd` or
`auxiliary/gather/ldap_query`.

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

Authors

Spencer McIntyre
Christophe De La Fuente

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_ldap
msf auxiliary(smb_to_ldap) > show actions
...actions...
msf auxiliary(smb_to_ldap) > set ACTION < action-name >
msf auxiliary(smb_to_ldap) > show options
...show and set options...
msf auxiliary(smb_to_ldap) > 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.