ShutdownRepo / pywhisker

Python version of the C# tool for "Shadow Credentials" attacks
GNU General Public License v3.0
577 stars 65 forks source link

Fix error when ccache is None #15

Closed AetherBlack closed 1 month ago

AetherBlack commented 9 months ago

Hello,

I came across an issue when using the tool with kerberos authentication. Here is the command I used:

python3 pywhisker.py -vv -d domain.intra -u "user" -p 'password' -t 'target' -a 'add' --use-ldaps -k
image

It seems that the CCache.loadFile function returns None if the fileName argument passed is None.

image

see https://github.com/fortra/impacket/blob/master/impacket/krb5/ccache.py#L581

To avoid this error, I added a check on the ccache variable.

ShutdownRepo commented 1 month ago

Thank you for your contribution I'm sorry you had to wait this long for a review, I couldn't find the time lately...