October 16

Ubuntu: Autologin to an encrypted drive on startup

Make certain that you understand the security implications of using auto login on an encrypted drive.

Part 1: Encrypt the secondary drive.

  1. In the Unity dash type “disks” and hit enter.
  2. Below “Devices” click on the hard drive you want to encrypt.
  3. Below “Volumes” click on the cog/more actions button.
  4. Click “Format Volume”. For type, choose “Encrypted, compatible with Linux systems.” Name your drive and give it a strong pass phrase.
  5. Click “Format”

 

Part 2: Automatically mount the HDD on system start-up.

  1. Keep the “Disks” application open, and click on the cog.
  2. Click “Edit Encryption Options.”
  3. “Automatic Encryption Options” will be turned on, and the menu below greyed out. Turn automatic encryption options off.
  4. Enter the pass phrase from when you formatted the disk. Click “Ok”.

You now have an encrypted hard drive that will automatically login when your computer boots.

By: Tryion

Automount your encrypted drive:
If you want to have your encrypted volume automount you can do the following:

1. Create a directory on your drive that you want to mount: mkdir /media/datavolume
2. Type: cat /etc/crypttab
2. Look for the LUKS UUID.  eg: luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73
3. Using your newly discovered encrypted volume ID, add the following to your fstab file:
4. /dev/mapper/luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73      /media/datavolume      ext4      defaults      0      2

By: Timothy Conrad

Category: Linux, Security | Comments Off on Ubuntu: Autologin to an encrypted drive on startup
July 11

Security: Step by step directions for setting up your private key using gpg

Here are the steps for generating your own Public and Private keys using gpg.
Only do this on a clean computer that you are certain you can trust that it has not been compromised.

1) Type: gpg –gen-key
2) Press <Enter>
3) Follow the prompts and answer each question

youruser@yourcomputer:~$ gpg –gen-key
gpg (GnuPG) version#; Copyright (C) year Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 1

RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096

Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0

Key does not expire at all
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
“Heinrich Heine (Der Dichter) <[email protected]>”

Real name: FirstName LastName
Email address: [email protected]
Comment:
You selected this USER-ID:
“FirstName LastName <[email protected]>”

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

4) GPG will take a few minutes processing your new key, so go about using your computer as normal until you see that is has completed.

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 187 more bytes)
…………….+++++

Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 248 more bytes)
……………………+++++
gpg: key C4C3FB44 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
pub 4096R/C4C3FB44 2016-07-11
Key fingerprint = 3CC3 356A 33AB 5411 1AA2 5211 AD13 351A C4C3 FB44
uid FirstName LastName <[email protected]>
sub 4096R/DD21DA31 2016-07-11

5) Once this completes, you can now look at the keys in your keystore
6) Type: gpg –list-keys
7) Press <Enter>

youruser@yourcomputer:~$ gpg –list-keys
/home/tconrad/.gnupg/pubring.gpg
——————————–
pub 4096R/C4C3FB44 2016-07-11
uid FirstName LastName <[email protected]>
sub 4096R/DD21DA31 2016-07-11

8)At this point, I would suggest exporting your keys and store them in a trusted secured location.
9) Type: gpg –export-secret-key -a “yourkeyID or Name” > your-priv.key

tconrad@IS005156:~$ gpg –export-secret-key -a C4C3FB44 > your-priv.key

10) Type: gpg –export -a “yourkeyID or Name” > your-pub.key

tconrad@IS005156:~$ gpg –export -a C4C3FB44 > your-pub.key

11) Finally if this is not the computer you will decrypt on I would suggest deleting your private key off of it as long as you have back it up to a secure location following the above steps.

12) Type: gpg –delete-secret-key “yourkeyID or Name”
13) Follow the prompts

youruser@yourcomputer:~$ gpg –delete-secret-key C4C3FB44
gpg (GnuPG) 1.4.20; Copyright (C) Copyright Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sec 4096R/C4C3FB44 2016-07-11 FirstName LastName <[email protected]>

Delete this key from the keyring? (y/N) y
This is a secret key! – really delete? (y/N) y

14) Enjoy your new encryption option

By: Timothy Conrad
This post was inspired by Citizenfour and Laura Poitras

Category: Security | Comments Off on Security: Step by step directions for setting up your private key using gpg
July 10

Security: A GPG Cheat Sheet

GPG is an outstanding security program that allows you to encrypt files based on someone’s public key.  The file is then decrypted by the private key of the public key holder once they receive it.

This is my version of a gpg survival guide.

Pulling someone’s key
gpg –keyserver pool.sks-keyservers.net –recv-keys bbc81a91

Sending your key to a public keyserver
gpg –send-keys bbc81a91

Refreshing your keys from a keyserver
gpg –refresh-keys

Generating a key
gpg –gen-key

Exporting a public key
gpg –export -a “Key Name” > pub.key

Exporting a private key
gpg –export-secret-key -a “Key Name” > priv.key

Deleting a private key
gpg –delete-secret-key “Key Name”

Deleting a public key
gpg –delete-key “Key Name”

Importing a key
gpg –import public.key

Listing the keystore
gpg –list-keys

View the entire fingerprint key of all of your installed keys
gpg –list-keys –fingerprint

Search a keyserver
gpg –search-keys –keyserver pool.sks-keyservers.net “name”

Encrypting a file for someone using there public key so only they can decrypt it
gpg –encrypt –recipient “Their Name” filename.txt

Encrypting a file for someone using there public key and your public key so you both can decrypt it.
gpg –encrypt –recipient “Their Name” –recipient “Your Name” filename.txt

You can also define groups of people to encrypt messages to by defining the group in the gpg.config file
gpg –encrypt –recipient myfriends filename.txt

Decrypt a file to the screen
gpg –decrypt filename.txt.gpg

Decrypt a file to disk
gpg filename.txt.gpg

Shorthand version of gpg”
gpg -e -r “There Name” filename.txt

This post was inspired by Citizenfour and Laura Poitras

Category: Security | Comments Off on Security: A GPG Cheat Sheet