If I may wade back in (no doubt over my head) for a moment...
On 3/1/13 4:53 AM, Joanna Rutkowska wrote:
> On 03/01/13 05:57, Daniel Selifonov wrote:
>> ...
>>
>> Implementing this in Qubes would require making alterations to Xen to
>> provide exclusive access to the debug registers to dom0 by filtering out
>> access from HVMs, disabling any hypercalls that grant domU PV guests
>> access, making sure they don't get swapped/stored as part of domain
>> contexts, applying the TRESOR kernel patches to dom0, and implementing a
>> usable set of userspace utilities to push keys into registers on
>> startup/wakeup.
>>
>> I've been interested in the topic of coldboot attack mitigation for some
>> time, and exploring TRESOR on Qubes. So, I could take the initiative on
>> actually implementing it, though I will need to familiarize myself more
>> deeply with Xen code/design first.
>>
> I don't quite like an idea of "homebrew" hypervisor patching in order to
> support Tresor hack^H^H^H^Hpatch. Patching the hypervisor, especially
> its context switching code, is super security sensitive and I'm afraid
> we might introduce inter-VM attack surface this way.
So if this is done at all it would be as an optional experimental feature.
> And then again -- Trasor, while nice to have (if for free), still only
> protects *one* key against coldboot attacks -- i.e. the disk encryption
> key. It doesn't protect any of the apps keys, such as my ssh keys, my
> keepass passwords, my bitcoin private keys, https sessions keys, etc.
> Perhaps we could even say that in this respect it offers a bit of
> illusion of security -- a user thinks she is protected against cold boot
> attacks, and proudly leaves her laptop in a hotel in s3 sleep, while in
> fact she's not.
>
> joanna.
>
Excellent point. But it could have real value as a mitigation tactic.
Hard drives are very expansive these days, potentially holding vast
amounts of personal info that I think many/most of us who are
considering Qubes in the first place would be very reluctant to spread
online to any great extent. We Qubes adopters are probably more
'personal computing' oriented than the average person; We view PC
security as heavily compromised and want to regain a sense of control
over our own devices. So Tresor enables control over what is probably
the most sensitive internal system component owing to its great volume.
How many of these key-using programs do you think flush their keys and
passphrases (perhaps after saving to disk) when they are notified the
system is going to sleep? None maybe?
One technical strike against Tresor might be that the keys for secondary
hard drives do not fit (I don't know-- just guessing) on the processor,
and so they become vulnerable to cold boot attacks like the other key
types you mentioned. So there is a question of how many AES-128 keys can
fit, and I get the impression from the correspondence here that it is
one or two max. (BTW, 128 bit keys should not be considered a
compromise-- right? There is an attack on AES-256 that greatly weakens
its key strength, and maybe this could be cited as another reason not to
trust hardware HD encryption too much, as it all seems to use AES-256.)
Ultimately we should ask whether CB attacks can be successfully stopped
with software, and (if any) how inconvenient those solutions are. So,
there is AEM which handles the use case of leaving the laptop in a hotel
room for N hours, and once it is setup we make AEM work by shutting down
the laptop. With an eye towards efficiency and ease for the user, would
it not be possible to encrypt the contents of RAM whenever the system
goes to sleep? Perhaps even beyond that, hibernation could be
supported...Or maybe hibernate already handles this correctly for
anti-CB, and we just need to enable it? How about a variation on secure
hibernate that uses RAM instead of the HD, effectively giving us
encrypted RAM during sleep?