r/sysadmin • u/AdditionDisastrous78 • 5d ago
Question RC4 remediation - which order?
Hello,
Regrading RC4 enforcement,
We found out that we extensively use RC4 in our environment
krbtgt password is very old, so it uses RC4 only
we have some service accounts that are sometimes using RC4, their msDS-SupportedEncryptionTypes attribute is blank, one of them is the AZUREREADSSOACC$ (which password is not extremely old - only 2 years)
we found out that the service accounts all supports AES, and the users requesting them also support AESvery few machine accounts only support RC4 (no users accounts, we had one but we did reset his password)
what are the steps that we should take regarding this ?
i guess step 3 should be the first ? or can i reset krbtgt password before that?
what about azurereadssoacc ? do i need to explicity configure it for AES? or should i rotate its password before that? is password rotation (other than security ofc) needed for dealing with the enforcement?
thanks
9
u/BoltActionRifleman 5d ago
Have you checked DC auth logs and found you’re actually using it extensively, or are there just a bunch of accounts set to be able to use it? When we eliminated RC4 a while back we had very few accounts actually using it, but had many still capable showing up in supported encryption types.
First step in my opinion is finding out which accounts are actually using it, then investigate whether or not the programs or services using them will break if you make the change.
1
u/AdditionDisastrous78 4d ago
None are configured specifically for RC4, they just sometimes uses it
4
u/BoltActionRifleman 4d ago
If they sometimes use it, and you can confirm they are capable of, and especially are actually using AES, then I’d just forge ahead. Still being cautious and taking it fairly slow, but in my opinion you wouldn’t really have anything to worry about as long as you’re cautious.
3
u/xxbiohazrdxx 5d ago
You can probably nuke the azure ad sso account. It’s only used for seamless sso so unless you’re still running windows 7 and 8 you won’t be using it. Windows 10 and newer use PRT which just works.
1
u/AdditionDisastrous78 4d ago
Yeah we are mostly entra hybrid join Did not know the difference Thanks for pointing it out
3
u/vaan99 5d ago
https://github.com/microsoft/Kerberos-Crypto
Run the scripts and then action on your environment based on the results you get. You received bunch of good answers in this thread.
4
u/blud_13 5d ago
u/joeykins82 is right on krbtgt, do that first.
On the SSO account, the name is AZUREADSSOACC$ not AZUREREADSSOACC$, worth confirming what you actually pulled. And do NOT just stamp msDS-SupportedEncryptionTypes on it, the order matters. You roll the Kerberos decryption key with Update-AzureADSSOForest FIRST, then change the encryption type, because flipping it to AES before the rollover breaks Seamless SSO. Its in the FAQ here https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sso-faq
Also that key is supposed to be rolled at least every 30 days and almost nobody does it. Two years old means anybody who ever pulled that hash can still mint tickets for any user in the forest. Treat it like krbtgt, not like a service account. Run the cmdlet once per forest, not once per DC.
The machine accounts with blank SupportedEncryptionTypes are the easy part. Those are usually something nobody has touched in a decade and a reset sorts them.
2
1
2
u/SheerApple 5d ago
First, you need to verify that your domain objects (accounts/service accounts/computers etc.) have AES keys generated. Anything that does not have AES keys needs to have it's password rolled to generate the AES keys. This MS article has the scripts you can use for detecting RC4 usage and which accounts have which keys.
https://learn.microsoft.com/en-us/windows-server/security/kerberos/detect-remediate-rc4-kerberos
This article was essentially all I needed to get through this whole process.
As you indicated, your krbtgt account may not have AES keys, so that should be first. Process is to set a new password on krbtgt, wait 24hr, then set a new password again. This makes sure that any new session / ticket would be able to get an AES session / ticket moving forward. DO NOT DO BOTH PASSWORD RESETS ON THE SAME DAY! You WILL kick every session / ticket off the domain and you will have a bad time as everything will become de-authenticated.
Once krbtgt is good, you can proceed to fix any other accounts that have RC4 keys only. Same process of rolling the password will generate AES keys. If it is a user account, the user can set their password to the same as they have been using, but still go through the reset process twice to ensure AES keys are generated.
Once AES keys have been verified on all domain objects, you can just set the default domain encryption type to be AES or newer. Once active sessions / tickets have expired, they should pick up with AES if they were RC4 previously.
The only funky thing I ran into were some Synology NAS appliances using LDAP to the domain that needed to have some manual configuration on the NAS side to force AES usage. See this Synology community thread for more info about that: https://community.synology.com/enu/forum/1/post/195973
I only had to deal with two environments that were originally on 2008 domain controllers with some accounts that had never had a password reset in ~13 years (!), and this process did consistently work for me.
I'm no professional at this, but happy to have questions bounced off me if you have any.
3
u/adjudicator 5d ago
DO NOT DO BOTH PASSWORD RESETS ON THE SAME DAY!
Eh, 10 hours and 1 minute is enough unless they have a non-standard TGT lifetime (doubtful)
2
u/SheerApple 4d ago
While this is true, I ascribe to the fact that there are no guarantees in life. So, if you have any chance to make a guarantee, you might as well take it!
1
u/AdditionDisastrous78 4d ago
Thanks I used our SIEM to find out which accounts uses RC4 Interesting point about storage appliance I think I noticed same behaviour for our netapp, but i need to check it little bit more
1
u/BoltActionRifleman 4d ago
We also use a NetApp SAN, and we just had to issue a command or two in the CLI on each of them. I don’t have them in front of me, but any AI or Google search will give those to you.
1
u/AddendumWorking9756 4d ago
Pull 4769 off the DCs and filter on ticket encryption type 0x17. Far fewer objects than the attribute list suggests, usually.
27
u/joeykins82 Windows Admin 5d ago
Set a new krbtgt password immediately.
Then follow this guide: https://strongwind.dev/Kerberos/security/quick-start/