-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Does not work with v10.5 #5
Comments
@denandz any chance of revisiting this tool for 10.5 compatibility? |
would love to see an update too. VERBOSE: encryption.config key count: 3
Cannot index into a null array.
|
Getting the same with v10.8 Exception calling "TransformFinalBlock" - "The input data is not a complete block" |
Righto, looks like >v10.5 switched up the cipher text storage a bit and added HMACs plus some other stuff we can more or less ignore. The new structure stores the ciphertext/iv/mac data in a single blob, but the overall master->intermediate->item encryption flow is the same. The following SQL will pull all the items:
The
This gives you all the data you need for
From the above we need to pull out the intermediate cipher text and IV (used to be called
Which can get fed to
The challenge here is now there are enough disparities between the various versions that for SecretServerSecretStealer (specifically |
Thanks @denandz! I was able to modify my module accordingly and all is well! Note in the two example decrypted passwords that the first 4 characters are not a part of the password -- I stripped these out in my own implementation. I may provide a pull request -- however, my scenario is not so much compromising Secret Server as it is making a utility that can retrieve secrets from a free version of Secret Server (which doesn't have API access), so I'm not sure how useful it would be to an audience who is actually working with compromised servers ;) |
Those first two bytes are a version header. Checking the values and notifying when they aren't the expected value would probably be a good idea, might give an early indication of changes in later Secret Server versions? |
If you want to also decrypt file attachments, you can modify the query like this:
Then instead of decrypting the |
might be reviving something already dead but by any chance anyone is aware of the changes on the 11+ version? things look similar but the KEY entry in the DB is always NULL. where did you reverse how these values were used? I might try to dig in a bit to see what changed. |
They've likely switched up the key logic again. You'll need to dig into the application logic to figure out how its working in 11+. This might be useful: https://pulsesecurity.co.nz/articles/dotnet-dynamic-analysis If you figure out the new logic, please feel free to drop it in here and we can figure out how to work it into SecretServerSecretStealer. Good luck! |
No description provided.
The text was updated successfully, but these errors were encountered: