Closed Script-Nomad closed 3 years ago
Hey there, thank you for your PR. Current work is being done on version 3.0.0 (see associated branch), and the tool has been re-written from scratch. I just added your timeout to SMB connection in here: https://github.com/Hackndo/lsassy/commit/354d2d5500e0579605e544b3e61be14e4208204d If you want, you can try it out and tell me if it works for you. Cheerz
Lol, sadly, the host I was testing this on is no longer live, so it looks like my temporary development environment just walked out of his office.
After looking at the code though, I think this achieves the same goals. I only separated the nmb-timeout from the lsassy timeout since I wasn't sure what else that timeout value would affect. In any case, I'm totally fine with this. Looking forward to the 3.0.0 release :+1:
This PR adds a new argument to the CLI for LSASSY to support specifying a nmb/smb connection timeout value for Impacket in order to better support slow connections such as with proxychains.
My specific situation was that I was able to establish a meterpreter shell on a remote network
I made a couple changes. First, there is adding the -nmb-timeout argument, which gets forwarded to the
ImpacketConnection.Options()
and is passed as thetimeout
value for all impacket connections going forward. By default, this timeout value is 5, which is fine for most stable connections, but not for proxychaining.I also modified the fileRead() function so that it will raise an exception if the NetBIOSTimeout is encountered so that the user can be notified and change their arguments accordingly. Further, I've modified the default argument for
-nmb-timeout
to 10 seconds, which is plenty of time for most proxy chains. Here is an example with a second proxy in the chain just to demonstrate that it works.Note: Had some dirty files from merging the latest lsassy in the PR. Those can be squashed.