1

I have configured an OpenVPN install. Mode: multiclients 1server.

Clients are raspberries. I note how easy it is to steal a rasp, and look in HDD to get key+cert+conf. Copy it on your laptop, and connect the VPN...

I'm nooby on it, what would the good way to protect from such a case ?

Disk encrypt ?

Thank you.

2

With very few exceptions, if somebody has your hardware in their hands, they can duplicate everything, simply by accessing and copying the whole storage.

There's no extra encryption that would help. If you encrypt the disk, the disk encryption key has to be readable somewhere. Disk encryption is useless in your scenario.

There is hardware that can't be easily duplicated, such as smartcards. However, even if you connect a smartcard reader to the RPi, the thief can just steal the card with the Pi.

You can protect against someone stealing (or borrowing) the Pi or the SD card if the SD card is encrypted and the key is not available to the thief. This means that you or someone you trust would have to type in a password, or insert an SD card that contains the encryption key for a USB key, in order for the Pi to boot. This isn't perfect protection: someone could make a dump of the RAM — but since the RAM is soldered on a Pi, that's a relatively difficult hardware attacks. If you're on an RPi budget, you probably don't need that level of resistance.

There are hardware platforms with an integrated tamper-resistant key storage: TPM on PC platforms, ARM system-on-chips with TrustZone and hardware root of trust (TrustZone alone as a CPU feature isn't enough). The hardware cost is an order of magnitude more than a Raspberry Pi. Note that even these systems wouldn't prevent theft; they would only prevent the thief from duplicating the client device.

Another route to protection is physical protection: put the device in a locked box that is securely fastened to a building fixture.

If you can't prevent adversaries from physically accessing the client device, then you can't prevent them from stealing your keys. All you can do is attempt to detect the theft. For example, if multiple clients turn up with the same client certificate, there's definitely something wrong (but you face a hard decision if you can't tell which one is the legitimate one: allow access to all, or deny access to the legitimate one).

  • Thanks again, Gilles. That's perfectly clear. The point about "who is the legitimate one ?" is the right one, yes. I wonder why there is no "ready" solution for such a case, VPN are laregely used. – ArchiT3K Jun 3 '15 at 8:11
  • Well, actually, my rasp's have more than one key to protect. They embed lots of secret documents & media, which (docs & media) are PGP crypted (randomely , each, with 1 of 3 available PGP keys). The thief would prefer to get these docs, rather than access the VPN. Same issue : the PGP keys are written on the HDD. Same solution ? SD/USB dongle with main key, only when booting ? [[finally, like in IRL, a key is never left on the place it protects...]] – ArchiT3K Jun 3 '15 at 8:16
  • 1
    @ArchiT3K If it's ok that you need to be physically present when the system boots, you can have a cheap, reasonably secure solution. Otherwise it's an insoluble problem. Cheap, secure, autonomous: pick two. – Gilles Jun 3 '15 at 8:22
0

When generating keys, you can set the expiration date for those keys. Assuming it's possible for legitimate users to update the client keys on their devices, you could set the keys to expire after a relatively short time. That would limit the time of potential exposure if a device is stolen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.