Lost Dataset Passphrase

zeR

Cadet
Joined
Jul 9, 2021
Messages
2
Hello,

I'm using TrueNAS-12.0-U4. I have created a Raid-Z system dataset pool. On this I created a new dataset with its own dataset passphrase. I forgot the last 2 letters of it. I know I had to secure the key, but I made the mistake of not doing this. So is there a way to unlock the data set? A file with a hash or something else?
 
Joined
Oct 22, 2019
Messages
3,641
Did you already save data to this new dataset?

Do you have a copy or backup of this same data elsewhere?


If you absolutely need to decrypt this dataset, and the Master Key was encrypted with a passphrase (not a keyfile/HEX-string), it's within reason to try to crack the passphrase with some sort of brute-force passphrase cracking software, since you believe you might have mis-typed the passphrase by about only 1 or 2 characters.

I've only ever done this on LUKS as a test (I used someone's script), and one time I successfully recovered the contents of a very old encrypted .rar file since I knew "enough" of the passphrase where the program would accept "patterns" to make decryption feasible. It actually worked! Luckily, my assumption was correct: what I incorrectly "remembered" as the passphrase was only off by one character (where I substituted a letter for a "l337 haXXor" number, such as "3" instead of "E".)

To be clear, the point is you should never have to find yourself relying on attempting to defeat your own encryption. That beats the whole point of encryption.
 
Last edited:

zeR

Cadet
Joined
Jul 9, 2021
Messages
2
Thank you for your quick response. I'm actually trying to restore the data from an old hard drive. I think that will take a long time. But I can't rely on that.
I thought there must be a HASH file or something else to brute force this (with the letters I know). But I can't find a way to do it.
 
Joined
Oct 22, 2019
Messages
3,641
I believe it's possible to extract the hash / encrypted Master Key using zdb, with which you can then brute-force with a third-party tool (if one even yet exists for ZFS) or a script, feeding it a "pattern" that closely resembles the possible passphrase. It goes beyond my level of knowledge at this point.
 
Top