Fix the smb_to_ldap module's missing target option #20118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When PR #19639 was landed it removed the
RELAY_TARGETS
datastore option because it was no longer necessary and instead changed the pattern to useRHOSTS
as most modules do. That particular PR took a while to land and in the mean time thesmb_to_ldap
relay module was submitted. By the time RELAY_TARGETS were removed, the smb_to_ldap module had already been landed but had not been updated resulting in it currently being broken. This PR fixes thesmb_to_ldap
module by registering the RHOSTS option.Verification
List the steps needed to make sure this thing works
msfconsole
use auxiliary/server/relay/smb_to_ldap
set RHOSTS
to the LDAP serverFor the victim system that is being relayed from, the original PR #19832 has a helpful note about how to make it vulnerable:
I found this insufficient however. A Windows 11 24H2 build 26100 system wasn't able to work. I was able to get a Server 2019 v1809 build 17763 server to work though. My best guess is that instructions require a system less than something between builds 17763 and 26100. @jheysel-r7 noted that his test system at the time was build 19045, so more accurately, it's probably 19045 - 26100.