Fix SMB signing detection when SMB1 is disabled #16326
Merged
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.
The smb_version module will detect whether or not the remote server requires SMB signatures. This information is relevant for certain classes of attacks. There exists a bug in the detection logic right now that causes servers that require signatures to be misclassified as not requiring signatures when the SMB 1 protocol version is not enabled. This is due to how the detection occurs. When SMB 1 is not enabled, the SMB 1 negotiation fails, leaving the
#peer_require_signing
flag in it's default state of false. These changes add thesigning_required
key to the info hash generated by#smb_proto_info
and ensure that it's only set from a successful negotiation.Verification
List the steps needed to make sure this thing works
Set-SmbServerConfiguration -EnableSMB1Protocol $false
)msfconsole
auxiliary/scanner/smb/smb_version
moduleExample