Giter Site home page Giter Site logo

"UnboundLocalError: local variable 'tgt' referenced before assignment" error when requesting a TGT for the Kerberos account KRBTGT about certipy HOT 4 CLOSED

ly4k avatar ly4k commented on July 28, 2024
"UnboundLocalError: local variable 'tgt' referenced before assignment" error when requesting a TGT for the Kerberos account KRBTGT

from certipy.

Comments (4)

ly4k avatar ly4k commented on July 28, 2024

First of all, great explanation. I could identify the bug immediately.

I tried requesting a TGT for the KRBTGT account, and Windows won't allow that. Kerberos actually throws an error, but in my error handling, I accidentally forgot to return upon other errors than CLIENT_MISMATCH. So because the TGT request fails for the KRBTGT, the "tgt" variable never gets set, but it doesn't exit either. It should print the error and exit. I'll fix it.

Thank you!

from certipy.

ly4k avatar ly4k commented on July 28, 2024

Also, a password change won't affect your certificate. Your certificate will still work for authentication, even if the password is changed. Only when the certificate is revoked or expired will it no longer work. I would simply target a domain administrator, and if you want the KRBTGT account, you could extract the hash from here.

from certipy.

jsdhasfeds avatar jsdhasfeds commented on July 28, 2024

No problem. I have many plans for your tool! :)

I tested requesting a certificate for the Kerberos account using the original Windows binary executed on a domain-joined Windows 10 machine in the same environment as before and using the same account as before and then it works.

However, I do not want to be forced to use a domain-joined machine that also likely is running AV so I very much prefer your tool.

image

from certipy.

ly4k avatar ly4k commented on July 28, 2024

Yes, it's possible to request the certificate. But when requesting a TGT using the certificate, you'll get an error. It's also possible to request certificates for disabled and non-existing accounts, but it's not possible to get a TGT for these accounts as well.

Your issue is fixed in #ce7ee7cdcbaf12f86d28179bd8a61808498f06cd

from certipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.