the-useless-one / pywerview

A (partial) Python rewriting of PowerSploit's PowerView
GNU General Public License v3.0
924 stars 114 forks source link

When using TLS pywerview attempts to fall back to TLS infinitely #67

Closed jsherwood0 closed 2 months ago

jsherwood0 commented 2 months ago

STEPS TO REPEAT

1) Run pywerview using the following parameters (where $ADDOM is the domain name, $DCIP is the IP address of the domain controller, $UNAME is any username, and $PWORD is any password that fails authentication.):

pywerview get-netou --tls -d "$ADDOM" --ouname 'AD' -t "$DCIP" -w "$ADDOM" -u "$UNAME" -p '$PWORD' --json

Results: pywerview continues to fallback into TLS until you receive the error message RecursionError: maximum recursion depth exceeded.

Expected results: pywerview understands that ldap3.core.exceptions.LDAPInvalidCredentialsResult cannot be resolved by falling back to TLS if we got it when trying TLS.

NOTE: A pull request with the fix for this has already been submitted in pull request #66

ThePirateWhoSmellsOfSunflowers commented 2 months ago

fixed with #66 thanks,

:sunflower: