0

I recently went through all the hashes stored in an LDAP instance I have access to and noticed something strange that I can't explain.

Despite all the hashes being marked as SSHA (which should be seeded SHA1), most hashes were 32 characters in length, with only a small part being 40 characters.

There's no obvious timing that would explain that newer ones are longer or anything like this.

Additionally, afaict, that makes most of these hashes too short for SHA1.

What is going on here??

1
  • It might be that some have directly been stored with base64 encoding while others are “raw” (and for example still have the / separator between salt and hash clearly visible)?
    – HBruijn
    May 9, 2023 at 10:13

1 Answer 1

1

Some more research yielded the correct answer:

The password hashes are stored in binary format, not ASCII, doubly base64-encoded. Checking the length in that case leaves us with 24 and 28 bytes, which corresponds to the 20 bytes of a binary format SHA-1 hash plus 4 or 8 bytes for the salt.

This makes sense in the context I'm looking at, and I'm answering here so that others don't have to stumble over the Gitlab docs to finally put it all together, like I did 😅

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .