-
Notifications
You must be signed in to change notification settings - Fork 396
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
switch default conn from smbv1 to smbv3 #534
Conversation
This logic is much make sense! When SMBv3 failed, then fallback to SMBv1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget test with server 2003 |
Why? It can communicate over SMBv3 or not? |
Server 2003 is not support SMBv3, that is why I ask need to test with server 2003 XD, BTW I will test it TMR |
Description
As we all know, making connections with SMBv1 often causes errors like "connection reset by peer" or "broken pipe." This is why the
--no-smbv1
flag was added by @XiaoliChanCurrently, the reason SMBv1 is checked in the first place is to determine the host info line smbv1: True/False. This is the only reason. However, if a connection with SMBv1 is successful, it will be used for all subsequent operations on the host (self.conn)
The idea: Why not use SMBv3 by default (and then fall back to SMBv1 if SMBv3 fails, essentially doing the opposite of what is done today) and perform a simple check for smbv1: True/False on the host without relying on self.conn (an independent check)
This approach would make Netexec much more reliable i think 💪
Type of change
How Has This Been Tested?
Against goad lab
Screenshots (if appropriate):
Checklist:
poetry run python -m ruff check . --preview
, use--fix
to automatically fix what it can)