Results 1 to 7 of 7

Thread: Cached credentials and their salt

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    35

    Default Cached credentials and their salt

    I have been trying to understand how the cached credentials are salted. I have seen some conflicting information, some saying its salted with just the username, some saying user and domain and yet other source saying username and maybe domain (if applicable). I know with jtr the format includes username and domain with the hash, but I have seen posts of folks talking about rainbow tables generated for the Administrator account.

    I'm posing the question because I'm curious whether rainbow tables salted with the administrator account would actually work and be with generating?
    Last edited by Kx499; 01-30-2011 at 08:35 AM.

  2. #2
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: Cached credentials and their salt

    I like the bleeding edge, but I don't like blood loss

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    35

    Default Re: Cached credentials and their salt

    Thanks for the links, it was exactly what I needed. Those had some really great information about how these stored creds are encrypted/hashed. After reading through those posts I wasn't sure whether the username they were referring to was the username itself or username@domain, so I tested it out. After some testing with cachedump and jtr on my end I came to the following conclusion:

    1: The hash is salted with just the username not username and domain or username@domain, so the user Administrator with the password Password.123 would have the same cachedump output (once the reg values are decrypted using the machine specific key) on two separate machines in two separate domains.

    2: In theory rainbow tables are possible and Cain's winrtgen actually includes the ability to generate them. This would only be practical for passwords of up to 7 chars in length for a full character set and 8 or 9 with a reduced char set. Basically if you can do it for NTLM you can do it for MSCACHE.

    Thanks again for pointing me in the right direction, cryptography is always an interesting topic...

  4. #4
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: Cached credentials and their salt

    Please keep in mind that those links are for XP. MS changed the way they store CC in Vista and win7.
    I like the bleeding edge, but I don't like blood loss

  5. #5
    Junior Member
    Join Date
    Aug 2010
    Posts
    34

    Default Re: Cached credentials and their salt

    Indeed. They switched from LM hasing to NTLM hashing, which is considerably harder to crack.

  6. #6
    Junior Member
    Join Date
    Jan 2010
    Posts
    35

    Default Re: Cached credentials and their salt

    Isn't ntlm an implementation of md4 and lm an implementation of des? I might be confused though. Going on those assumptions I thought the articles were indicating even in xp they were hashes with more of an ntlm type algorithm than anything. Sounds like I may have to do a little more reading....

    How did they change for window 7 and vista? Definitely got me curious......

  7. #7
    Junior Member
    Join Date
    Jan 2010
    Posts
    35

    Default Re: Cached credentials and their salt

    A few Google searches later and I get what bofh28 was referring to with the differences between XP and Vista/7. @falseteeth we were talking about the domain cached credentials, I believe you were referring to the local hashes.

    In summary, I think the rainbow tables may be possible for Vista/7 but would take a lot longer to generate and not to mention probably need to modify rtgen top actually do it. Here's what I've come up with on the algorithm's just for completeness:

    XP/Vista/7 (just for my own info I wanted to verify what algorithm they were actually using)
    + indicates append not addition
    LM = split into 2 7 byte chunks and encrypted using DES Algorithm looks like: DES(bytes 0-7 of password + null byte) + DES(bytes 0-7 of password + null byte)
    http://en.wikipedia.org/wiki/LM_hash
    NTLM = encrypted using MD4 Algorithm looks like: MD4(password)
    http://openwall.info/wiki/john/NTLM

    XP Cached Cred
    The username is appended to the NTLM hash of the password and then that value is hashed using MD4. so effectively you have MD4(username + MD4(password)).
    http://openwall.info/wiki/john/MSCash

    Vista/7 Cached Cred
    Uses same process to create the cached credential that XP uses, except it applies PBKDF2 as well. PBKDF2 takes a cryptographic hash function (SHA1 in this case) and applies it to the XP cached credential salting it with the lower case username, repeaating this for the specified number of iterations (1024). This formula then looks like this: PBKDF2(HMAC-SHA1, 10240, MD4(username + MD4(password)), lower case username)
    http://openwall.info/wiki/john/MSCash2
    http://en.wikipedia.org/wiki/PBKDF2

    Thanks again for the nudge in the right direction...
    Last edited by Kx499; 02-03-2011 at 05:56 AM.

Similar Threads

  1. Credentials For Using Backtrack
    By hitmen in forum Beginners Forum
    Replies: 3
    Last Post: 07-12-2010, 02:49 PM
  2. Windows 7 User Credentials
    By noopie in forum Experts Forum
    Replies: 1
    Last Post: 04-12-2010, 01:57 PM
  3. Replies: 11
    Last Post: 03-31-2010, 08:22 PM
  4. new tool - dumping cached credentials from linux
    By bofh28 in forum OLD Programming
    Replies: 0
    Last Post: 11-01-2008, 03:22 PM
  5. dumping cached credentials from linux
    By bofh28 in forum OLD Programming
    Replies: 0
    Last Post: 10-09-2008, 08:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •