Skip to contentSkip to conversation

Remote authentication?

dm-crypt Niall Murphy 6 participants 12 messages Sep 16, 2009 – Sep 22, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

Maybe you can help me. I'm trying to evaluate what encryption solution would be best for my company's setup.

We provide a computer that acts as a server for our customers, who have no physical interaction with the machine. We need the data on this machine to be decrypted as it is needed by a number of services on-the-fly. As we need to provide automatica authentication we either need to:

Keep the parts of the filesystem required to boot up and allow an OpenVPN ssh session - permanently decrypted - so that we can remotely authenticate. or
Provide a usb key containing the secret key to our customer and read this key when the machine boots.

Obviously the latter option involves more risk as someone intending on stealing the machine need only steal its acompanying usb key should the customer not keep it safe. Also, if the power were to go we need a way to automatically authenticate meaning the key would have to be paired with the machine at all times.

We currently have OpenVPN set up on the machine we want to encrypt so that it keeps contacting us to tell us it is online and it initiates an OpenVPN connection with us when it does go online, so half the work is done in this regard.

I was just wondering if your product would support custom authentication in this manner? and if you have any further suggestions, either on what files would have to remain decrypted for this to work, or what possible alternatives there may be.

If you need any further description of the above please let me know.

Thanks.

--
Niall

#1 lore raw

hey,

Quoted 9 lines · On 16/09/2009 Niall Murphy wrote:

We provide a computer that acts as a server for our customers, who have no physical interaction with the machine.
We need the data on this machine to be decrypted as it is needed by a number of services on-the-fly.
As we need to provide automatica authentication we either need to:

Keep the parts of the filesystem required to boot up and allow an OpenVPN ssh session - permanently decrypted - so that we can remotely authenticate.

it depends on whether you want to encrypt the whole system, including root filesystem, or if encrypting the data partitions is enough.

for the latter case you can ssh-login into the machine after boot, unlock the encrypted data partitions and start services manually.

in case that the root partition should be encrypted, you'll need to start a minimal ssh daemon in the initramfs in order to login remotely and unlock the root partition before the root filesystem is mounted.

the debian cryptsetup package supports remote unlocking of the root partition with the help of a dropbear ssh server inside the initramfs. see README.remote for more information:
http://svn.debian.org/wsvn/pkg-cryptsetup/cryptsetup/trunk/debian/README.remote

please note that this information is specific to the debian and ubuntu distributions. it doesn't apply if you use any other linux distribution.

Quoted 3 lines

or
Provide a usb key containing the secret key to our customer and read this key when the machine boots.

you already mentioned the drawbacks of this approach.

greetings,
jonas

#2 lore raw
Quoted 10 lines · ----- Jonas Meurer

it depends on whether you want to encrypt the whole system, including root filesystem, or if encrypting the data partitions is enough.

for the latter case you can ssh-login into the machine after boot, unlock the encrypted data partitions and start services manually.

in case that the root partition should be encrypted, you'll need to start a minimal ssh daemon in the initramfs in order to login remotely and unlock the root partition before the root filesystem is mounted.

Quoted 8 lines

the debian cryptsetup package supports remote unlocking of the root partition with the help of a dropbear ssh server inside the initramfs. see README.remote for more information:
http://svn.debian.org/wsvn/pkg-cryptsetup/cryptsetup/trunk/debian/README.remote

please note that this information is specific to the debian and ubuntu distributions. it doesn't apply if you use any other linux distribution.

Thanks Jonas,

That sounds ideal. However, i came across this so have some reservations.
http://www.howtoforge.com/unlock-a-luks-encrypted-root-partition-via-ssh-on-ubuntu

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see here)

(2) The created initrd can be manipulated so that it logs the crypto password somewhere. As /boot is not encrypted an attacker may gain this way the password for the LUKS-devices. You could, to prevent that, make a bootable cd with the according kernels and initrds and implement some kind of hash check... maybe there are other methods... feedback is welcomed here.

If you could elaborate on this i'd appreciate it.

Signature · 1 line
Niall
#3 lore raw
Quoted 5 lines

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see

here)

I am surprised that coreboot has not gotten more press about their capabilities.
I could swear that they claimed they could load the OS and wipe the memory on unload as a precaution for the paranoid. I don't have any details, but it sounded cool. I think I saw it in a Google Tech talk video.

Cheers,

Vlad

#4 lore raw
Quoted 5 lines · Vladimir Giszpenc
Quoted 5 lines

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see

Quoted 8 lines

here)

I am surprised that coreboot has not gotten more press about their capabilities.
I could swear that they claimed they could load the OS and wipe the memory on unload as a precaution for the paranoid. I don't have any details, but it sounded cool. I think I saw it in a Google Tech talk video.

Well, the only option to wipe memory in protection against a ColdBoot attack is if you have batteries in the RAM module and an additional processor there that does the wipe. However inflated claims have a long tradition in the indutrial security field, so it is also possible they just did not tell the truth.

Arno

Signature · 7 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] 
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 
#5 lore raw
In reply to Niall Murphy
Quoted 21 lines · On 21/09/2009 Niall Murphy wrote:
Quoted 10 lines · ----- Jonas Meurer

it depends on whether you want to encrypt the whole system, including root filesystem, or if encrypting the data partitions is enough.

for the latter case you can ssh-login into the machine after boot, unlock the encrypted data partitions and start services manually.

in case that the root partition should be encrypted, you'll need to start a minimal ssh daemon in the initramfs in order to login remotely and unlock the root partition before the root filesystem is mounted.

Quoted 8 lines

the debian cryptsetup package supports remote unlocking of the root partition with the help of a dropbear ssh server inside the initramfs. see README.remote for more information:
http://svn.debian.org/wsvn/pkg-cryptsetup/cryptsetup/trunk/debian/README.remote

please note that this information is specific to the debian and ubuntu distributions. it doesn't apply if you use any other linux distribution.

Thanks Jonas,

Quoted 8 lines

That sounds ideal. However, i came across this so have some reservations.
http://www.howtoforge.com/unlock-a-luks-encrypted-root-partition-via-ssh-on-ubuntu

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see here)

this attack is possible against all kinds of disk encrpyption and in no way related to remote disk encryption.

Quoted 6 lines

(2) The created initrd can be manipulated so that it logs the crypto password somewhere. As /boot is not encrypted an attacker may gain this way the password for the LUKS-devices. You could, to prevent that, make a bootable cd with the according kernels and initrds and implement some kind of hash check... maybe there are other methods... feedback is welcomed here.

yes, unencrypted boot partition is a security issue, but then an attacker as well can modify the kernel. attackers don't even have to modify software, they could install additional hardware like keyloggers as well.
in general you can only trust your system if you've physical control over it.

this again is not related/limited to remote disk encryption.

greetings,
jonas

#6 lore raw
In reply to Niall Murphy

Rule of thumb:

If an adversary has physical access to the system, he can bypass any mean of protection, if you don't know he had access.
In these cases, when there's a possibility, someone has physical access, you should always consider the system as compromised and you neither unlock anything, no matter if you do it remotely or locally.

Regards

-Sven

Quoted 47 lines · Niall Murphy
Quoted 10 lines · ----- Jonas Meurer

it depends on whether you want to encrypt the whole system, including root filesystem, or if encrypting the data partitions is enough.

for the latter case you can ssh-login into the machine after boot, unlock the encrypted data partitions and start services manually.

in case that the root partition should be encrypted, you'll need to start a minimal ssh daemon in the initramfs in order to login remotely and unlock the root partition before the root filesystem is mounted.

Quoted 8 lines

the debian cryptsetup package supports remote unlocking of the root partition with the help of a dropbear ssh server inside the initramfs. see README.remote for more information:
http://svn.debian.org/wsvn/pkg-cryptsetup/cryptsetup/trunk/debian/README.remote

please note that this information is specific to the debian and ubuntu distributions. it doesn't apply if you use any other linux distribution.

Thanks Jonas,

That sounds ideal. However, i came across this so have some reservations.
http://www.howtoforge.com/unlock-a-luks-encrypted-root-partition-via-ssh-on-ubuntu

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see here)

(2) The created initrd can be manipulated so that it logs the crypto password somewhere. As /boot is not encrypted an attacker may gain this way the password for the LUKS-devices. You could, to prevent that, make a bootable cd with the according kernels and initrds and implement some kind of hash check... maybe there are other methods... feedback is welcomed here.

If you could elaborate on this i'd appreciate it.

--
Niall
_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

#7 lore raw
Quoted 8 lines · Sven Eschenberg

Rule of thumb:

If an adversary has physical access to the system, he can bypass any mean of protection, if you don't know he had access.
In these cases, when there's a possibility, someone has physical access, you should always consider the system as compromised and you neither unlock anything, no matter if you do it remotely or locally.

Quoted 4 lines

Regards

-Sven

Indeed. The best password/passphrase does not help if you are talking to a compromised system.

Arno

Signature · 7 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] 
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 
#8 lore raw
In reply to Niall Murphy
Quoted 1 line · Niall Murphy

----- Jonas Meurer <[email protected]> wrote:

[...]

Quoted 7 lines

That sounds ideal. However, i came across this so have some reservations.
http://www.howtoforge.com/unlock-a-luks-encrypted-root-partition-via-ssh-on-ubuntu

It lists two types of attack to this approach:

(1) ColdBoot Attack by reading the crypto password from the ram blocks (not much you can't do against that without special hardware, see here)

If you are worried abouy ColdBoot attacks, you need to increase physical server security. A ColdBoot attacks are not possible without access to the hardware and are generally not a concern except in special situations. They also need advanced skills. They are not expensive though if the hardware access is there.

Quoted 6 lines

(2) The created initrd can be manipulated so that it logs the crypto password somewhere. As /boot is not encrypted an attacker may gain this way the password for the LUKS-devices. You could, to prevent that, make a bootable cd with the according kernels and initrds and implement some kind of hash check... maybe there are other methods... feedback is welcomed here.

If an attacker gets this level of control, other things are possible. The CD is not really a solution, since the attacker could change the boot order and boot a changed version of the CD from HDD (for example). Basically the CD for a clean system is only reliable if no other writable storage media are accessible at boot time and a cold boot is ensured. Otherwise an attacker could also boot the CD into a virtual machine, with the obvious consequences.

There are possibilities to fight this, e.g. a hard power-cycle every few hours and hardware that makes the HDDs unavailable until the CD has successfully booted. But I doubt that is an adequate solution here and it has drastic negative impact on reliability.

Better just do a careful restrictive firewall configuration, and make sure your system is patched.

Arno

Signature · 7 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] 
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 
#9 lore raw

How could this possibly help - One could still switch the CD, plug in a USB disk with an alternate boot environment, and as a last resort change the boot firmware.
I hardly see a chance of this suceeding, when physical access control is lost.

Regards

-Sven

Quoted 25 lines · Arno Wagner

There are possibilities to fight this, e.g. a hard power-cycle every few hours and hardware that makes the HDDs unavailable until the CD has successfully booted. But I doubt that is an adequate solution here and it has drastic negative impact on reliability.

Better just do a careful restrictive firewall configuration, and make sure your system is patched.

Arno
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email:
[email protected]
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
_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

#10 lore raw

The assumption is the attacker does not have physical access, obviously. And even then the CD is not secure, see below.

Arno

Quoted 44 lines · Sven Eschenberg

How could this possibly help - One could still switch the CD, plug in a USB disk with an alternate boot environment, and as a last resort change the boot firmware.
I hardly see a chance of this suceeding, when physical access control is lost.

Regards

-Sven

Quoted 18 lines · Arno Wagner

There are possibilities to fight this, e.g. a hard power-cycle every few hours and hardware that makes the HDDs unavailable until the CD has successfully booted. But I doubt that is an adequate solution here and it has drastic negative impact on reliability.

Better just do a careful restrictive firewall configuration, and make sure your system is patched.

Arno
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email:
[email protected]
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

Quoted 7 lines

If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier
_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

Signature · 7 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] 
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 
#11 lore raw
In reply to Jonas Meurer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Jonas Meurer
Quoted 9 lines · On 16/09/2009 Niall Murphy wrote:

We provide a computer that acts as a server for our customers, who have no physical interaction with the machine.
We need the data on this machine to be decrypted as it is needed by a number of services on-the-fly.
As we need to provide automatica authentication we either need to:

Keep the parts of the filesystem required to boot up and allow an OpenVPN ssh session - permanently decrypted - so that we can remotely authenticate.

[...]

Quoted 4 lines

in case that the root partition should be encrypted, you'll need to start a minimal ssh daemon in the initramfs in order to login remotely and unlock the root partition before the root filesystem is mounted.

(WARNING: SHAMELESS PLUG)

More convenient would be to use the Mandos program[1], which runs as a small client program in the initramfs and retrieves the password to unlock the root disk from a server on the network.

All network communication is encrypted using TLS. The clients are identified by the server using an OpenPGP key; each client has one unique to it. The server sends the clients an encrypted password. The encrypted password is decrypted by the clients using the same OpenPGP key, and the password is then used to unlock the root file system, whereupon the computers can continue booting normally.

This allows computers with encrypted root file systems to be capable of remote and, more importantly, UNATTENDED reboots.

The package is available in both Debian unstable and Ubuntu.

1) http://www.fukt.bsnet.se/mandos

/Teddy Hogeborn, Mandos-co-author and -maintainer

- --
The Mandos Project
http://www.fukt.bsnet.se/mandos
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKuKXGOWBmT5XqI90RApvWAJ42QpB01kmKCnKLsGJJNUz4b6iiiwCfRUTX rJBx9MWCXOwlpXJ9opuckAs=
=W3bG
-----END PGP SIGNATURE-----