HMAC-SHA1 with binary Key
#1
Question 
I have a HMAC-SHA1 hash that was generated by the following PowerShell script:

Code:
$hmac = New-Object System.Security.Cryptography.HMACSHA1;
$hmac.Key = [Convert]::FromBase64String("VIr7sf/y6Y4kgyCc+JFUbbW+Je8Eho0t18jGc9bFgm4=");
$hash = $hmac.ComputeHash([System.Text.Encoding]::Unicode.GetBytes("hashcat"));
[Convert]::ToBase64String($hash); # Result: MCY+Q1+M4bL825xVmUF4PjN9IWg=

# Hex values:
[BitConverter]::ToString($hmac.Key); # Result: 54-8A-FB-B1-FF-F2-E9-8E-24-83-20-9C-F8-91-54-6D-B5-BE-25-EF-04-86-8D-2D-D7-C8-C6-73-D6-C5-82-6E
[BitConverter]::ToString($hash); # Result: 30-26-3E-43-5F-8C-E1-B2-FC-DB-9C-55-99-41-78-3E-33-7D-21-68

As you can see, my key size is 32 bytes (which is supported) but has no valid representation as an ASCII string. How can I create a hash file to crack this password (as you can see above, the password is "hashcat")? I've tried using an hexadecimal editor to edit the key byte by byte in the file, but it didn't work.

Just for clarification, my current hash file look like this:

Code:
30263e435f8ce1b2fcdb9c559941783e337d2168:TŠû±ÿòéŽ$ƒ œø‘Tmµ¾%-×ÈÆsÖÅ‚n

So I think the question is: does hashcat support an arbitrary byte array as the algorithm key? How?

Thanks!


Messages In This Thread
HMAC-SHA1 with binary Key - by vinicius.vbf - 10-16-2017, 02:32 AM
RE: HMAC-SHA1 with binary Key - by Chick3nman - 10-16-2017, 06:03 AM
RE: HMAC-SHA1 with binary Key - by philsmd - 10-16-2017, 07:33 AM
RE: HMAC-SHA1 with binary Key - by vinicius.vbf - 10-17-2017, 03:12 AM