Unable to decrypt dataset

Just by changing the case of every letter? :flushed:

It was a long passphrase

That’s almost not worth it. 2 million tries is on the level of brute-forcing.

Do you realize how long 2 million seconds is? That’s over three weeks.

Not to mention, the results.txt file is going to be massively long. I mean, it’s possible to still find the “good” line with grep or such, but damn.

I guess just run it in a “tmux” session, and let it go in the background?

1 Like

Can you link to it? I’m curious.

If you want to start over, and hopefully save some time, you can try this script.

It will exit the moment it finds the correct passphrase, and echo it to the terminal. (It will also coincide with the same “line” number as your passlist.txt.)

Here is the script:

#!/bin/bash

while read -r pass
        do
                echo $pass | zfs load-key -n "Spinning Guys"/BulkStorage 2>/dev/null  >> results.txt
                lastresult=$(tail -n1 results.txt)
        if [[ ${lastresult} = "1 / 1 key(s) successfully verified" ]]
                then
                echo "Passphrase is: $pass"
                exit
        fi
done < passlist.txt

You can name it something like zfspass.sh and make it executable. It can be invoked (as the “root” user) with:

bash zfspass.sh

Or…

./zfspass.sh

I tested it and it “worked”. But the caveat is, I used a much smaller passlist.txt (of 8,192 generated “possible” passphrases), since I didn’t want to wait over three weeks to see if it might work. :stuck_out_tongue:

Having to run through 2 million entries sounds way too high.

Here’s what it looked like on my terminal (as the “root” user), after I let it run, which it “exited” on its own:

# bash zfspass.sh
Passphrase is: PeanutBUtter!

To verify its accuracy…

This shows the “good” hit is on line #4193 in results.txt

# grep -n "1 / 1" results.txt
4193:1 / 1 key(s) successfully verified

And here is line #4193 from passlist.txt

# sed '4193!d' passlisttxt
PeanutBUtter!

It verifies the same passphrase that was echoed in my tmux terminal session when the script exited. :sunglasses:

And of course, this is the correct passphrase to unlock my dataset.


At least with this method, you don’t have to wait until every possible passphrase is exhausted.

It’s still a crude script, however.

Obviously, you’ll want to run it in a “tmux” session, which you can check from time to time to see if it echoed your passphrase and exited.

Again, to reiterate: My test was against a passlist.txt with 8,192 different combinations of peanutbutter!. There’s a vast difference between several thousand and two million. I cannot stress this enough.


There’s no guarantee it’ll find your passphrase, since this is all based on the assumption of using the incorrect case.

If you can think of a more lean or sophisticated way to create a passphrase list, your odds will be better. Such as:

  • "Maybe I missed ‘space’ somewhere?
  • “Maybe I twitched a certain way and skipped a letter?”

Naturally, I cannot help beyond this, since it would require you sharing what you think the passphrase is, and I’d use a “human touch” to try to figure out common ways someone might have mis-typed it.

1 Like

Another shot in the dark: Perhaps there’s a “trailing space” at the end of your passphrase (or a “leading space” at the beginning) that may or may not belong?

And yet another shot in the dark, and this might sound silly:

Open up a text editor and just start hammering away, typing the “passphrase” really fast, over and over again, new line after new line. You might notice a pattern with a recurring mistake.

Thank you

I apologize for the late reply, I was unable to post more yesterday because of the new user post limit. At this time I have basically recovered all important data from back ups. I will try to use your script as well, since some of the backed up video was at a lower quality than the original. However, this is more a “nice to have” than a “need to have”.

Here is the link to the powershell script: Reddit - Dive into anything ](Reddit - Dive into anything

Again, thank you for the assistance.

1 Like

Keep in mind that you want to narrow yourself down to a small enough “passlist”, so that you can exhaust all of them without spending too much time.

In my example (8,912 passwords), I was able to “recover” my password in a reasonable time.

For you, perhaps only generate a list that changes the case combination of the first two letters of each “word”? (A common input mistake.)


Consider also that you’re trying to discover a “pattern” or quirk. Everything has been based on the assumption of “incorrect case”. It may have been something else, such as a “space” instead of “dash”. Or even hitting the “E” key instead of the “R” key.

This is why typing the passphrase over and over and over really fast in a text document, without regard to accuracy, might help you discover common mistakes, which can hopefully get you closer to pinpointing the missing passphrase. (Or coming up with a better “passlist” to use the script against.)

damn this super scary. Have you figured out the reason yet? If anything is corrupted OS, or really forgotten the password. Have you tried using another TrueNas or linux to decrypt the pool?

Given that I know for a fact I have had to decrypt this pool with the passphrase stored in the password manager in the past, my best guess is that I accidentally over wrote the passphrase stored in the password manager at some point. I have been making a lot of changes lately, and it’s possibly that I stored the password for something else over the passphrase for the drive encryption by mistake. I am not aware of anyway within in the password manager to see when it was last updated, so this is just a guess based on the available information.

Edit: This is for sure what happened. I found the modified date in the password manager that is after the creation date. Unfortunately when I went to look at the password history it did not show anything.

You can check the pool’s history for any hints that something was changed, and at what day/time.

For example, to see any time the userkey for an encrypted dataset was changed:

zpool history "Spinning Guys" | grep "change-key"

What password manager?

Bitwarden

Darn. :pensive:

I use KeePassXC, which keeps a history of every change for each entry.

EDIT: Are you 100% sure that Bitwarden doesn’t have a stored “history” or “previous copy” feature?

Bitwarden has a password history (Which I learned about approximately 5 minutes ago). Unfortunately it shows no history, even though it does show a date modified.

What about this, then:

Nothing
image

I think we can safely say that if someone steals your harddrives or server, they won’t be able to access the files on your dataset.

See? Encryption works! :smiley: :+1:

Yeah the big take aways: Encryption Works, and don’t lose the passphrase, backup everything important, and I need to pay more attention to where I am saving passwords in the password manager.

1 Like