Pennyw0rth / NetExec

The Network Execution Tool
https://netexec.wiki/
BSD 2-Clause "Simplified" License
3.27k stars 358 forks source link

Increase plaintext&hash login speeds #411

Closed NeffIsBack closed 1 month ago

NeffIsBack commented 2 months ago

This PR removes unnecessary recreation of connection initialization when a login has failed, we can just reuse that smb connection. As we don't need it with kerberos (and it would be a bit more complicated) it is not changed.

Also create_conn_obj() now checks if we already tested smbv1 and will choose the version accordingly for further connections, to eliminate the amount of connections.

This results in double the speed when testing credentials: Before (tested with a wordlist containing ~3,6k lines): image After: image