-
Notifications
You must be signed in to change notification settings - Fork 797
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
Exception when using rc4opsec and targeting SPN(s) with service names #43
Comments
Interesting, thanks for the report, I'll try to look into this soon once I can recreate. |
Fix for issue #43 - kerberoasting/TGS-REQ compatibility for SPNs with 3 parts.
This should now be fixed in the master branch as of f7c614e . I'm closing for now, but feel free to reopen if the fix doesn't work. |
Thanks for looking into this. Unfortunately it did not work. If it helps, the attacker machine and DC are both Server 2019 1809 and the domain/forest functional level is 2016. |
(I cannot reopen since you were the one that closed it) |
Sorry about that. The fix works for my test environment. The part that was erroring out was the TGS_REQ part that broke the requested sname into the appropriate parts https://github.com/GhostPack/Rubeus/blob/master/Rubeus/lib/krb_structures/TGS_REQ.cs#L67-L95 If you remove the |
If I'm understanding you correctly, I remove lines 83-91 and replace line 75 with your snippet. Doing that did not make a difference. |
However, in both cases (original fix and this fix), the error message is different:
|
I turned on Wireshark while running Rubeus and the Kerberos request showed that the SPN being requested was truncated in the CN=users... portion. The issue lies here: https://github.com/GhostPack/Rubeus/blob/master/Rubeus/lib/Roast.cs#L837 where the SPN is split by ",". I did a quick test by removing the split and performing the Ask.TGS against the SPN directly. This worked and I got a hash back that was recoverable to the expected plaintext. |
removed the SPN split on "," to support alternate SPN formats
This should now be fixed in master with a44c475 |
Situation: target user has an SPN set that has a form like "HTTP/computer.domain.local:10000/CN=Users,DC=domain,DC=local" (ex: https://docs.microsoft.com/en-us/windows/win32/ad/name-formats-for-unique-spns#replicable-services) and msDS-SupportedEncryptionTypes is not set. Rubeus kerberoasts as expected when run without any arguments but throws the following exception when run with rc4opsec:
Removing the the "/CN=Users,DC=domain,DC=local" portion resolves the issue.
Full output:
w/o rc4opsec
w/ rc4opsec
I've also experienced this issue in other environments, however the error was the same as #42 rather than the above.
The text was updated successfully, but these errors were encountered: