Skip to content
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

kerberos brute: 'generator' object is not subscriptable #142

Open
exploide opened this issue Dec 10, 2023 · 3 comments
Open

kerberos brute: 'generator' object is not subscriptable #142

exploide opened this issue Dec 10, 2023 · 3 comments

Comments

@exploide
Copy link

Trying to brute-force usernames currently results in an error:

> pypykatz kerberos brute dc.test.local Administrator@test.local
[KERBEROS][BRUTE] Error while enumerating users! Reason: 'generator' object is not subscriptable
  File "/home/user/.local/pipx/venvs/pypykatz/lib64/python3.12/site-packages/pypykatz/kerberos/kerberos.py", line 182, in brute
    realm = targets[0].realm
            ~~~~~~~^^^
@skelsec
Copy link
Owner

skelsec commented Jan 22, 2024

Wow, I believe you're the only person used that feature in years. Thanks for the issue, it will be fixed in the next release!

@mmutj
Copy link

mmutj commented Feb 21, 2024

same error on kerberos spnroast. @skelsec

pypykatz kerberos spnroast 'kerberos+password://HTB.LOCAL\amanda:Ashare1972@10.10.10.103' -t 'mrlky' -e 23 -d htb.local
[KERBEROS][SPNROAST] Error! Reason: 'generator' object is not subscriptable
  File "/usr/lib/python3/dist-packages/pypykatz/kerberos/kerberos.py", line 249, in spnroast
    kdomain = targets[0].domain
              ~~~~~~~^^^

Wow, I believe you're the only person used that feature in years. Thanks for the issue, it will be fixed in the next release!

@sechvn
Copy link

sechvn commented Jul 12, 2024

For anyone who is getting the above errors, specifically with trying to use the kerberos function, just copy out the code into a text editor of choice or vim, and find the kerberoas spn roast function and add the following above the 'kdomain = targets[0].domain: targets = list(targets)

This will fix the issue. I'm assuming a similar fix will also work for the brute function of the tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants