Repository navigation
Conversation
|
Thanks for the PR @Ramzeth. CCing @the-useless-one as well since he's been working on something related and it's time to nail this down (sorry it's taking so long @the-useless-one). So let's do a little bit of brainstorming (other's welcomed). I need to think a little bit more, but I'd like to come up with a solution that doesn't change the current APIs and I think we actually can. The Finally, we would need to craft some test cases so we're sure we're covering them on all the flavors supported inside the library (i.e. I see changes in As I said before.. I need to analyze better your code along with @the-useless-one one as well. I'll try to do this within the next few weeks. In the meantime, feedback's welcomed. |
|
Sorry for long reply. So i made some changes:
But anyway this changes covers only 2 of all protocols. And as before, i tested this only on I think there should be next test cases for every tested protocol:
|
|
Hi, has this branch still being considered for merge? Or does another commit/branch (that has been merged) address adding cross-realm ticket support? |
|
@azoxlpf this is the exact thing we have been looking for. So far Impacket doesnt support RTGT thing |
|
merged in #2351. Thanks you! |
There is possibility to craft and use refferal TGT (hereinafter RTGT) to authenticate across AD trusts. More info about RTGT is here - https://adsecurity.org/?p=1588
It is possible to use those RTGT in linux environment, with impacket, but there are changes have to be done.
Impacket can use normal TGT (Golden Ticket) but fails to use RTGT because there a litte difference between them:
Normal TGT has SPN: krbtgt/domain.com@domain.com. As you can see origin and target domains are the same, because TGT was intended to be used in the same domain where it was crafted.
RTGT has SPN: krbtgt/domain2.com@domain1.com.
So while using RTGT you should strictly distinguish userDomain and targetDomain.
Unfortunately impacket fails with that. The only one domain name is used which results in authentication errors:
smbclient.py -k domain2.com/user@host.domain2.com -no-passSo i've added this userDomain and targetDomain distinctions to code.
I've only tested it with smbclient.py (SMB3) and atexec.py.
I've also tested smbclient.py and atexec.py with usual (Golden) TGT, and there were no errors.