Skip to content

Add SMB_302 to possible SMB3 dialects - #2220

Open
NeffIsBack wants to merge 1 commit into
fortra:masterfrom
NeffIsBack:neff-fix-smb-negotiation
Open

Add SMB_302 to possible SMB3 dialects#2220
NeffIsBack wants to merge 1 commit into
fortra:masterfrom
NeffIsBack:neff-fix-smb-negotiation

Conversation

@NeffIsBack

@NeffIsBack NeffIsBack commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

With commit 8f81720 impacket will automatically negotiate SMB 3.1.1 which enforces signing. Since in NetExec we would still use unsigned SMB connections (e.g. for signing enforcement enumeration, see Pennyw0rth/NetExec#1292) I would like to be able to specify the latest non-signing required SMB dialect which is SMB 3.0.2. However, currently this is simply missing in the options to create an SMB3 connection and therefore fails.

Keep in mind that 8f81720 might also has affected impacket scripts or the relay server, but haven't tested those specifically.

Before&After:
image

@NeffIsBack

NeffIsBack commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@anadrianmanrique, @gabrielg5, @alexisbalbachan since this is quite a critical bug for NetExec, it would be nice if one of you could check this out (sorry for the ping if you already saw this).

EDIT:
We have fixed the problem without explicitly specifying a preferred dialect, so this is merely a bug fix now, no need to rush anything.

@NeffIsBack NeffIsBack mentioned this pull request Jun 29, 2026
14 tasks
@anadrianmanrique anadrianmanrique self-assigned this Jul 1, 2026
@anadrianmanrique anadrianmanrique added the in review This issue or pull request is being analyzed label Jul 1, 2026
@anadrianmanrique

Copy link
Copy Markdown
Collaborator

Hello, thanks for reporting the issue. Based on your report we've found a couple of additional potential issues in:

  • if (negResp['SecurityMode'] & SMB2_NEGOTIATE_SIGNING_REQUIRED) == SMB2_NEGOTIATE_SIGNING_REQUIRED or \
    where require signing it's activated as soon as 3.1.1 dialects it's detected.
  • impacket/smbconnection.py : methods listSnapshots(), createMountPoint(), removeMountPoint() which are currently checking the version dialect range in a non-consistent way
  • for ntlmrelay, impacket/examples/ntlmrelayx/clients/smbrelayclient.py:94 defaults to [SMB2_DIALECT_002, SMB2_DIALECT_21, SMB2_DIALECT_30]. Don't really know if SMB2_DIALECT_311 with signing disabled would work. It should probably be tested.

Given that you were able to solve the issue in your project, if you are ok, I will close this PR without margining it, and open a new one addressing the above mentioned issues.

Thanks!

@anadrianmanrique anadrianmanrique added the waiting for response Further information is needed from people who opened the issue or pull request label Jul 8, 2026
@NeffIsBack

Copy link
Copy Markdown
Contributor Author

Absolutely! If you have a better way of fixing it (and even make signing checking more reliable/straight forward in the process) feel free to close!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review This issue or pull request is being analyzed waiting for response Further information is needed from people who opened the issue or pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants