fortra / impacket

Impacket is a collection of Python classes for working with network protocols.

Home Page:https://www.coresecurity.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

smbserver: folders with >550 files kill clients

9001 opened this issue · comments

commented

Configuration

impacket version: 0.10.0
Python version: 3.10.7
Target OS: windows 10, smb2

Debug Output With Command String

./smbserver.py -username ed -password k -ts -debug -ip 192.168.123.1 -port 3945 -smb2support a /home/ed/dl
(no relevant debug output)

Additional context

ran into an issue with examples/smbserver.py trying to list large directories,

returning more than 550 files causes samba to hit an assert and crash (libsmb/cli_smb2_fnum.c(1497): response->length > state->offset), and win10 will freeze for a sec before it shows a generic <unc> is not accessible error

depending on filename-lengths etc, had to clamp the number of files to return from findFirst2 down to like 300 or so