From: epvdm@limpoc.com
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Remote unlock security
Date: Mon, 20 Dec 2010 22:04:30 -0800 [thread overview]
Message-ID: <20101221060430.GA22696@limpoc.com> (raw)
In-Reply-To: <20101221052741.GA24184@tansi.org>
On Tue, Dec 21, 2010 at 06:27:41AM +0100, Arno Wagner wrote:
>
> Hi David,
> On Mon, Dec 20, 2010 at 08:05:25PM +0100, David Jacquet wrote:
> > Hi,
> >
> > I am trying to configure my server to be able to be unlocked via ssh and
> > dropbear. From the README.gz
> > I understand that I can issue the command:
> >
> > ssh -o "UserKnownHostsFile=~/.ssh/known_hosts.initramfs" \
> > -i "~/id_rsa.initramfs" root@initramfshost.example.com \
> > "echo -ne \"secret\" >/lib/cryptsetup/passfifo"
> >
> > What exactly will happen with the "secret" string? Will it be written to an
> > unprotected part of a hard drive.
>
> I do not understand what "passfifo" is suppoded to do, you
> should probably do something like this instead:
>
> ssh "cat <file-with-secret> | cryptsetyp --key-file - <other options>"
>
> > If so
> > it may be retrieved by a careful investigation of that drive. From my non
> > expert and humble opinion, a key (as
> > the "secret") should only be stored on RAM (and erased even from the RAM as
> > soon as possible).
>
> Indeed. However "as soon as possible" is on device removal from
> LUKS/dm-crypt control.
>
> > Even if only stored in the RAM, I guess that the "secret" string will be
> > stored in the .bash_history file on the
> > computer from which the ssh-command was issued.
>
> Therefore never show it to bash.
>
> > I guess it is more
> > recommended to log into the remote
> > computer and then issue ( cat > /lib/cryptsetup/passfifo --> "secret" -->
> > CTRL+D, will that work?)
>
> Still don't get what "passfifo" is for. Is this some contruction
> like this?
>
> mkfifo passfifo
> cryptsetup --key-file passfifo
>
> Arno
apparently in some linux distributions the initrd cryptdisk setup reads the
password from a fifo.
regardless when setting up something like this, it's important to realize that
if you care about the actual security of the data and your passphrase, this is
not a safe arrangement unless you can independently confirm that the machine
you're trying to unlock hasn't been tampered with. For instance, an attacker
could modify the (unencrypted) initramfs to save whatever passphrase you type
remotely.
Of course if you just use encrypted disks for convenience, e.g., so you don't
have to worry about scrubbing them before discarding old equipment, it doesn't
matter.
eric
next prev parent reply other threads:[~2010-12-21 6:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 19:05 [dm-crypt] Remote unlock security David Jacquet
2010-12-21 5:27 ` Arno Wagner
2010-12-21 6:04 ` epvdm [this message]
2010-12-21 9:27 ` David Jacquet
2010-12-21 13:02 ` Jonas Meurer
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=20101221060430.GA22696@limpoc.com \
--to=epvdm@limpoc.com \
--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.