02-02-2017, 05:54 PM
I'm new to hashcat and would like to try recovering a key from a message authentication code.
I have the HMAC-SHA256 message authentication code, and the message, but not the key.
I would like to use hashcat to recover the key used, but I am seeing errors and I can't find any good examples online to learn from.
Data format I am using:
[digest]:[hex(message)]
command I am trying:
hashcat -a 3 -m 1450 data.hash
I get a line length exception.
For test purposes, in python I tried generating my own examples:
I have the HMAC-SHA256 message authentication code, and the message, but not the key.
I would like to use hashcat to recover the key used, but I am seeing errors and I can't find any good examples online to learn from.
Data format I am using:
[digest]:[hex(message)]
command I am trying:
hashcat -a 3 -m 1450 data.hash
I get a line length exception.
For test purposes, in python I tried generating my own examples:
Code:
import hmac
from hashlib import sha256
message = "This is a long message that might be a little too long"
mkey = "password"
digest = hmac.new(mkey, message, sha256)
print(digest.hexdigest())
print(message.encode('hex'))