Open Papotito123 opened 4 years ago
Actually, I have come to believe that the key to decrypt the MK (i.e compute the HMAC) is not the user password when using a microsoft account. There is definitely a key needed but not forcibly the user sha1 password.
Regards, Erwan
Le ven. 13 nov. 2020 à 03:49, Papotito123 notifications@github.com a écrit :
Hello: I were kept doing tests with CREDHIST. For the benefit of this post:
- MA account is MicrosoftAccount
- the guid I referred is the GUID related to decrypt Chrome login
- the term "switched /switch" refers to change from MA user to Local user or Local user to MA user
So some verified useful info.
To retrieve user CREDHIST hashes history with mimi: mimikatz # dpapi::credhist /in:"C:\Users\username\AppData\Roaming\Microsoft\Protect\CREDHIST" /password:actual_user_password /unprotect
It can be also used with /hash:actual_user_password_SHA1
If the account never had other password and is a MA user(like in my Win 10 2004H1) then output will looks like: mimikatz # dpapi::credhist /in:"D:\Users\username\AppData\Roaming\Microsoft\Protect\CREDHIST" /password:Tromelt@nz /unprotect CREDHIST dwVersion : 00000001 - 1 guid : {00000000-xxxx-xxxx-0000-000000000000} dwNextLen : 00000000 - 0
My PROBANDO account is now a MA account user. The CREDHIST hashes history has 7 entry with all different SHA1 because all times I switched the account. From the output I can id ,[entry 7] with user SHA1 of first password set when the user was Local account(first creation) The [entry 2], which indeed is SHA1 of the actual password string when changed from MA account to Local account.
The [entry 3] which can decrypt the GUID dated in Sept and October(I recovered copies with a Volume Shadow copies tool).
Some differences in LinkGUID for CREDHIST. When the guid is in form of : {00000000-xxxx-xxxx-0000-000000000000} ,the SHA1 is associated when MA account user. When the guid is in form of : {f49xxxxc-486e-4xxx-bd4b-9c33xxxx2b2c} ,the SHA1 is associated when Local account.
As Properties(using CredHistView tool): Hash Algorithm is SHA512 , Encryption Algorithm is AES256 , Iteration Count is 8.000(for most). This tool is in dev stage , so it fails to decrypt most of the entries in MA user.But mimi is suffice. For hives, this tools can be of used, Windows Registry Recovery 3.0.0 from mitec.cz
But wait....there's more ... I have the same MA account being used in my Win 10 2004H1 partition(same name, same password of course). And ...the guid in Win 10 2004H1 is decrypted with [entry 3] SHA1, that can decrypt the GUID dated in September and October in my other OS where PROBANDO MA account user resides.
So using a different user SHA1 calculates a different HMAC. But the MKkey sha1 is the same. I can think that every time the MA is set to a user, a new user SHA1 is created(for the MA use) and is same for all user accounts using this MA in same computer despite the windows version.I can see the date of GUID changes every time is switched.
So much thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/erwan2212/NTHASH-FPC/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYPMJPA77C3ZFOVCVK74HTSPSNFNANCNFSM4TUBV2ZA .
About credhist file : see article there : http://labalec.fr/erwan/?p=2314 . This is early stage and I need to automatize it a bit more but it is workable : you can now decrypt that file and retrieve previous NTLM/SHA1 hashes which can be useful in some circumstances.
Hello: I read article and test latest nthash zip. W1909 x64 local user with AVAST Disabled.
I ran other tool to verify CREDHIST info before making changes. I changed password 3 times. Then I ran again the other tool. Then ran nthash to compare results.
These are the outputs; Papotito123_Credhistview tool_RESULTS(24JAN2021).txt
Papotito123_nthash CREDHIST(24JAN2021).txt
So much thanks.
Hello: Forgot to mention. If CREDHIST doesn't have entries because user never changed its password or the entry is marked as Failed,then I got like this;
C:\Users\TESTACCOUNT\Downloads\NTHASH-FPC-master(24ENE2021)\NTHASH-FPC-master\NTHASH>NTHASH-win64.exe /decodecredhist /binary:.\credhist NTHASH 1.8 x64 by erwan2212@gmail.com binary:.\credhist **** entry #0 **** dwVersion:0001 guid:{FFCBA4F7-5D37-4ACC-A842-AF4821C6C18A} dwNextLen:0000 dwType:15102E8 algHash:15B0300 rounds:AC7C6C13 sidLen:7FFE algCrypt:15102E8 sha1Len:0000 md4Len:0020 salt:000000000000000000000000D8577AAC An unhandled exception occurred at $000000010000CCD9: EAccessViolation: Access violation $000000010000CCD9 $000000010001F57A $000000010004552B $000000010000BA71 $000000010000CB06 $000000010001E7A3 $000000010001F0F1 $00007FFEAB657C24 $00007FFEAC7ED4D1
Thanks.
fixed a bug in /decodecredhist : should now display all entries
Added a feature in /decodecredhist. Similar to /decodemk, no need to compute hmac key with /input. Nthash will now do it for you if you provide the sha1 password with /password.
See attached credhist sample. Original password was Password1. Then I changed to (0) Password2, then to (1) Password3, then to (2) Password4.
Therefore hashing latest password and using it to decrypt last entry in my credhist file (which entry#0 #1 and #2). NTHASH-win64.exe /widestringtohexa /input:Password4 | NTHASH-win64.exe /gethash /mode:SHA1 nthash-win64 /decodecredhist /binary:.\credhist-test.log /password:CE043A7BC5DFA33D8DE6BB6BE72CA3207781C7E0 /key:2
I can then use the obtained sha1 to decrypt entry 1, and so on....
Hello: Win 1909 local user AVAST Disabled.
Testing nthash latest zip with new /decodecredhist.
All Entry(3,2,1,0) SHA1/NTLM hashes are good. And your code decrypted Entry 0 which failed in the other tool.
Very cool.
Much thanks.
Hello: Testing nthash latest zip with new /decodecredhist in a MicrosoftAccount user that password has been changed from local user to MicrosoftAccount in 7 times.
All Entry (7) has different SHA1/NTLM verifying with mimi 2.2.0 20200918 Zerologon encrypted.
Also verifying my old passwords SHA1 when account were local(3 to 4 times) ,none of then appears.
You know that this "MicrosoftAccount password" is hashed again . So this is the hard part.
Hello: I were kept doing tests with CREDHIST. For the benefit of this post:
So some verified useful info.
To retrieve user CREDHIST hashes history with mimi: mimikatz # dpapi::credhist /in:"C:\Users\username\AppData\Roaming\Microsoft\Protect\CREDHIST" /password:actual_user_password /unprotect
It can be also used with /hash:actual_user_password_SHA1
If the account never had other password and is a MA user(like in my Win 10 2004H1) then output will looks like: mimikatz # dpapi::credhist /in:"D:\Users\username\AppData\Roaming\Microsoft\Protect\CREDHIST" /password:mypassword /unprotect CREDHIST dwVersion : 00000001 - 1 guid : {00000000-xxxx-xxxx-0000-000000000000} dwNextLen : 00000000 - 0
My PROBANDO account is now a MA account user. The CREDHIST hashes history has 7 entry with all different SHA1 because all times I switched the account. From the output I can id ,[entry 7] with user SHA1 of first password set when the user was Local account(first creation)
The [entry 1], can't decrypt actual GUID(dated as November).Also can't decrypt GUID dated in Sept and October(I recovered copies with a Volume Shadow copies tool).
The [entry 2], which indeed is SHA1 of the actual password string when changed from MA account to Local account.But this SHA1 is the one that decrypt actual GUID(dated as November) while user is MA user.
The [entry 3] which can decrypt the GUID dated in Sept and October(I recovered copies with a Volume Shadow copies tool).
Some differences in LinkGUID for CREDHIST. When the guid is in form of : {00000000-xxxx-xxxx-0000-000000000000} ,the SHA1 is more associated when MA account user. When the guid is in form of : {f49xxxxc-486e-4xxx-bd4b-9c33xxxx2b2c} ,the SHA1 is associated when Local account.
As Properties(using CredHistView tool): Hash Algorithm is SHA512 , Encryption Algorithm is AES256 , Iteration Count is 8.000(for most). This tool is in dev stage , so it fails to decrypt most of the entries in MA user.But mimi is suffice. For hives, this tools can be of used, Windows Registry Recovery 3.0.0 from mitec.cz
But wait....there's more ... I have the same MA account being used in my Win 10 2004H1 partition(same name, same password of course). And ...the guid in Win 10 2004H1(dated in October) is decrypted with [entry 3] SHA1, that can decrypt the GUID dated in September and October in my other OS where PROBANDO MA account user resides.
So using a different user SHA1 calculates a different HMAC. But the MKkey sha1 is the same. I can think that every time the MA is set to a user, a new user SHA1 is created(for the MA use) and is same for all user accounts using this MA in same computer despite the windows version.I can see the date of GUID changes every time is switched.
So much thanks.