Computer Security CS140 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What questions do we need to ask in order to eva, if a system is secure?

A

Security in what aspects?
Secrecy,damage prevention
Security from whom? All users or differentiate users
What level of Security
Trade-off between cost and performance
Performance degradation

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

What is the theoretical approach dependant on in the real word?

A

Implementation
Deployment
Maintenace
Parties involved
Location
Temptation

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

What three things should be guaranteed in a secure system?

A

CIA triangle Confidentiality,integrity and availability

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

Diff between Worm and Virus?

A

Worm:
Self-contained program that spreads independently.
Exploits network vulnerabilities to access other computers.
Can rapidly infect multiple systems and networks.
Virus:

Malware that requires a host file or program to attach itself to.
Spreads when infected files are shared or executed.
Can cause damage to data, corrupt files, modify or delete data, or steal information.

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

Similairuty between worm and virus

A

Similarity: Malicious Intent
Description: Both worms and viruses are forms of malware designed with malicious intent.
Similarity: Self-Replication
Description: Both worms and viruses have the ability to replicate and create copies of themselves.
Similarity: Payload
Description: Both worms and viruses can carry a payload, which refers to additional malicious actions.

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

What is a DOS and DDOS attack?

A

Definition: A DoS attack is a malicious attempt to disrupt the availability of a computer system or network by overwhelming it with a flood of illegitimate requests or excessive traffic.
Goal: The goal of a DoS attack is to exhaust system resources, such as bandwidth, processing power, or memory, rendering the targeted system or network unavailable to legitimate users.

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

What is a Social Engineering Attack?

A

Definition: Social engineering attacks involve deceptive tactics to manipulate and exploit human psychology and trust in order to gain unauthorized access to information or systems.

Objective: Social engineering attacks aim to bypass traditional security measures by exploiting human vulnerabilities, such as trust, emotions, or cognitive biases.

Methods: Attackers use various methods, such as impersonation, phishing, baiting, pretexting, or persuasive tactics, to trick individuals into revealing sensitive information or performing actions that benefit the attacker.

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

How can you analyze a security attack?

A

Who did it, the Motivation behind the attack,Attack vector (means),what was the damage,can this be prevented in the future.

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

What is a security Asset?

A

Anything we value enough so that we want to protect it.Example customer database.

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

What is a vulnerability?

A

A flaw in a systems design, implementation, operation, or management that could be exploited to violate the systems security policy.

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

What is a threat?

A

A potential for the violation of security when an attacker has both the capability and intent to breach security. Threat=capability x intent.

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

What is the stride model?

A

It is a threat evaluation model that has the following
Spoofing-Pretending to be a user
Tampering-Modifying or accessing data
Repudiation-Denying involvement in crime
Information Disclosure-Disclosing info without appropriate permisiion
DoS-Denial of service
Elevation of privilege-Hacker elevating their privilege.

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

What is a risk

A

Risk: an expectation of loss expressed as the
probability of an actual attack in which a threat
will exploit a vulnerability with a harmful result.
Risk=prbabiltyx harm which equals threatxvulnerbaityxharm

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

What is an attack?

A

An assault on security that derives from a threat

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

Describe the dread model of risk analysis

A

Damage - how bad would an attack be?
Reproducibility - how easy is it to reproduce the attack?
Exploitability - how much work it needs to launch the attack?
Affected users - how many people will be affected?
Discoverability - how easy is it to discover the threat?

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

What is a countermeasure?

A

Countermeasure: an action that reduces a threat,
vulnerability, harm by eliminating or preventing
the attack or by detecting the attack and reacting
with corrective action.

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

What are the strats to handle a risk?

A

RIsk avoidance, Risk prevention, Risk detection, RIsk action

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

How to do informal risk analysis?

A

Identify assets,identify vulnerabilities,identify threat.

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

What is cryptography?

A

It is about secure communication in the presence of adversaries through encryption and decryption

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

What is secret key encryption

A

When the same key is used for encryption and decryption.The key is private as is only known to the communicating parties.

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

What is public key encryption

A

Use public key to encrypt msg and use private key to decrypt msg.

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

How does secret key encrypton work?

A

Secret key is shared between sender and receiver
Plain text is encrypted using private key and AES
Decrypted using Advanced encryption standard and key.
The encryption algos r public.AES and DES

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

What is steganography?

A

Is the practice of embedding confidential data within non-secret data in a way that the presence of the secret data is difficult to detect.It is used to hide the existence of the message.

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

Why do we need steganography?

A

We need it because usually encrypted msgs r unreadbale which raises suspicion.Therefore we want to hide the encrypted msg within something that is readable.

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

How do we implement steganography

A

cover_medium+hidden_data+steganography_key=steganography_medium
The cover medium are usually text or audio files and the hidden data can be encrypted using the steganography key.

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

How can we implement steganography using 24bit images?

A

Imagine our hidden data is a 24bit colour image that mean each pixel is represented by 3 bytes.This could be red green blue.Replace the LSB of each byte in a pixel with the binary representation of the hidden data.Eg.
10010110 with 10010111 if 1 is first letter of hidden data.

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

How does the transposition/permutation cipher work?

A

Arrange msg into rows of fixed length and transpose like a real matrix.Reciever must know what permutation key is used.

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

How does the keyword cipher work?

A

Arrange the msg into rows of fixed length.Define a keyword eg phone which has alphabet order 5421.Read down rows in that order.Keyword is the secret between receiver sender.

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

Explain how double transposition cipher works?

A

based on the rows assigned from 1-5 u put them into new rows.Read down the columns alwyas.

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

What is the monoalphabetic subsition cipher?

A

This is when u have the normal alphabet and map it to a ciphertext alpha bet eg map A-D and B to E.y=x+3mod 26 is the encryption key.This is a major disadvantage as there is a linear relation.

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

How to use keyword to define ciphertext?

A

Use a keyword eg Zebras at the front of the ciphertext alphabet and then continue as normal.There is no linear relation but long cipher text can be cracked using frequency analysis.

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

What is frequency analyis?

A

This method is used to count the number of occurrences of a letter or symbol in a ciphertext.The idea is to map this to the most frequently appearing letter in the alphabet.

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

How can we prevent the use of frequency analysis to crack ciphertexts

A

We can use the polyalphabetic substitution cipher where we used different cipher alphabets for each letter by using a keyword.The key letter is at the top for the vignere cipher and the plain text letter is on the left.The grid alphabet goes from A
then B
then C and wraps around.

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

What is the benefit of using Polyalphabetoc cipher text?

A

It is much more resilient to frequency analysis as the 2 letters which are the same in plain text maybe mapped to two different letters in the ciphertext.However, the same statistical flaw is there if the same ciphertext alphabet is used.This approach is most safe when keyword length equals plain text length.Multiple ciphertext alphabets used.

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

What bitwise operation is good for encryption and decryption?

A

And and OR is not good as they produce multiple same ciphertext for the same plain text and key.XOR produces unique ciphertext for each plaintext and key.Add is too expensive.

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

How is XOR used for encryption and decryption?

A

First XOR the plain text and the key.Decrypt xor the key and the ciphertext to get the plain text.

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

What is one time pad?

A

This is a method where a unique alphabet is used for each letter in the message.This is the most secure but the least practical due to the distribution protection and generation of the key.

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

How do we know if the secret key encruption algo is food?

A

1.Is there confusion-if we change a bit of the key will most of the ciphertext change
hide the relationship between ciphertext and key
2.diffusion-if we change a bit of the plain text multiple parts of the ciphertext will change.Hide the relationship between plaintext and ciphertext
3.Ciphertext is hard to break even with the most generous assumptions-know encryption process,know key length,as long as key is secret we good
4.Managment of the algo must be feasible and cost effective.

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

Block cipher vs Stream cipher?

A

A block cipher encrypts blocks of data one at a time.A stream cipher encrypts one bit/byte of input one at the time.The output is calculated as time goes on.

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

What are the features of the DES and what is the DES

A

DES is the data encryption standard.The DES is the first encryption standard.It has a 64 bit block cipher.16 rounds of encryption per block.Encryption algo is public.It uses permutation(diffusion) and substation(confusion).56 bit key with parity bits

41
Q

Describe how the block cipher works in the DES?

A

The block cipher spilts the plain text into 2 halves 32 bits each.
2.It feeds one side of input to a feistal function with a key
3.This output is xored with the other input and is used on the next iteration as round function input.
4.The other initial input is xored with the output of the 2nd round function.
Li+1=Ri, Ri+1=Liexore(Ri,ki)

42
Q

How does subkey generation work in DES?

A

Drop the 8th bit of each 8 bit block and permutate the remaining 56 bits.Split key in half and shift bits left by certain amount depending on the round.Then shifted halves are permuted with PC2 where they r reduced to 48 bits and then the pc1 bits are shifted onto the next.

43
Q

How does the DES round function work?

A

32 bit half is taken and 48 bit subkey as input the 32 bit half is duplicated to make 48th subkey by duplicating bit 1 and 4 .This output is xored with current key.This result is broken done into 8 6 bit pieces and subsition operation is taken.Converts 6 bit input to 4 bit output.And then passed through permutation function.

44
Q

Summary of DES

A

Block cipher: a block is divided
into two halves
uEach block goes through 16
rounds of processing
u Each round has a different
subkey
u Apply the Feistel function:
expansion, combination,
substitution and permutation
u Symmetry of process for encryption/decryption

45
Q

What is in the AES algo?

A

DES has been considered insecure due to short key sizeCompared to DES it has longer block size (128 bits),
longer key (variable: 128, 192, or 256 bits) and faster
implementation.

46
Q

How does AES block cipher work1.

A

1.Substitution using 8-bit lookup table
2.Permutation – by shifting rows of the matrix
3.Mixing within each column(multiplication by a fixed matrix).
4.XOR with the round key

47
Q

DES vs AES

A

Key Size:
DES: Uses a 56-bit key, which is considered relatively small by today’s standards. The effective key length is 56 bits due to the inclusion of parity bits.
AES: Supports key sizes of 128, 192, and 256 bits, providing a significantly larger key space for stronger security.
Block Size:
DES: Operates on 64-bit blocks of data. Each 64-bit block is encrypted independently.
AES: Operates on 128-bit blocks of data. AES is more efficient in terms of block size and can encrypt larger amounts of data per iteration.
Security:
DES: DES has been widely used for several decades but is now considered relatively weak against brute-force attacks due to its small key size. The 56-bit key length can be feasibly brute-forced with modern computing power.
AES: AES is widely regarded as highly secure. It has undergone extensive analysis and has withstood scrutiny from the cryptographic community. AES is resistant to known attacks, and its security is based on the secrecy of the key.
Algorithm Complexity:
DES: DES employs a Feistel cipher structure and involves multiple rounds of the Feistel function. The algorithm complexity is moderate.
AES: AES uses various operations such as substitution, permutation, and mix columns. It employs a substitution-permutation network (SPN) structure and operates with different numbers of rounds depending on the key size. The algorithm complexity is higher than DES.

48
Q

What is the problem with secret key encryption?

A

The main issue with secret key encryption is distribution and maintencae of the key.This is because both the sender and receiver require the key in order to be able to send and receive the data.This is expensive and hard to distribute.Key storage and length.

49
Q

What are the conditions for y to be the primitive root of mod x.k=y^x mod p

A

Succesive powers of y taken mod 5 generate numbers in a loop from 1 to x-1
The value of k is uniformly distributed between 1 and p-1.

50
Q

What does the primitve root mean?

A

If we guess a value of x for a given k it is equally likely to be in the interval 1 to p-1.

51
Q

How to generate public key in RSA encryption?

A

n=pxq pick two relatively big numbers.N is the public key.Pick a value of e which is co prime to p-1,q-1 and p-1 x q-1 .E should be between 1 and p-1 q-1

52
Q

What is the formula for the ciphertext in RSA encryption?

A

c=M^emodN where e is the value and N is the public key.

53
Q

How to generate private key in RSA encryption?

A

e*d=1 mod(p-1)(q-1) value of d should be 1 greater than a multiple of p-1 and q-1 and multiple of e.

54
Q

How can msg be decrypted in RSA?

A

M=C^d mod n.

55
Q

How does RSA encryption work?

A

Sender encrypts msg using recievers public key.Reciever uses their own private key to decrypt the msg.

56
Q

Why is RSA secure?

A

The attacker will either have to reverse a one way function which is computationally infeasible.Or he will need to know the value of D which means he needs to know p q and e.The only way is brute force but a large key size makes this difficult.

57
Q

Advantages of Public key encryption

A

Key distribution easy,complex encryption and decryption process leaving it secure against attacks,

58
Q

Disadvantages of Public key

A

Uses one way function slower,Relies on length of public key

59
Q

Advantages of secret key

A

Uses XOR, substitution, permutation – fast
Key is secret – attacker knows less information and hence requires shorter key for same level of security
It is faster to perform operations on a shorter key.

60
Q

Why would we encrypt using a private key and let everyone decrypt using a public key?

A

Integrity-We dont care about privacy but we don’t want anyone to tamper.We send encrypted msg along with plain text.
Authentication-I want the receiver to know i sent the msg
Non-repudiation-A user with malicious intent cannot deny their actions.

61
Q

What is a hash?

A

Its a one way function that generates hash code based on a given input?

62
Q

How is a digital signature formed?WHere is it attached.

A

Generate a hash for the message and then encrypt this message using the senders private key.It is attached to a plaintext message.

63
Q

How do you check the authenticity of the hash?

A

Decrypt the digital signature using the senders public key.Run the plain text message through the same hash algo and compare the hashes.

64
Q

Differences between Encryption and Digital signature?

A

Encryption- need to maintain confidentiality,plain text is recoverable
DIgital signature-Provides integrity,authentication and non repudiation.Unable to recover plain text.

65
Q

What is MAC

A

It is message authentication code and its where the hash of an input file is calculated and it is encrypted using a shared secret key.This maintains integrity but there is no non repudiation as the key is shared by more than one party.

66
Q

MAC vs Digitial signature?

A

Mac is essential secret key encryption and uses XOR and substation so it much faster.

67
Q

Why are digital signatures weak?

A

Anyone can create a public key and claim it belongs to someone else.

68
Q

WHat are digital certficiates?

A

They are used to certify that a public key belongs to a user.They are issued by a 3rd party authority.

69
Q

What does web of trust consist of?

A

This is where users from a chain of trust personally.There are two attributes validity and trust.Validity concerns where user B is the owner of public key B and trust is whether user B will be careful when signing other ppls certificates.Theres full,unknown and marginal trust.

70
Q

How can we use both a secret key and public key to encrpyt data?

A

Use the shared key to encrypt the message and then use the public key to encrypt the shared key.This is also known as PGP encryption.

71
Q

What is the definiton of computer security?

A

The detection and/or prevention of unauthorized actions by users of a computer system.

72
Q

What is the first step of security?

A

Identify and authenticate the user.Identify the user by ID and authenticate the user by confirming their identity.

73
Q

What are the problems with using passwords?

A

Passwords should not be simple and be shared across accounts however if we have different passwords for every account it may overload the user.

74
Q

What are the solutions to the probelms with passwords?

A

Store all passwords in a single place, use hints, 2 factor authentication

75
Q

How to calculate the entrophy aka strenght of a passwords?

A

We do log2 W^L.Where L is length of password and W is character set

76
Q

What is salt and how is it used in hashfunction?

A

h=hash(password+salt) salt is a randomly generated number.The password file stores h and the salt value.

77
Q

What is a protocol

A

A fixed pattern of exchanges between 2 or more parties to achieve a certain task

78
Q

What is a replay attack?

A

When an eavesdropper stores a message sent by a user and sends it to the receiver later on.

79
Q

What are the solutions to a replay attack?

A

Generate a token which is a random number R this will be sent to the sender and will need to be signed and encrypted with theirprivate key.The reciever can verify this using the senders public key.
Timestamping contain a timestamp in the original encrypted msg.

80
Q

What is the function of a hypervisor?

A

Is to create and host vms on a physical host machine, it contains virtual hardware stored in files.The files are transferred to hardware when necessary.

81
Q

What is the paused state in a VM?

A

Vm is still running but not allocated cpu.And off running and suspended

82
Q

What are the benefits of VM?

A

It is isolated,low privileges,transience online and offline on demand and easy to record state of VM.

83
Q

Describe VM isolation?

A

VMs guest OS is encapuslated and hardware is abstracted.Vms access different files and resources therefore host os and other vms unlikely to be affected in the event of an attack

84
Q

Describe VM transcience?

A

Usually servers are alwyas on,vms can be switched on and off relatively quicly.Limiting operating time reduces security risks

85
Q

Describe VM state restoring?

A

Virtual disk for vm is stored as one file on the hypervisor.Therefore it is easy to return to previous states and undo changes.Help ensure data integrity.

86
Q

Descrive VM low Privelge?

A

Traditionally OS has the highest privilege and can only monitor itself.A VM has lower privilege than hypervisor so it can only be monitored by hypervisor or by a dedicated VM.

87
Q

What is the issue with VM Transcience?

A

Transcience may lead to diffuclty in eradicting a worm or virus.The worm/virus may infect vms but then may go offline and infect others.Usually we identify affected machines ,clean up and patch issue.

88
Q

What is the issue with state restoring?

A

Sensitive data is stored in virtual disk which goes against security principle of only keeping sensitive data for a limited time.State may be restored to an infected version without security patches.If hypervisor is comprised attacker have unlimited access only 2 states Guest OS or hypervisor affected.Many vms do not have virus protection due to roll back feature.

89
Q

What is the issue of Mobility ?

A

All the archeitecture of a vm is online in the form of files making it susceptible to theft.If attacker accesses version of VM not being used by Guest OS the VM will not show intusion.Attackers can access and modify files when the VM is offline.

90
Q

What is the issue with easy creation of VMs?

A

Vms can be easily created but have different configurations which may lead to vulnerabilites.

91
Q

What is the issue with VM identity?

A

Usually devices can be identifed by mac address but for VM there is only one mac address for physical machine.

92
Q

WHat is the DoS attack with hypervisors?

A

A hypervisor can allow onr vm to access all resources.

93
Q

WHat is the purpose of cookies

A

Cookies are used by webservers to store stateful info and record users browsing activity.

94
Q

How are cookies sent between a client and server

A

When a client access a webpage for the first time cookies and the data are sent from the webserver.When a client accesses another webpage on this server the cookie is sent back to the web server.

95
Q

What is a session?

A

It is a data structure used to store temporary info in an interaction between a client and server.

96
Q

What is network Eavesdropping?

A

When cookies are intercepted by an attacker and used to communicate with other server.This can be prevented by securing communications using https.

97
Q

Whare third party cookies?

A

They are cookies that are set by other domains compared to the one the user is currently using.They can be used to track user activity over multiple sites.

98
Q

What is cross site scripting?

A

Attacker injects malicious ccode into website using JS and is executed by users browser in URL for example.This can give access to cookies these cookies can be sent to remote servers or altered.

99
Q

What is phising false sub domain?

A

Fake sub domain created by attacker with attacker server IP address victims browser will submit to attackers server all cookies related to main domain