Security on thumb drive


Forum: DSL Embedded
Topic: Security on thumb drive
started by: spotslayer

Posted by spotslayer on July 01 2006,20:11
Good afternoon all,  I have been away from DSL for quite a while now. I have alway carried my last install on a thumb drive which was 1.2. That thumb was lost. I have a brand new 5-way install of 3.01 on my new 256 cruzer. Man are there a lot of improvements. I am lost. I have some new stuff to learn. But enough of that. This is what I am trying to research. The fact that I lost my old drive gives me some concern. I would like to secure this new install as much as possible. I would really like to secure usb boot and embedded boot. If I lost this one I would really like the confidence that no one will be able to just plug it in and access my stuff. I would really like ideas and suggestions that will accomplish this.

David

Posted by roberts on July 01 2006,21:42
We provide the boot option "protect" to triple des encrypt the backup file. It was made just for the pendrives. It has been around since dsl v1.1 see change log (Notes).
Posted by spotslayer on July 01 2006,23:22
Great!!  I wish I had payed better attention back then. That looks like just what I wanted. Is there any special setup to use this function? Do I just add it to the start files? I will just give it a try and see where I get. Thank's a bunch Roberts

David

Posted by spotslayer on July 02 2006,18:51
Well I have a guestion(s) concerning this process. I have this configuration in one of my start files. A .des file is created and seems to work as it should.


fromhd=/dev/sda1 qemu frugal protect quiet modules=hdb nousb noscsi nofirewire atapicd noideraid noacpi acpi=off dma noapm noagp nomce

The question is that everytime the system starts I am prompted twice for a password. I just want to be sure this is the way things are suppose to work. For some reason I thought that once a password was issued I should only have to enter the password once at the next login. Do I have the configuration correct?  Should I be prompted for the password twice at every login?

If I have things setup correctly then I am happy. If it could be improved I would sure like to know the way.

David

Posted by WDef on July 03 2006,09:05
Quote
Should I be prompted for the password twice at every login?


Yes.  All it's doing is checking that you typed the exact same thing twice.

Posted by spotslayer on July 03 2006,12:27
I understand that part WDef. Thank's for the response. I just can't remember any other instance of this. Most things ask for a password twice when you setup or change it to verify you know what you typed, then only once after that. Asking twice for every login seemed wrong to me. If this is the way it is intended to be and that is the way it is working for me then all is well. It just seems awkward.

David

Posted by WDef on July 05 2006,10:15
This has confused a few others as well in the past so you're not alone.

You enter the password twice during bootup not only to decrypt an existing encrypted backup but also to set the password to encrypt your next backup - the password is written to a file /etc/sysconfig/des and this is read when the backup is made.

It's clearly a good idea to check the password typing for consistency before saving it to this file otherwise a simple typo might render your backup un-decryptable. Hence typing it in twice.

I suppose it might be slightly clearer if the script returned an error message "You typed 2 different passwords" or something if you type the password differently each time.

The scripts could also be changed (I suppose) to only prompt for the password twice if an encrypted backup were found, but it's unnecessary complexity and there's no harm in a typing consistency check for decryption.

One point to note is that saving the password in plaintext to a file is a potential vulnerability of this type of scheme - should you be on a network and get hacked, the attacker might just read your password. At one point I suggested that this file be made only readable by root (600 perms) but that won't help that much since user dsl can sudo su to root. As with all encryption, if high security is needed it's better not to use it while connected to any network (inc the internet of course).

It's also worth noting that the password needs to be longer than 8 chars or something, else you are not encrypting with triple des but only with single des, which is broken.  Don't use single des.

Posted by spotslayer on July 06 2006,00:58
Thank's WDef that helps explain things for me. It is a good tip on the 8 character password. Is this feature documented anywhere? I have searched about and not found any.

David

Posted by WDef on July 06 2006,08:14
I don't know if it's documented.

The 8 char threshold for triple des  (if my memory serves me correctly) is stated in the des command's help output.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.