From: Matthew Monaco <dgbaley27@0x01b.net>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Forgot dm-crypt password; suggestions on steps to undertake
Date: Tue, 12 Nov 2013 07:58:33 -0700 [thread overview]
Message-ID: <52824219.1010607@0x01b.net> (raw)
In-Reply-To: <BLU181-W76117F145E9E68B99D5675C9FF0@phx.gbl>
On 11/10/2013 07:25 PM, John Thoe wrote:
> Hello Arno and Milan
>
> Thanks very much for your replies. I was not successful in retrieving the
> passphrase but it was a good learning experience.
>
I'm not sure if this means that you couldn't find a good way to brute-force or
if your assumptions about the missing parts were wrong. I've done something
similar before, although the forgotten pieces were somewhat different and only
had ~32 possibilities. In any event, I used a script like this:
--------8<--------------------------------------------------------------
#!/bin/bash
dev="$1"
dictionary=( mypass-{0000..2000} )
for pass in "${dictionary[@]}"; do
printf "Trying: %s..." "$pass"
if echo -n "$pass" | cryptsetup luksOpen --test-passphrase \
--key-file=- "$dev" lostdev &> /dev/null; then
printf " SUCCESS!\n"
break
else
printf "\n"
fi
done
--------8<--------------------------------------------------------------
It didn't make sense to me to do it using libcryptsetup because the bottleneck
was the actual decryption attempt.
If this is for your root drive, you'd have to do it from a boot disk. If you're
data is important, and you really do need ~5000 attempts, I think the wait time
is manageable.
next prev parent reply other threads:[~2013-11-12 14:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-09 21:48 [dm-crypt] Forgot dm-crypt password; suggestions on steps to undertake John Thoe
2013-11-09 22:51 ` Arno Wagner
2013-11-10 0:15 ` John Thoe
2013-11-10 1:03 ` Milan Broz
2013-11-10 16:26 ` Arno Wagner
2013-11-11 2:25 ` John Thoe
2013-11-11 3:13 ` Arno Wagner
2013-11-11 5:51 ` Milan Broz
2013-11-12 14:58 ` Matthew Monaco [this message]
2013-11-12 15:10 ` Milan Broz
2013-11-12 18:56 ` Matthew Monaco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52824219.1010607@0x01b.net \
--to=dgbaley27@0x01b.net \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.