Big Idea 5.6 Safe Computing
Personal Identifiable Information (PII)
Personal Identifiable Information or PII is a type of information that is specific to you. For example, your age or race would be an example but something like your favorite cat isn’t (Will insists your diet is a PII but it’s not).
There are times when we want to post our PII online. For example, you would want to upload it to your job profile or a site like LinkedIn because you want people to see it. However, be careful where you upload this data. It will be known by everyone since it’s public.
Some things that you should be cautious about to upload (gray area) would be:
- Birth date
- Place of birth
- Address
- Phone number
- Maiden names
- Drivers License Number
There are things, however, that you will most likely have to upload publicly OR can be found with a quick search. For example:
- Name
- Date of Birth
- SSN
- Bank Account info
- Picture
- What high school you attended
- What college you went to
- Properties you own
- State/City of residence
- Previous residence
You could upload this online (some you have to. Ex: home address for Amazon) but be careful where you upload it. You don’t want to post your mother’s maiden name on social media.
Things that you should keep confidential would be:
- Private credentials for accounts and what-not
- Two-factor authentication
- This is common for sensitive things like financial data
- Social security numbers
- Tax records
- Medical information
- Financial data
Most if not all financial and government documents should be kept private. However, there will be times when you need to share this. For example, if you are applying for a RealID (form of identification), you will need to submit your social security number.
POPCORN HACK 1:
How do you decide what personal information to share online and what to keep confidential?
Beware, Establish practices for your own Safety
Authentication
Authentication measures protect devices and information from unauthorized access.
Strong Passwords
The easier the password is to guess, the easier it is to make a mess. Strong passwords:
- 10 or more characters
- Must contain a symbol
- Must contain a number
- Must contain lowercase and uppercase letters
- Avoid dictionary words/things known about you (ex. “Password”, “123456”, your birthday, your name, your pet’s name, etc.) The above are things hackers can look for while guessing your password
Types of Authentication
- What the user knows (ex. passwords, answers to security questions, etc.)
- What you are (ex. biometric data like eye scan, palm print, thumbprint, etc.)
- What you have (ex. keycards, etc.)
Multi-factor Authentication
When one or more of these authentication measures are used, it is considered multi-factor authentication.
Precautions
- Run Virus scans to help prevent malicious code from getting into and affecting your system.
- Keeping the operating system and other software up to date can also fix errors that would allow a virus or malware to compromise a system.
POPCORN HACK 2:
How can multi-factor authentication enhance security?
Nefarious Uses of Internet
Virus and Malware
Virus
- Viruses can allow unauthorized access by modifying the operating system to accept any user without authentication.
- Virus malicious programs that can copy themselves and gain access to systems that they are not supposed to be in.
Malware
- Malware is often intended to damage a computing system or take partial control over its operation.
- Infiltrates a system by posing as legitimate programs or by attaching itself to legitimate programs, like an email attachment.
- Malware is often sent in attachments to things in email. Often they request you to click on an attachment and it starts the process of adding a virus to your computer.
Phishing: Phishing is an attempt to trick a user into providing personal information (PII) by using social manipulation. Phishing emails look like they’re from a trusted source. They may appear to be an email from a bank or credit card company or a store. They could also be from a Nigerian prince or a fish who is phishing.
They try to trick you into clicking a link and may try to scare you or lure you with the promise of something like money. The link could cause unexpected harm. They may install a virus or keylogger on your computer. A keylogger records keystrokes made by the user which can be used to get credentials. They could also turn your computer into a rogue access point or a fake wireless network which can be used to infect other computers.
Factors to Increase Security of System
Encryption is a good way to increase security of a system.
- Passwords vs. keys: A password is something used to login or unlock an account, while a key is used to encrypt/decrypt the data being used or transferred by that account.
Demoing cryptography - Symmetric Encryption - Basic ciphers or codes
- Symmetric encryption uses one key to encrypt and decrypt
- Examples: Caesar Cipher, Morse Code, Rail Fence Cipher, PSK, etc.
- Asymmetric encryption is much more secure. It uses public keys to encrypt and private keys to decrypt.
- Examples: RSA, Diffie-Hellman, Public Key Encryption
“Alice and Bob”
Alice wants to send an encrypted message to her friend Bob.
With symmetric key encryption, the following process ensues:
Pretty simple, right! You know what else is simple? Trying to share the encryption/decryption key without letting anyone else know. Enter: Asymmetric Encryption
POPCORN HACK 3:
What are the key differences between symmetric and asymmetric encryption?
SSL/TLS
Uses a Certificate Authority(CA) to generate a signed certificate that proves the server’s legitamacy.
Authentication: SSL/TLS certificates ensure the identity of the server and sometimes the client. They contain information about the entity they are issued to, including the domain name and public key.
Encryption: SSL/TLS certificates facilitate encrypted communication between the client and server. They enable the encryption of data transmitted over the internet, preventing eavesdropping and unauthorized access.
Certificate Authorities (CAs): CAs issue SSL/TLS certificates after verifying the identity of the certificate requester. They act as trusted third parties that sign and validate the authenticity of certificates.
Public and Private Keys: SSL/TLS certificates use asymmetric encryption, involving a public key to encrypt data and a private key to decrypt it. The public key is embedded in the certificate while the corresponding private key is securely held by the server.
Handshake Protocol: When a client connects to a server, they engage in a handshake protocol to establish a secure connection. This involves agreeing on encryption algorithms, exchanging keys, and verifying the authenticity of the certificates.
Expiration and Renewal: SSL/TLS certificates have a validity period. They need to be periodically renewed to maintain secure communication. Expired certificates can disrupt services and pose security risks.
HTTPS: SSL/TLS certificates are commonly used in web browsers to enable HTTPS connections. They signal a secure connection, ensuring data integrity, confidentiality, and authenticity between the web server and the user’s browser.
- Ex: When we used certbot to make our backend server run using HTTPS in the passion project
Firewall and antivirus Firewall and antivirus software is a really good and easy way to protect your computer. Pretty much all computers come with this software and are enabled as a default. Just make sure to not disable it!
Homework
- Describe PII you have seen on a project in CompSci Principles.
All on of our CSP projects I have put my name which is an example of PII. For our binary project our group also decided to include the images of the faces of each of our team members which is another example of PII
- Describe good and bad passwords? What is another step that is used to assist in authentication?
Effective passwords are those that are both distinctive and challenging to deduce without prior knowledge almost random. Conversely, inadequate passwords are typically simplistic, easily guessable, and susceptible to brute force attacks. An example is incorporating personal information or common English words into your password. Traits in strong passwords include length (exceeding 10 characters), a combination of symbols and numbers, a mix of lowercase and uppercase letters, and an absence of common words or sequences (e.g., “hello,” “123,” “!@#”). Authentication processes may also incorporate additional measures, such as biometric methods (e.g., fingerprints) or physical tokens (e.g., keycards).
- Try to describe Symmetric and Asymmetric encryption.
Encryption involves the process of securing data by transforming it into an unreadable format, preventing unauthorized access. This encrypted data can then be deciphered back to its original form by the intended recipient, ensuring confidentiality. The transformation from clear data to a scrambled format (secured data) and back is facilitated through the use of keys. Symmetric encryption utilizes a single key for both the encryption and decryption processes, whereas asymmetric encryption employs one key for encryption and a distinct key for decryption.
- Provide an example of encryption we used in AWS deployment.
When accessing the AWS console, we employed the TLS and SSL protocols, which establish a secure connection between the user’s browser and the server by exchanging encryption keys. This encryption encompasses SHA and RSA algorithms, incorporating both symmetric and asymmetric encryption methods. This encryption framework guarantees that all login information shared between the user and the server remains securely encrypted.
- Create a python script that lets the user input a password that is checked by the program
BONUS: Use online wordlists to compare the password, preventing dictionary attacks
import nltk
# password input
user_password = input("Enter a password for validation: ")
print(f"Password to check: {user_password}\n")
#Counters for passed and failed checks
passed_checks = 0
failed_checks = 0
# Check #1: Length > 10 characters
print("Check #1: Password length greater than 10 characters.")
password_length = len(user_password)
if password_length > 10:
passed_checks += 1
print(f"You have {password_length} characters, passing Check #1.\n")
else:
failed_checks += 1
print(f"You have {password_length} characters, failing Check #1.\n")
# Check #2: Contains at least one symbol
print("Check #2: Password contains at least one symbol.")
symbols = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "[", "]", "{", "}", "|", r"\\", ";", ":", "'", '"', ",", "<", ".", ">", "/", "?"]
symbol_count = sum(1 for char in user_password if char in symbols)
if "\\" in user_password:
symbol_count += 1
if symbol_count >= 1:
passed_checks += 1
print(f"You have {symbol_count} symbols, passing Check #2.\n")
else:
failed_checks += 1
print(f"You have {symbol_count} symbols, failing Check #2.\n")
# Check #3: Contains at least one number
print("Check #3: Password contains at least one number.")
number_count = sum(1 for char in user_password if char.isdigit())
if number_count >= 1:
passed_checks += 1
print(f"You have {number_count} numbers, passing Check #3.\n")
else:
failed_checks += 1
print(f"You have {number_count} numbers, failing Check #3.\n")
# Check #4: Contains both lowercase and uppercase letters
print("Check #4: Password contains both lowercase and uppercase letters.")
if any(c.islower() for c in user_password) and any(c.isupper() for c in user_password):
passed_checks += 1
print("Password contains both lowercase and uppercase letters, passing Check #4.\n")
else:
failed_checks += 1
print("Password lacks either lowercase or uppercase letters, failing Check #4.\n")
# Check #5: Avoid common English words
print("Check #5: Password is not a common word.")
common_words = set(nltk.corpus.words.words()) # English words dataset from nltk
def is_common_word(password):
return password.lower() in common_words
if is_common_word(user_password):
failed_checks += 1
print("Password is a common word, failing Check #5.\n")
else:
passed_checks += 1
print("Password is not a common word, passing Check #5.\n")
# Display final result
if failed_checks > 0:
print(f"Passed {passed_checks} checks and failed {failed_checks} checks. Improve your password!")
else:
print(f"Passed all {passed_checks} checks! Your password is strong. Well done!")
Password to check: pizzaslurper500!
Check #1: Password length greater than 10 characters.
You have 16 characters, passing Check #1.
Check #2: Password contains at least one symbol.
You have 1 symbols, passing Check #2.
Check #3: Password contains at least one number.
You have 3 numbers, passing Check #3.
Check #4: Password contains both lowercase and uppercase letters.
Password lacks either lowercase or uppercase letters, failing Check #4.
Check #5: Password is not a common word.
Password is not a common word, passing Check #5.
Passed 4 checks and failed 1 checks. Improve your password!