Add standalone --generate-st#1239
Conversation
NeffIsBack
left a comment
There was a problem hiding this comment.
As always, thanks for the PR!
So my thoughts on this: Wouldn't it make sense if we would modify&PR to impacket that the generated/used ST in the kerberos authentication is set as self.__TGS and we simply exract that after successful auth and store it? Otherwise we would 1. do a second authentication attempt and 2. there is a lot of room for error when trying to recreate the original handshake (e.g. trust auth etc.).
Thoughts guys?
I agree storing the ST already obtains in |
Description
Following the discussion on #1224, this change extends
--generate-stso you can request a normal service ticket for any SPN (TGT + getKerberosTGS, same idea as Impacket’s getST.py) without--delegate, while keeping the existing S4U flow when--delegateis used. It also renames--delegate-spnto--spn, since that flag is no longer only about delegation, it is the SPN for both constrained-delegation/RBCD and plain ST export.Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
run nxc smb ip -u 'user' -p 'password' --generate-st user --spn 'CIFS/DC01.domain'
Screenshots (if appropriate):
With
--delegate:Without
--delegate:Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)