Quantcast
Channel: hashcat Forum - All Forums
Viewing all articles
Browse latest Browse all 7673

Trouble finding attacking hash format

$
0
0
Hi,
I'm analyzing the password algorithm used by an open source CMS system. I've searched the wiki and studied the help information but can't find the hash format to use.

I know the algo is SHA256 computed on plaintext+salt.

Here's the actual implementation in the source in c#:
     
Code:
        static string GeneratePasswordHash(string password, byte[] salt)
        {
            using (var algorithm = new SHA256Managed())
            {
                byte[] plainText = Encoding.UTF8.GetBytes(password);
                byte[] arr = new byte[plainText.Length + salt.Length];
                plainText.CopyTo(arr, 0);
                salt.CopyTo(arr, plainText.Length);
                return Convert.ToBase64String(algorithm.ComputeHash(arr));
            }
        }

       static byte[] GenerateHashSalt()
        {
            using (var cs = new RNGCryptoServiceProvider())
            {
                var salt = new byte[24];
                cs.GetBytes(salt);
                return salt;
            }
        }


Usage would be 
string passwordHash = GeneratePasswordHash("1234", GenerateHashSalt());

I've creatad a new user in the CMS with the password "1234" and the hash and salt is 
hash = UojnvzRwPa7I9miZM3SB5cVcd2reD1GXE4aKIoeYLCI=
salt = rapx877Zal8tJwS/xt+m5P8lsoMt2mm3

I would expect the hash mode is 1410 sha256($hash.$salt)
When I try to run hashcat using a simple wordlist it gives me a hash encoding exception

Code:
> hashcat64.exe -a 0 -m 1410 c:\Temp\myhashes.txt c:\Temp\dict.txt
...
Hashfile 'c:\Temp\myhashes.txt' on line 1 (´╗┐Uoj...rapx877Zal8tJwS/xt+m5P8lsoMt2mm3): Hash-encoding exception
No hashes loaded

I've tried these formats but I keep getting a format exception:

$UojnvzRwPa7I9miZM3SB5cVcd2reD1GXE4aKIoeYLCI=.$rapx877Zal8tJwS/xt+m5P8lsoMt2mm3
UojnvzRwPa7I9miZM3SB5cVcd2reD1GXE4aKIoeYLCI=:rapx877Zal8tJwS/xt+m5P8lsoMt2mm3

What am I doing wrong here? 

Cheers

Viewing all articles
Browse latest Browse all 7673

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>