CS140 Computer Security, in 140 flashcards

studied byStudied by 6 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 139

flashcard set

Earn XP

Description and Tags

Flashcards which cover (most of) the examinable content for CS140. Good luck to everyone taking the exam!

140 Terms

1

What are the two general features of Computer Security?

There is no such thing as absolute computer security.

Theory is not the same as practice.

New cards
2

What does CIA stand for in the CIA triad?

Confidentiality, Integrity, Availability

New cards
3

In CIA, what does Confidentiality intend to achieve?

Preventing access to unauthorised users

New cards
4

In CIA, what does Integrity intend to achieve?

Preventing unauthorised changes

New cards
5

In CIA, what does Availability intend to achieve?

Ensuring authorised users are not denied or delayed access when unwarranted

New cards
6

What are the features of a worm?

  • Self-replicates

  • Rapid growth

  • Standalone

New cards
7

What are the features of a virus?

  • Replicates into other executable code

  • Rapid growth

New cards
8

What does a DDoS attack achieve?

Overwhelms a network device with enormous amounts of useless traffic data, to the point where it is inaccessible/useless to real users. Usually achieved using a botnet.

New cards
9

What is Hacktivism?

An attack on computer security with some motive related to protest and/or politically charged activism.

New cards
10

What is Social Engineering?

An attack on computer security where no technical skill is necessarily involved. Instead, the attacker exploits the trust of a user of a given network or service, typically to divulge personal information.

New cards
11

How is physical security a significant factor in computer security?

Often times, it is easier to steal a machine than to use technical measures to remotely access it. It is significantly easier to get someone to give the password to their laptop by threatening them, than to attempt to crack said password.

New cards
12

What is an Asset?

Something we wish to protect

New cards
13

What is a Vulnerability?

A flaw in a security system

New cards
14

What is a Threat?

A potential for a violation of security
(Capability x Intent)

New cards
15

What is an Attack?

An assault on security where a threat exploits a vulnerability

New cards
16

What is Risk?

The expected loss, expressed as the product of the chance of an attack and the harmful result
(Threat x Vulnerability x Harm)

New cards
17

What is Qualitative Risk Analysis?

An analysis of expected loss expressed in a checklist or similar format, e.g. DREAD by Microsoft.

New cards
18

What is Quantitative Risk Analysis?

An analysis of expected loss expressed in a mathematical model, such as a fault tree.

New cards
19

What is a Countermeasure?

An action that aims to reduce a threat, by preventing or detecting attacks and correcting it.

New cards
20

Give some examples of how a security system is dependent on at least some level of trust.

  • Trusted Users (Access Control)

  • Web of Trust (Public Key Encryption)

  • Trusted Systems (Certificate Authorities)

New cards
21

What is Plaintext?

An unencrypted message

New cards
22

What is Ciphertext?

An encrypted message

New cards
23

What is Encryption and Decryption?

The process of converting plaintext into ciphertext (or vice versa)

New cards
24

What are the differences between Public key and Secret key encryption?

  • S uses a single key known by both parties, P uses separate keys for encryption and decryption.

  • S uses the same algorithm and key for encryption and decryption, P uses different algorithms and keys for each.

  • S is based on very fast bitwise operations, P is based on slower mathematical operations.

New cards
25

What is Steganography?

The process of hiding information within another object. This is commonly done with pictures.

New cards
26

What is the formula for the steganographic process?

coverMedium + hiddenData + steganoKey → steganoMedium

New cards
27

What terms describe the following encryption method?
Plaintext: SECRET MESSAGE
Ciphertext: PASTA CARBONARA

Code Words, Dictionary, Code Book, Look-up table

New cards
28

What term describes the following encryption method?
Plaintext: SECRET MESSAGE
Ciphertext: SESEET SXCMAXREGX

Transposition/Permutation Cipher

New cards
29

How can a transposition cipher be made more secure?

  • Define a keyword, and swap columns by the letters’ alphabetical order.

  • Perform a second transposition.

New cards
30

What term describes the following encryption method, and what is it vulnerable to?
Plaintext: SECRET MESSAGE
Ciphertext: TFDSFU NFTTBHF

Monoalphabetic substitution cipher
These are vulnerable to frequency analysis, making them practically ineffective.

New cards
31

What encryption method uses a mapping of monoalphabetic ciphers and a text-based key in order to obfuscate messages?

Polyalphabetic substitution cipher

New cards
32

What encryption method is deemed to be the most theoretically secure possible, but is practically ineffective?

One-time pad

New cards
33

What are the key principles of a good encryption algorithm?

  • Confusion

  • Diffusion

  • Difficult to break, even with generous assumptions

  • Feasibly Maintainable

New cards
34

What is the difference between a block cipher and a stream cipher?

A block cipher splits data into set chunks (of bits/bytes), encrypting each, whereas a stream cipher encrypts each bit/byte on its own.

New cards
35

Give a brief overview of a round of DES encryption.

  • Data is split into a left and right part

  • The right part is run through the Feistel Function with a subkey

  • The ouput is fed into the next round’s left portion.

  • The output of the Feistel Function is computed in an XOR with the left part, which goes to the next round’s right portion.

New cards
36

What two operations are performed in subkey generation in DES?

Shifts and Shuffling of Bits.

New cards
37

What steps are performed in the Feistel Function of DES?

  • Expansion

  • Key Combination (XOR)

  • Substitution

  • Permutation

New cards
38

How is a message encrypted using DES decrypted?

By passing the ciphertext into the same encryption algorithm, with the private key (the order of subkeys reverses)

New cards
39

Why is DES considered insecure, and AES secure?

DES uses shorter keys, whereas AES uses longer keys of size 128, 192 or 256 bits long.

New cards
40

AES uses a similar algorithm to DES. What steps are performed in AES?

  • Substitution (Using a look-up table)

  • Permutation (Shifts)

  • Mixing (By multiplying by a matrix)

  • XOR with the round key

New cards
41

Give the properties of modular (%) arithmetic.

(A + B) % n = ((A % n) + B) % n
(A + B) % n = ((A % n) + (B % n)) % n
(A * B) % n = ((A % n) * B) % n
(A * B) % n = ((A % n) * (B % n)) % n
x ^ (A * B) % n = (((x ^ A) % n) ^ B) % n
(((x ^ A) % n) ^ B) % n = (((x ^ B) % n) ^ A) % n

New cards
42

What is the expression (y ^ x) % p referred to as?

Modular Exponentiation

New cards
43

What is a primitive root for some % p?

Some value that when raised to increasing powers and modularly divided by p, gives all the values 1, 2… p-1 in a repeating sequence.

New cards
44

Determine if 2 is the primitive root % 5 and % 10.

% 5 - Yes (2, 4, 3, 1, 2, …)
% 10 - No (2, 4, 8, 6, 2, 4, …)

New cards
45

When is the expression k = (y ^ x) % p a one-way function?

Where y is the primitive root % p, and p is a large number (e.g. 512 bits, or 64 bytes)

New cards
46

Suppose we are generating keys for RSA encryption. Let p = 7, q = 17, what is the public key produced (n), and what are the possible values of e?

n = 7 × 17 = 119
(p-1) x (q-1) = 6 × 16 = 96
e = 5, 7, 11, 13, 17, …

New cards
47

What is the contents of an HTTP request?

  1. Request Line - States request type (GET, POST, etc.) and HTTP version

  2. Headers, including host site, accepted encodings, languages, etc.

New cards
48

What is the contents of an HTTP response?

  1. Status Line - Includes status code (200, 404, etc.) and reason phrase.

  2. Headers, including the length of the content, E-Tag, content, type, etc.

  3. The requested content, if applicable.

New cards
49

What does CGI stand for, and what does it allow for?

Common Gateway Interface. This is a standard way to allow the running of other programs on a web server to fulfill a request.

New cards
50

Why can public key encryption be described as “symmetric”?

We can apply either the secret or public key first, followed by the other, and still achieve the same plaintext. This follows from the following property:
((x ^ a) % n) ^ b == ((x ^ b) % n) ^ a

New cards
51

For public key encryption, we typically encrypt with the public key, then decrypt with the private key. However, we can swap the keys so that we encrypt with the private key. Why might we want to do this?

  • Integrity - We do not care about the privacy of the information (since anyone can decrypt), but we don’t want anyone to tamper with the message (as only the owner knows the private key)

  • Authentication - We can be absolutely sure who the message came from.

  • Non-repudiation - If the message we send is malicious, the system can prove it came from us.

New cards
52

If we use public key encryption for integrity and not confidentiality, encrypting an entire message can be costly. What function can we apply to the message to form a smaller representation of it?

Hash

New cards
53

Describe the process of using a digital signature to ensure integrity.

  1. The hash of the plaintext is calculated.

  2. The hash is encrypted using a private key. This is the signature.

  3. The signature is attached to the plaintext and sent to the recipient.

  4. The recipient decrypts the signature with the public key, hashes the plaintext, and compares the two signatures.

New cards
54

Why are encryption and digital signing not interchangeable terms?

Encryption maintains confidentiality and must be decryptable. Digital signing involves a one-way function and provides integrity. Both functions achieve different, yet complementary outcomes.

New cards
55

What does MAC stand for, and how is it different from a digital signature?
Hint: NOT Media Access Control, or Mandatory Access Control.

Message Authentication Code. This function computes a hash of an input file and encrypts it, but uses secret key authentication instead of public key.

New cards
56

Can Message Authentication Code (MAC) ensure Integrity and Non-repudiation?

  • Integrity - Yes

  • Non-repudiation - No, as more than one person knows the secret key.

New cards
57

Why would we want to use Message Authentication Code instead of Digital Signatures?

Secret Key algorithms are faster than Public Key algorithms, so MAC can be computed faster than a digital signature.

New cards
58

What is a digital certificate?

A digital certificate is an electronic document that proves the ownership of one’s public key.

New cards
59

What is a certificate authority?

A certificate authority is a third party that issues and signs digital certificates.

New cards
60

What is the contents of an X.509 certificate?

  • Subject: John Appleseed

    • Includes Organisation, O. Unit, Name.

  • Subject’s Key: 123456789abcdef0…

  • CA’s subject: C. Author.

  • Signature of the CA: c0ffee12345678…

New cards
61

What is a web of trust?

A web of trust is a system of managing digital certificates where there is no centralised authority. Instead, each user creates their own “chain of trust”, where each user certifies themselves and signs other users’ certificates.

New cards
62

What are the two attributes applied to users in a web of trust?

Values can be FULL, MARGINAL or UNKNOWN.

  • Validity - Are we sure that this key definitely belong to this user?

  • Trust - Are we sure that this user will be careful and follow good security practices? (Also has value ULTIMATE)

New cards
63

Web of Trust

  • A → B - V = FULL, T = FULL

  • B → C - V = FULL, T = FULL

  • A → C - V = ?, T = ?

V = FULL, T = FULL
C’s key has been signed by someone who A fully trusts (B)

New cards
64

Web of Trust

  • A → B - V = FULL, T = FULL

  • B → C - V = FULL, T = MARGINAL

  • A → C - V = ?, T = ?

V = MARGINAL, T = MARGINAL
Validity of a user is only considered full if their key has been signed by someone who is fully trusted. (In some cases, if n users marginally trust C, A will fully trust C.)

New cards
65

Web of Trust (Threshold is 2)

  • A → B - V = FULL, T = FULL

  • B → C - V = FULL, T = FULL

  • C → D - V = FULL, T = FULL

  • A → D - V = ?, T = ?

V = MARGINAL, T = MARGINAL
The threshold prevents full trust of users if they are not directly trusted/signed by a given user.

New cards
66

How is ultimate trust distinct from full trust?

Ultimate trust ignores any threshold limits, which result in marginal trust and validity being applied to users who are a set distance away from another.

New cards
67

Explain briefly how the SHA-256 hash function works.

  • Message is padded, so its length is a multiple of 512 bits.

  • Message is split into 512-bit long blocks.

  • Eight H-Variables are initialised.

  • For each block, a H-function updates the eight H-Variables.

  • The eight H-Variables are joined together.

New cards
68

Explain how in SHA-256 hashing, a message is padded.

  1. A bit 1 is added.

  2. k bits 0 are added until (L % 512) + 1 + k == 448.

  3. The length of L as a 64-bit integer is appended.

  4. (If L % 512 > 448 then we pad until the next block contains 448 bits.)

New cards
69

We want to hash a message of length (L) 1280 bits using SHA-256. How is this message padded?

  1. Find L % 512 = 256

  2. Add a 1 bit.

  3. 448 - 257 = 191, so add 191 zero bits.

    1. Append the length 1280 as a 64-bit integer.

New cards
70

What is the equation for the Entropy (x) of a password?

x = L x log2(W)
L - Length of Password, W - Size of Character set

New cards
71

What does entropy of a password measure, and why may it be deemed an unsuitable measure of security?

Entropy is a measure of maximum uncertainty in a password. It may not be a good measure of security as passwords are mostly not random: people tend to pick certain patterns when setting passwords, such as using a combination of words.

New cards
72

How are passwords stored on a server?

As a hash. This way, the original data cannot be visible/identified, yet it is still possible to compare to future inputs for authentication.

New cards
73

Passwords may be cracked in an online or offline attack. Describe which method is more likely to result in success.

  • Online - Repeated logon attempts on a website. This is generally less successful, as most sites will prevent this (typically through allowing limited attempts)

  • Offline - Done through obtaining a password file and utilising a compromised system. The passwords are guessed from each hash.

New cards
74

What are the five ways of cracking passwords?

  • Brute Force

  • Dictionary Attack

  • Look-up Tables

  • Reverse Look-up Tables

  • Rainbow Tables

New cards
75

Explain the similarities and differences between a brute-force and dictionary attack for password cracking.

Similarities: Both methods try several permutations of combinations in order to crack a password.
Differences: Brute-force tries every possible combination of characters, which is more computationally expensive and inefficient, although this guarantees that a password is found if enough time is given. Dictionary attacks use common words and phrases, including permutations such as chocolatech0co1at3

New cards
76

How does a Look-up table “build upon” a dictionary attack?

With dictionary/brute-force attacks, each guess is hashed as it is tried. Look-up tables pre-compute the hashes and compare them with items in a hash file. The hashes and passwords can then be mapped and identified.

New cards
77

Why are look-up tables typically not used for password cracking?

Look-up tables can take up vast amounts of space, especially at larger password lengths. For every character added to a password, the number of possibilities grow exponentially!

New cards
78

How does a Reverse Lookup Table work, and how is it different from a normal Lookup Table?

A Reverse Lookup Table uses a structure called a “Hash Chain”. It takes an arbitrary set of inputs (e.g. all possible length five character combinations), hashes one at a time, identifies printable characters (from ASCII or another encoding), hashes that result, and repeats until the first hash is found. The last text input is the output.
With Reverse Lookup Tables, the aim is not to match a specific input to an output, it is to find any sort of input that reaches the same output.

New cards
79

How is a Reverse Lookup Table used to crack passwords?

  1. Create hash chains of a set length to form each record in the table, only storing the first and last text inputs of each.

  2. Take a hash from the hash file, and create a hash chain.

  3. If a password created matches an ending password in the table, go to that row’s starting password and create its hash chain.

  4. Once we reach the same hash that was originally sourced in the hash file, take the password that was used to create that hash, and output it.

New cards
80

What issue can occur in a Reverse Lookup Table?
Hint: Hash Maps in CS126 encounter a similar problem.

Chain Collisions. A hash in one chain may occur in another, causing the same sequence to be repeated and for duplicate data to be stored, wasting space.

New cards
81

What additional set of functions are used in a Rainbow Table, which make it more efficient than a Reverse Lookup Table?

A set of Reduction Functions.
A Reverse Lookup Table uses the same reduction procedure after every hash, which can be a factor in causing collisions. Rainbow Tables reduce collisions by sequencing different reduction strategies (e.g. take characters 1,2,3,4, then 2,4,6,8, and alternate).

New cards
82

How is a Rainbow Table used to crack passwords?

  1. Create hash chains of a set length to form each record in the table, only storing the first and last text inputs of each.

  2. Take a hash from the hash file, and create a hash chain.

  3. If a password created matches an ending password in the table, go to that row’s starting password and create its hash chain, starting with reduction Rk.

  4. If not found, try starting from Rk-1, then Rk-2 up to R1.

  5. Once we reach the same hash that was originally sourced in the hash file, take the password that was used to create that hash, and output it.

New cards
83

What is applied to password hashes in order to render hash chain-based attacks less effective?

Password Salt, i.e. a randomly generated number, which is connected to the password and hashed together with it. The hash and its salt are stored together in the password file. This renders attacks less effective as an attacker needs to compute lookup tables for every possible salt value.

New cards
84

Biometric Authentication is becoming increasingly common. What is the predominant issue with this form of authentication?

False Positives and Negatives. It is possible for two biometric scans to have very similar results, or a scan could be registered incorrectly due to many different factors.

New cards
85

What is Access Control?

The process of specifying which subject (Who?) has what permission to access which object (What?).

New cards
86

What are the two general principles of Access Control?

  • Least Privilege - Where we need to grant a subject access to an object, we apply only the least rights necessary

  • Fail-safe Defaults - If we are not sure of a subject’s rights, assume they have no permissions, verify, then grant access

New cards
87

What are the two access control models?

  • Discretionary Access Control (DAC) - The owner of objects (files) control access.

  • Mandatory Access Control (MAC) - “Across the board” policy that is enforced by the system.

New cards
88

Describe the three methods of storing permissions under the Discretionary Access Control (DAC) Model.

  • Access Matrix - Objects are stored in the columns, subjects are stored in the rows, and each cell contains each subject and object’s permissions. Likely to be sparsely populated.

  • Access Control List (ACL) - A list in which each object is represented as an index. Each field contains each user with their permissions.

  • Capability List - A list in which each subject is represented as an index. Each field contains the objects that the subject has permissions in.

New cards
89

Is an Access Control List (ACL) or Capability List preferable for storing permissions?

Neither is necessarily better than the other: the answer is dependent on whether it is more important to access object-specific or subject-specific permissions. Both use opposing directions for storing permissions.

New cards
90

Which commands can we use to get and set ACL permissions on Linux systems?

  • setfacl

  • getfacl

New cards
91

List some operating systems that use ACL to store permissions.

  • Linux (and other Unix-based systems)

  • Windows NT (NT describes XP and later, or workstation specific OSes, including NT 4.0 in 1996)

  • macOS (Which itself is Unix-based)

New cards
92

List some operating systems that use a Capability List to store permissions.

  • Fuchsia (Google, used in IoT hubs)

  • Genode (Genode Labs, Consumer OS)

  • Midori (Microsoft, Discontinued in 2015)

New cards
93

Why may an organisation wish to use Mandatory Access Control (MAC) over Discretionary Access Control (DAC)?

DAC allows for each user to set permissions on their files. In an organisation, there may not necessarily be set owners of files, other than the organisation itself. As such, it may be more suitable for the organisation to apply a set of common rules to all users.

New cards
94

What are the four security levels in Multi-level Security?

Using the Bell Lapadula Model,

  • Top Secret

  • Secret

  • Confidential

  • Unclassified

New cards
95

What components make up a Security Label in Multi-level Security?

L = (S, C)
S - Security Level (e.g. Confidential)
C - Category, a specific name or project the label relates to (e.g. Government Project, or GP for short)

New cards
96

Each Object and Subject are given a Security Label in the Multi-level security model. What are these labels referred to in these contexts?

  • L(o) Object - Classification

  • L(s) Subject - Clearance

New cards
97

What are the access rules for Multi-level security?
Hint: Let classification refer to L(o) and clearance refer to L(s).

ALLOW READ if L(s) >= L(o)
ALLOW APPEND if L(o) >= L(s)
ALLOW WRITE if L(s) == L(o)

New cards
98

Multi-level Security:
A subject with Secret clearance on categories AP and BP wishes to read an object with Confidential classification, and is tied to the BP category.
Should the subject be granted access? If not, why?

Yes, Secret > Confidential, and the subject has clearance on BP.

New cards
99

Multi-level Security:
A subject with Secret clearance on categories AP and BP wishes to read an object with Confidential classification, and is tied to the XP category.
Should the subject be granted access? If not, why?

No, as the subject has no clearance on the XP category.

New cards
100

Multi-level Security:
A subject with Secret clearance on categories AP and BP wishes to write to an object with Confidential classification, and is tied to the BP category.
Should the subject be granted access? If not, why?

No, as the subject has secret clearance. Only those with confidential clearance on BP can write to the object.

New cards

Explore top notes

note Note
studied byStudied by 148958 people
653 days ago
4.8(660)
note Note
studied byStudied by 34 people
858 days ago
5.0(1)
note Note
studied byStudied by 14 people
70 days ago
5.0(1)
note Note
studied byStudied by 7 people
778 days ago
5.0(1)
note Note
studied byStudied by 230 people
264 days ago
5.0(2)
note Note
studied byStudied by 6 people
593 days ago
5.0(3)
note Note
studied byStudied by 32 people
900 days ago
5.0(1)
note Note
studied byStudied by 9 people
59 days ago
5.0(1)

Explore top flashcards

flashcards Flashcard (90)
studied byStudied by 4 people
580 days ago
5.0(1)
flashcards Flashcard (100)
studied byStudied by 513 people
510 days ago
5.0(3)
flashcards Flashcard (35)
studied byStudied by 3 people
805 days ago
5.0(1)
flashcards Flashcard (26)
studied byStudied by 30 people
367 days ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 11 people
428 days ago
5.0(2)
flashcards Flashcard (92)
studied byStudied by 3 people
799 days ago
5.0(1)
flashcards Flashcard (23)
studied byStudied by 6 people
449 days ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 31 people
61 days ago
5.0(1)
robot