3

I need to get into an encrypted Ubuntu system (14 maybe?). And, yes, it is mine, I am the legal owner, etc. Problem is, I lost the passphrase in a move. There is some data in there that is pretty important to me.

I uploaded some images -- these are as far as I am able to get: https://i.stack.imgur.com/35h4Q.jpg .

It is the sole OS on an Acer laptop.

How can I bypass the encryption without losing the data? Surely this is possible. Please, check out the link to the images to get a better idea of the various methods I've attempted.

Update: Most people seem to suggest it is impossible but for brute-force. I would suggest that the version of Ubuntu is at least 2 years old. Might there be outdated security glitches?

2
  • 9
    If you lost the password, then there is no way to retrieve your data other than (more or less intelligently) brute-forcing all combinations you can imagine. That's the whole point of encryption, if you could bypass it anyhow it would be useless.
    – Byte Commander
    Feb 16, 2017 at 23:41
  • "Might there be outdated security glitches?" No. If there would be they'd be fixed and you'd be using it. Alternative option: use a tool to try and retrieve the file you removed that has the password? "testdisk" or something similar. Otherwise you will need to bruteforce it.
    – Rinzwind
    Feb 19, 2017 at 1:16

3 Answers 3

2

"bruteforce-luks" can be used to crack Luks encrypted volumes. 2 methods...

  • try all the possible passwords given a charset
  • try all the passwords in a file

All you need to do is create a file with words to try and break it. If you remember the length of the password or parts of the password it will speed things up. Finding a 20+ length password with no clues is going to take long. Very long.

Dependencies:

sudo apt-get install dh-autoreconf
sudo apt-get install libcryptsetup-dev

Download the zipfile, unzip and do the normal configure, make, make install. There are some examples in the link too; the one the use could be ...

Try to find the password of a LUKS encrypted volume using 6 threads, trying the passwords contained in a dictionary file:

 bruteforce-luks -t 6 -f dictionary.txt /dev/sdd1

Now all you need is to create the dictionay.txt (and change sdd1 to the device you need to break).

Here is a script to generate words; "abc" and all the combinations of 3 letters:

import itertools
res = itertools.product('abc', repeat=3) 
for i in res: 
    print ''.join(i)

3 letter, 3 ways = 3**3 = 27 words.

Not knowing any letters in your password and assuming letters and digits (so no other characters) is going to be impossible .. If 26 letters, capitals and small, and digits with a word up to 20 characters long = 62 ** 20 = 7,044234255×10³⁵


That last link also has a reference to crunch; a tool to create a dictionary.

2

There's one useful workaround in some cases. If you have unencrypted swap, there's a fair chance that the passphrase has been written to swap at some stage, especially if you've used hibernate.

I have successfully recovered pass phrases from swap, by remembering parts of the pass phrase, and grepping through the swap device for the parts I remember.

2
  • This is very scary.
    – Bruni
    Nov 22, 2019 at 9:49
  • 1
    It's a fairly well known problem, and one argument for using a swap file or encrypted LVM with swap on LVM.
    – vidarlo
    Nov 22, 2019 at 11:35
1

As stated by Byte Commander in their comment, this will not be possible by any reasonable means. That is the purpose of encryption and is unforgiving to users in your situation.

Unless you are willing to pay a hefty amount of money to recover that data professionally (still unlikely), the only way I could think of would be to find a brute force utility or script using a list of your most common passwords.

2
  • Where would one go to "professionally" have this done? though, my question still stands --- how would a professional do this? brute force? Feb 19, 2017 at 0:36
  • An example of data recovery professionals would be datarecovery.com. I honestly don't know what kind of methods or utilities they would use for a situation like this (if at all able)
    – Norr
    Feb 19, 2017 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .