T4 Flashcards

1
Q

Recap on the Tutorials: What are the first four about?

A

Chapter 1
T1: Exposed Attack Surface (Nmap, NetDiscover)
Chapter 2
T2: DES vs AES encryption with OpenSSL
T3: Bash Scripts Dictionary Attack on Symmetric Key Encryption
T4: Symmetric AND Public Key with GPG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

4 Main Activities in T4

A
  1. Generating and Managing Keys
  2. Encryption
  3. Verifying Authenticity
  4. “Web-of-trust”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

GPG

GnuPG

A

A software tool used for both symmetric and asymmetric encryption

implementation of the OpenPGP standard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Common uses of GPG

A
  • Encrypting emails
  • Encrypting generic input files
  • Authenticating messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GUI?

A

There are many GUIs facilitating the usage of GPG but we are interested in the basic operations so we use command line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

After entering “gpg –gen-key” what happens?

First Step

A

Asks to enter name and email, then creates the keys.

*May take some time because kernel needs tp collect enough “entropy” to make secure random numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

gpg –list-public-keys

gpg –list-secret-keys

Second Step

A

Lists all public keys
Lists all private keys

Stored in “hidden directory in user home directory

*Doesn’t actually show keys it shows their id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

gpg –output revoke.asc –gen-revoke <KEY-ID></KEY-ID>

Third Step

A

What it does:
Creates a certificate to revoke a key if it is ever compromised.
(maybe you no longer have access to your private key and want to tell others its not valid)
Why it’s critical:
Prevents others from trusting a key that is no longer secure or in your possession

If private key is compromised, its important that we eliminate it ASAP

Command to enter reason for revocation, and then saves it as a human-readable file revoke.asc. You shold store this securely offline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What warning do we see after creating revocation certificate?

A

Please move it to a medium which you can hide away; if Mallory gets access to this certificate he can use it to make your key unusable.

If an attacker gets the revocation certificate, they can invalidate your key and disrupt its use – if you print to store offline make sure system doesn’t store print job temporarily

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

gpg –export -a >Key-ID< mykey.asc

Fourth Step

A

We have our public key, but no one knows it…

This command exports public key into ASCII (text version instead of binary) for easy sharing

Can make available online but MUST use httpS not http

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why can we not put public key on website using http?

A

Data is sent in plaintext over http, its not encrypted. If you publish public key on a website using HTTP, and attacker could intercept the connection nad replace your key with their own

Man-in-theMiddle Attacks — interception!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

After exported ASCII file for public-key, there is a text version of it

The private-key remains stored in home directory.

Is it secure?
How can I manage the confiddentialist of my private-key?

A
  • Default permissions restrict access to home directory
  • Could use software tools for encrypting home directory
  • Could store private key somewhere else

LUKS disk encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

> gpg –send-keys –keyserver >KEY-SERVER< >KEY-ID<

Fifth Step

A

Uploads public-key to specified key server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

> gpg –search-keys ‘g.dangelo@unibo.it’
If the output of the command reports the public-key that I’m looking for then I can import it in my
keyring. **What does this mean? **Warning: think carefully about the security implications of this action. What are the security implications?

A

Attacker can upload their own key to the keyserver pretending it belongs to the professor’s email.

Ask the person directly for the key fingerprint, and use the gpg –fingerprint >Key-ID< command to check

Use gpg –import keyfile.asc to import the key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

gpg –encrypt –recipient ‘g.dangelo@unibo.it’ foo.txt

Sixth Step

A

After importing public key, we encrypt the document ‘foo.txt’ that we ultimately want to deliver to recipient (professor)

15
Q

> gpg –output foo.txt.sig –sign foo.txt

Seventh Step

A

Signs the file to prove authenticity and integrity

With our private key

16
Q

> gpg –encrypt –sign –recipient ‘g.dangelo@unibo.it’ foo.txt

Also Seventh Step

A

Encrypt and sign for confidentiality AND authenticity and integrity

17
Q

Web-of-trust

Eighth Step

A

Decentralized model of trust where users validate and sign each other’s public keys (using our private-key) idelaly by identifying them in real life and validating that they are the ones in possession of their public-key that they are hosting on some key server

Browsers use Certificate Authorities for verification, unlike GPG whic relies on individual users

18
Q

Fingerprint

A

Hash value uniquely identifying a public key, easier to cary and share than full key

19
Q

gpg –fingerprint >KEY-ID<

Eighth Step

A

Generate fingerprint

20
Q

Suggested Procedure for Sharing Fingerprint

A

Print fingerprint and public key indentifier on paper, share with person signing your key after verifying your ID

21
Q
A
22
Q

gpg –keyserver >keyserver< –recv-keys cireinitlus

Ninth Step

What command comes next?

A

Use keyserver to fetch the key you want to sign

gpg –sign-key

as of now its still locally on device, need to propogate it to keyserver

23
Q

gpg –keyserver keys.openpgp.org –send-key >Key-ID<

Tenth Step

A

Propagate the signed key to a public keyserver so others in the web-of-trust can benefit

24
Q

gpg –list-sigs g.dangelo@unibo.it

Tenth Step

A

View all signatures on professors key

25
Q

What about symetric encryption?

A

Yes, gpg also has a default symmetric ciper and many others

> gpg –output foo.txt.gpg –symmetric foo.txt

26
Q

Are there other tools besides GPG?

A

Yes, and in fact GPG is quite old now and has too large of an attack surface so many are using “age” available cross-platform