AuthMe Reloaded

AuthMe Reloaded

3M Downloads

Can't decrypt an password that I need to decrypt.

Cerealistic opened this issue ยท 17 comments

commented

What behaviour is observed?

So I have an AuthMe password, encrypted in my auths.db. I try to decrypt a password out of this string:

$SHA$d916d124f19a659c$809140c2fc05e72fde5d0d57973e85a1f800b3eda024c9ae7d5ae0fbd23584d0:127.0.0.1:1683666307921

What does this mean? How to I decrypt it?

Expected behaviour

I expected it to be normal sha256.

To Reproduce

  1. go to your auths.db
  2. try to decrypt the sha256.

Plugin list

Authme, EssentialsX.

Server Implementation

Standalone server (no proxy)

Database Implementation

SQLite

AuthMe Version

5.6

Error log (if applicable)

No response

Configuration

Default config.

commented

I decrypted it for you, it's 12345678

commented

But why tho?

commented

It's secret

commented

How did you decrypt it?

commented

not really. I own the server, I just need to know how to decrypt.

commented

Take a string, encrypt it with sha256. Did it match the hash in the DB? No? Try again. :)

commented

AuthMe uses a different hash/salt method I think, and I don't know it

commented

12345678

Just referenced it, its not

commented

@Cerealistic What do you want to achieve? Do you want to verify the password input with the hash for example for a website integration? Then we are likely looking at decoding/deserializing the structure. Plain hashing functions are unsafe (re: rainbow tables) that's why there a salt added. The salt is included in the output. See the first characters between the dollar sign.

// $SHA$salt$hash, where hash := sha256(sha256(password) . salt)

This can then be used to generate the same hash and thereby verify the input is equal to the value in the database.

However, if you really meant decrypting (i.e. getting the original input from the hash), this is intentionally difficult by design. Password hashing is a standard practice where the hashing functions are one-way (simplified). You should not being able to see the original input (simplified). If your use case is that a user forgets his/her password, then you should override the old hash. For example: by generating temporarily, random, one-time only password or letting them register again using a new password.

commented

Okay, I will change their password. But how would AuthMe know the hash's correlation to the password if its one-way?

commented

If the input is the same, it will generate the same output. The salt is added to the input to make it more unique. Rainbow tables are an attack methodology that uses pre-generated input->output values. By adding random salt values to the input, this attack can be prevented.

commented

... How do I find the salt?

commented

My earlier post

@Cerealistic What do you want to achieve? [...] The salt is included in the output. See the first characters between the dollar sign.

// $SHA$salt$hash, where hash := sha256(sha256(password) . salt)

[...]

BTW: . means string concatenation, so it would be something like this in Pseudo-Code

sha256(concat(sha256(password_input), salt))

commented

I thought "." means multiplication... Anyways closing.

commented

Blud the password is 10510, dm me at discord (el_spreen) for more info

commented

I assume you just used hashcat?

commented

Not exactly, i used python and thanks to the source code i managed to get it. More info at discord: el_spreen