All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] yet another "lost my partition" message
Date: Fri, 15 Apr 2011 23:58:22 +0200	[thread overview]
Message-ID: <20110415215822.GA12097@tansi.org> (raw)
In-Reply-To: <20110415193751.GA21779@resivo.wgnet.de>

On Fri, Apr 15, 2011 at 09:37:52PM +0200, Jonas Meurer wrote:
> Hey,
> 
> On 15/04/2011 Arno Wagner wrote:
> > On Fri, Apr 15, 2011 at 03:52:34PM +0200, Cristian KLEIN wrote:
> > > I assume there is no way to recover the original file system. Ubuntu has
> > > most likely overwritten the LUKS header where the pretious salt is being
> > > stored. The unencrypted disk most likely looks like random data now.
> > > According to the FAQ [1], you can still resort to the dm-crypt
> > > mailing-list to get over the five stages of grief.
> > 
> > This may sound like sarcasm, but it is not. I wrote that and I 
> > realize the pain is real. This passage however serves a dual 
> > purpose and the second one is to warn people.
> >  
> > > A posteriori, I cannot help wonder why such pretious information isn't
> > > kept redundantly. 
> > 
> > The FAQ discusses this. It is a design-choice as keeping the
> > header redundantly lowers security significantly. There is
> > really no way to keep a backup header without making the
> > anti-forensic measures ineffective. 
> 
> can you please elaborate on that? why not consider the following:?
> 
> luksFormat could choose a random sector at the second half of the
> to-be-encrypted device, save the sector number in the primary header,
> and store a backup of the primary header at this place.
> obviously, all commands that write to the LUKS header would need to
> write to primary and backup header in that case.

First, a single sector does not cut it. You need to store the
keyslots as well, giving you 10 or 20MB to store. Second,
LUKS has no idea about the device size and what is to be 
put in it. It can therefore not reserve any sectors. The
sectors ''reserved'' at the beginning are done by ''shifting'' 
the start, but that does not work in any other place.
 
> in case that one accidentially overwrites the primary header (which
> is easily done as many device tools write to the first sectors of a
> device), you still may grep the device for 'LUKS' in order to find the
> backup header. that even would work in most cases if the device is
> luksFormated again: the likeliness that luksFormat chooses the same
> random sector for its backup header both times, is not very high, and
> decreases with the size of device.
> 
> as all luks commands write to both primary and backup header, shredding
> the device would still be easy enough with luksKillSlot/luksRemoveKey.
> nly thing that wouldn't work anymore, is overwriting the first few MB
> of the device.

And that is what kills the anti-forensics. 
 
> but then, it could be configurable by commandline whether luksFormat
> creates a backup header at all, and everybody would be happy, no?

Not possible, see above. 

I really do not see the point. Many filesystems are gone if you
overwrite the start of the partition. It is one of the things 
careful users guard against by backing up. 

Arno
-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier 

  reply	other threads:[~2011-04-15 21:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 20:13 [dm-crypt] yet another "lost my partition" message Hugo Melo
2011-04-13  1:10 ` Arno Wagner
2011-04-13 18:06   ` Hugo Melo
2011-04-15 13:52 ` Cristian KLEIN
2011-04-15 14:15   ` Roscoe
2011-04-15 14:21     ` Cristian KLEIN
2011-04-15 16:27       ` Arno Wagner
2011-04-15 16:18     ` Arno Wagner
2011-04-15 16:13   ` Arno Wagner
2011-04-15 19:37     ` Jonas Meurer
2011-04-15 21:58       ` Arno Wagner [this message]
2011-04-16 16:37         ` Cristian KLEIN
2011-04-16 17:13           ` Rick Moritz
2011-04-15 16:58   ` [dm-crypt] Bug Report to Ubuntu regarding dangerous installer Arno Wagner
2011-04-15 19:38     ` Claudio Moretti
2011-04-15 22:01       ` Arno Wagner
2011-04-16 11:06         ` Claudio Moretti
2011-04-16 16:18           ` Cristian KLEIN
2011-04-17  0:14             ` PsiStormYamato
2011-04-17  0:20             ` M Thomas Frederiksen
2011-04-17  1:53               ` Arno Wagner
2011-04-15 20:54     ` PsiStormYamato

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=20110415215822.GA12097@tansi.org \
    --to=arno@wagner.name \
    --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.