Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does impacket-smbserver support smb 3.1.1 ? #1658

Open
jp-costa opened this issue Dec 7, 2023 · 1 comment
Open

Does impacket-smbserver support smb 3.1.1 ? #1658

jp-costa opened this issue Dec 7, 2023 · 1 comment

Comments

@jp-costa
Copy link

jp-costa commented Dec 7, 2023

I saw from #1373 that there is support for accessing smbv3.1.1 shares programmatically. Is it also possible to use impacket-smbserver with a client that is limited to use smb 3.1.1?

on my windows client I forced smb to use 3.1.1 with:

PS C:\Windows\system32> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "MinSMB2Dialect" -Value 0x000000311
PS C:\Windows\system32> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "MaxSMB2Dialect" -Value 0x000000311

Then I started impacket-smbserver, but i am unable to browse the share.
Is this to be expected or am i doing something wrong?

㉿kali02)-[~]
└─$ impacket-smbserver -smb2support kali . -username test -password test
Impacket v0.11.0 - Copyright 2023 Fortra

[*] Config file parsed
[*] Callback added for UUID 4B324FC8-1670-01D3-1278-5A47BF6EE188 V:3.0
[*] Callback added for UUID 6BFFD098-A112-3610-9833-46C3F87E345A V:1.0
[*] Config file parsed
[*] Config file parsed
[*] Config file parsed
[*] Incoming connection (192.168.100.5,50402)
[*] AUTHENTICATE_MESSAGE (VICTIM\User1,VICTIM)
[*] Could not authenticate user!
[*] Closing down connection (192.168.100.5,50402)
[*] Remaining connections []
[*] Incoming connection (192.168.100.5,50403)
[*] Closing down connection (192.168.100.5,50403)
[*] Remaining connections []
[*] Incoming connection (192.168.100.5,50404)
[*] Closing down connection (192.168.100.5,50404)
[*] Remaining connections []
[*] Incoming connection (192.168.100.5,50405)
[*] Closing down connection (192.168.100.5,50405)
[*] Remaining connections []
[*] Incoming connection (192.168.100.5,50406)
[*] Closing down connection (192.168.100.5,50406)
[*] Remaining connections []
[*] Incoming connection (192.168.100.5,50408)
[*] Closing down connection (192.168.100.5,50408)
[*] Remaining connections []
@NtAlexio2
Copy link
Contributor

probably you use wrong credentials for authentication. here is both client/server output for valid (test:test) and invalid (VICTIM\User1:test) credentials:

┌──(kali㉿kali)-[~]
└─$ impacket-smbserver -smb2support kali . -username test -password test
Impacket v0.11.0 - Copyright 2023 Fortra

[*] Config file parsed
[*] Callback added for UUID 4B324FC8-1670-01D3-1278-5A47BF6EE188 V:3.0
[*] Callback added for UUID 6BFFD098-A112-3610-9833-46C3F87E345A V:1.0
[*] Config file parsed
[*] Config file parsed
[*] Config file parsed
[*] Incoming connection (10.0.0.4,55250)
[*] AUTHENTICATE_MESSAGE (\test,)
[*] User \test authenticated successfully
[*] test:::aaaaaaaaaaaaaaaa:5499b5ea278fae56fa6106e74314f861:010100000000000000def60a0f44da01775646614d46396f0000000001001000690059004e006a005400610075006a0003001000690059004e006a005400610075006a00020010006200410069007a005600420049007800040010006200410069007a0056004200490078000700080000def60a0f44da0109001a0063006900660073002f00690059004e006a005400610075006a000000000000000000
[*] Connecting Share(1:IPC$)
[*] NetrShareEnum Level: 1
[*] Connecting Share(2:KALI)
[*] Closing down connection (10.0.0.4,55250)
[*] Remaining connections []
[*] Incoming connection (10.0.0.4,55255)                                                                   
[*] AUTHENTICATE_MESSAGE (\VICTIM\User1,)                                                                  
[*] Could not authenticate user!
[*] Closing down connection (10.0.0.4,55255)
[*] Remaining connections []

(I forced smbclient.py to use SMB3.1.1)

C:\Python311\Scripts>python smbclient.py test:test@10.0.0.97
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

Type help for list of commands
# use KALI
# ls
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Downloads
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 .local
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 .gnupg
-rw-rw-rw-        807  Thu Nov 30 08:56:51 2023 .profile
-rw-rw-rw-      11759  Thu Nov 30 08:56:51 2023 .face.icon
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Templates
drw-rw-rw-       4096  Wed Jan 10 11:55:13 2024 .config
-rw-rw-rw-       5551  Thu Nov 30 08:56:51 2023 .bashrc
-rw-rw-rw-       4643  Wed Jan 10 11:24:16 2024 .xsession-errors.old
drw-rw-rw-       4096  Wed Jan 10 11:30:32 2024 .havoc
drw-rw-rw-       4096  Wed Jan 10 11:39:57 2024 .cache
drw-rw-rw-       4096  Thu Nov 30 08:56:51 2023 .java
-rw-rw-rw-      10868  Thu Nov 30 08:56:51 2023 .zshrc
-rw-rw-rw-      11759  Thu Nov 30 08:56:51 2023 .face
-rw-rw-rw-        206  Wed Jan 10 13:49:36 2024 .zsh_history
-rw-rw-rw-        220  Thu Nov 30 08:56:51 2023 .bash_logout
drw-rw-rw-       4096  Wed Jan 10 11:36:41 2024 Desktop
-rw-rw-rw-         35  Wed Jan 10 11:18:32 2024 .dmrc
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Music
-rw-rw-rw-       3526  Thu Nov 30 08:56:51 2023 .bashrc.original
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Public
-rw-rw-rw-         49  Wed Jan 10 12:02:52 2024 .Xauthority
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Pictures
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Videos
-rw-rw-rw-          0  Wed Jan 10 11:18:33 2024 .ICEauthority
-rw-rw-rw-        108  Wed Jan 10 11:18:48 2024 .xsessionrc
-rw-rw-rw-       5014  Wed Jan 10 12:02:55 2024 .xsession-errors
drw-rw-rw-       4096  Wed Jan 10 11:18:33 2024 Documents
# exit

C:\Python311\Scripts>python smbclient.py VICTIM\User1:test@10.0.0.97
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

[-] SMB SessionError: STATUS_LOGON_FAILURE(The attempted logon is invalid. This is either due to a bad username or authentication information.)

C:\Python311\Scripts>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants