Hi everyone, I found the great question on booting encrypted drives, and since I’m somewhat paranoid I’d like to ask a follow-up:

When the key to decrypt the drive is input into the system, I’m assuming it stays in the RAM till the time the computer shuts downs. We know that one could, in theory, get a dump of the contents of the RAM in such a state, if done correctly. How would you deal with this problem? Is there some way to insert the USB, decrypt the drive, and then remove the USB and all traces of the key from the system?

Thanks!


Edit: link to the question I referenced: https://feddit.de/post/6735667

18 points

That’s not possible because of the way disk encryption works. When you unlock an encrypted drive, it does not actually decrypt it - that would take way too long and leave the disk unencrypted. Instead, the computer keeps the key in RAM and uses it to decrypt the accessed data blocks on the fly.

permalink
report
reply
4 points

Thank you, and indeed, I realise that I may have been asking for the impossible

permalink
report
parent
reply
9 points

Honestly, I am just so curious about your threat model that you are considering this for self hosting.

permalink
report
reply
1 point

What do you mean?

permalink
report
parent
reply
6 points
*

What he means is, your security considerations here must come from some perceived threat. What kind of threat do you forsee that requires this high level of security?

Usually when you consider security you start with a threat model, describing the scenarios you want to protect your systems from. And based on that you decide the necessary technical security measures that are relevant.

permalink
report
parent
reply
6 points

The key needs to be available to continue to be able to decrypt the data on the device. All encrypted data is not decrypted as you mount or unlock your encrypted device, that is done one the fly as you use it.

The attack you are thinking of should also not be relevant. What you worry about appears to imply that you are more concerned about the key being protected, rather than the data the key protects. You seem to wish to have your decrypted data available, but not the key.

permalink
report
reply
2 points
*

Thank you, I realise that what I’m asking for might not be physically possible. I’m certain that RAM loses all of its contents after a loss of power, but would it be possible to pad the RAM before/during the shutdown process to make sure that nobody gets to the key?

permalink
report
parent
reply
9 points

Yes, but: somebody trying to attack your machine that way would cut the power and try to freeze your memory modules. So that mitigation wouldn’t trigger.

If you think you really need to guard against that attack you’d have to look into physical security: At room temperature there’s a pretty short window available for saving the contents. So if you manage to remove access of possibly used cooling agents to the memory modules you already made things quite tricky.

Now if you can make removing the memory modules hard as well, and prevent booting anything but what you want to be booted there’s a decent chance it’ll be impossible to recover memory contents.

If that still isn’t good enough you’d have to look into providing a means of physical destruction of the memory modules triggered by a backup power source inside the case on unexpected power loss.

permalink
report
parent
reply
2 points

Thank you for the comprehensive answer. I will go through it again and attempt to implement some of these mitigations.

Thanks again, I saved your comment

permalink
report
parent
reply
6 points

If an attacker wants your encrypted data that bad, they will attack the running machine and use it to access the data, they will not steal a key and then attempt to physically remove the drive.

Drive encryption is for prevention of access when the drive is offline, it doesn’t protect a running system which can access that data.

If you are worried about the key being accessed while the machine is running, focus on hardening access to the machine via network, etc.

permalink
report
reply
1 point

This machine will not be connected to the Internet, and the only way to get to it would be a VLAN-hopping attack (in which case, I’ll have to think of something else)

permalink
report
parent
reply
2 points

Sharing this article as I think it ties in with this conversation well: https://www.zdnet.com/article/cryogenically-frozen-ram-bypasses-all-disk-encryption-methods/

I do want to say that for most people, this is likely NOT a concern, but I don’t know OPs threat model.

permalink
report
reply
4 points

For those not clicking the link, “cryogenically frozen” actually means an upside down can of compressed air.

permalink
report
parent
reply
1 point

That was a perfect one sentence summary of the article!

Its amazing some of the things people come up with like gathering intel on what a computer is doing via power draw changes, monitoring an air-gapped computers electromagnetic fields, or in this case “cryogenically” freezing ram with compressed air.

permalink
report
parent
reply
2 points

OP is likely Raoul Silva, the antagonist from Skyfall (2012).

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5K

    Monthly active users

  • 3.9K

    Posts

  • 84K

    Comments