Security Fundamentals
Lecture 7
jaysa
Security Basics
Why do we care?
Basic Principles
Most important: know your threat model
Understand what is at risk and what you can do to minimize risk
Security Goals and Implementation
Ensure only those with approved access can read data
Encryption
This is a secret!
cxn1!qw?>p%w$sn$
Key
Decryption
cxn1!qw?>p%w$sn$
This is a secret!
Key
Symmetric cryptography:
Same key for encrypting and decrypting data
Encryption
cxn1!qw?>p%w$sn$
This is a secret!
Key
This is a secret!
Decryption
Plaintext
Plaintext
Ciphertext
Asymmetric cryptography (AKA public key cryptography):
Comes in public-private key pairs where public key is for encryption and private key is for decryption
Encryption
cxn1!qw?>p%w$sn$
This is a secret!
Public key
This is a secret!
Decryption
Private key
Asymmetric cryptography
Plaintext
Plaintext
Ciphertext
Quick demo with `age`
2. Integrity
Ensure data has not been tampered with
2. Integrity
Cryptographic hash functions possess properties that make it difficult to find two inputs with the same hash
2. Integrity
It is difficult to revert a hash to its input
Demo with `sha256sum`
3. Authentication
Prove the author/source of data
Demo with `ssh`
4. Availability
Ensure systems and data are available to authorized users when they need it. Mostly applicable to services hosted on servers.
Questions?
Security Fundamentals
File Security: Permissions and Ownership
Background
UNIX Permissions Model
ls -l to see file permissions
Permissions
d r w x r - x r - -
Whether file is directory (d) or file (-)
User:
read
write
execute
Other:
read
Group:
read
execute
Modifying Permissions
2 primary ways to modify permissions/file access:
Changing File Ownership
[sudo] chown [-R] newuser:newgroup [FILES]
Changing File Permissions
[sudo] chmod [-R] [permissions] [FILES]
Why is this important?
Poor file security is one of the easiest ways to leak information or give an attacker too much privilege on your system.
What happens if you set these permissions on your private key?
�
Signatures and Certificates
Questions?
Signatures and Certificates, cont.
Enter certificates:
HTTPS
“SSL certificate”: encrypted HTTP request, validated publically
Signatures and Certificates, cont.
BeyondCorp and Zero Trust
Thank you!