Week 10 - Access Control Flashcards

(29 cards)

1
Q

just read

A

so essentially the os is in charge of what users can access cetain resources

ie we may have resource that must be available across users (ie mail) and those may certain restrictions
- Alice can access Alice’s mailes
- Bob cant access Alice

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

what do access control policies do

A

set of rules to determine which users can access which resources and operations a user is allowed to perform

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

what do we mean by system defines mechanisms users define policies

A

os needs to be able to provide mechanisms to support wide range of access control policy

The user then selects the policy they want to implement

Ie Alice might create a file that :
Anyone can read but only alice can write

amongst many other policies ( she could have done - ie both bob and alice can read or write but nobody else can access …)

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

Why is checking permission bits on open and after than knowing the file handle advantages

A

so essentially design means
cost of checking amortised - time penalty of permission check on opern spread out across all future read write operations

revocation is hard - changing permission does not alter open fd’ - ie if bob is has an open fd and alice changes permission to the file so only she can access it bob can still access it if he originally had read and write permissions

delegation possible - can hand over open fd’s to other processes

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

advantages of instead of using ACLS

attaching a list of pairs (which object , permissions) to a SUBJECT

A

💥 Summary of the idea:

Instead of attaching a list of pairs to each object (like in ACLs),
we attach a list of pairs → (which object, what permissions) → to each subject.

⚙️ And yes → the subject can be:

a user (coarse-grained), or

a process (fine-grained).

✅ By making the subject = process:

You can give different permissions to different processes,
even if they are all running under the same user account.

Example:

Process A (Alice) → can read and write file X.

Process B (Alice) → can only read file X.

Process C (Alice) → has no access to file X.

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

Advantages of ACL

A

Easy to revoke permissions of ACL
Easy to understand

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

Disadvantages of ACL

A

scale can become large -> consume lots of memory
if permission checks frequent have to look up large ACL which slows performance

Autority is ambient - All of a users processes will have their permissions

ie if alice has read and write permissions all her processes will be read and write
cant restrict aka make more fine grained and have one be read and one be write
like you could in capability system ( where we attactch list to subject not object)

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

what does security mean

A

A mind set of constant suspicion ( theres always an adversary out to get you)

Who am i forced to trust

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

is security and fault tolerance same thing

A

NO

Fault tolerance - protecting processes or other resources from accidental behaviour ( incompentence)

Security - protecting processes or other reosurces from malicious behaviour

adversary is out to get you

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

properties of security

A

security has many properties:
confidentiality - info not exposed to unintended parties

Integrity - Info cannot be modified by unintended parties and modification includes adding fake and spurious data to sit alongside old data (not just chaning data to something hacker wants)

availability - malicious actors cant deprive others of services

These properties are held under the assumption of
attack model - We define what kinds of attackers we are defending against.

the attackers resources -
We assume attackers have reasonable, realistic resources

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

Just read

A

with access control lists we have already covered the notion of confidentiality ( as we know who has access to an object) and integrity ( we know the permissions each person has)

but with availability:
to make sure processes arent deprived :
we need a max (memory , no of processes …} per user
limit rate of process creation per user

attack model is : we cant have > 1 account per user as if that were the case we could just make hella accounts and deprive others that way

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

swiss cheese deffence

A

so key takeawy is that we use independent layers of defence (swiss cheese model ) such that if one attack passes througg a layer its likely to get block by sucessive layers

that way the only ways tht pass through is limited

EACH LAYER IS A DIFFERENT TECHNIQUE and so attackers to face multiple kinds of barriers requring:

more time
more skillsets
more resoures

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

READ Very important

PROBLEM With splitting privelleges using ACL

A

so the problem with our approach then is we keep adding to acl ( which as we mentioned efore slows down even more) for each user we need to set their privelege ( to least privilege) for but the thing is this is tedious and if we flop ( set permissions) wrong it can cause our program to fail

SOME PROGRAMS NEED TO COMBINE MULTIPLE AUTHORITIES

student@5CCS20SC:$ submit 1 ~/my-project-1

Because ACLs are typically tied to users:

You can only give the program the permissions of the user running it.

But here, you need both the student’s and the instructor’s permissions at the same time.

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

Just read

A

-rwsrws–x
Here’s the breakdown:

rws → owner has read, write, and setuid (s) permissions.

rws → group has read, write, and setgid (s) permissions.

–x → others can execute.

✅ First s (setuid):

When anyone runs this program, the OS temporarily switches the process’s user ID to the owner’s user ID.

That means the program runs with the owner’s permissions, not just the caller’s.

✅ Second s (setgid):

Same idea, but switches to the owner’s group ID.

This gives the program the owner’s group privileges too.

✅ Final x:

Others (like you) are allowed to execute the program.

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

why is setuid root so dangerous

A

set uid root

have roots permissions can run as root and do whatever

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

solution

A

use handle based approach

Create new processes with a handle that explicitly and narrowly defines:
→ what the process can do,
→ and what permissions it has.

Each process has only the minimum power it needs (least privilege).

Example:

If the process is meant only to write to log files,
→ it gets a logging handle —
and it cannot touch user files, create new processes, or modify configs.

If the process is meant only to manage user sessions,
→ it gets a session handle —
and it cannot write to logs or escalate privileges.

if thats correct how would we use this approach to do the submit coursework command

17
Q

Authenticity

A

How does system know who user is

18
Q

why does authenticity go both wats

A

. does the user trust the system (eg are we sure we are accessing kcl and not a malicious kcl clone

. does system trust the user ( verified through passwords…)

19
Q

defence against password attacks

A

Bruteforce - try all strings

time delays after successive unsuccessuful attempts

dictionary attacks - attacker gets a list of dictionary words (words with meaning that are common with passwords and tries those)

To combot dictionary attacks dont use dictionary words

20
Q

Why dont computers store passwords

what do they store instead and why

A

t the system doesnt store the password it stores a hash of the password

ie it stores some f(p) where p is password and f is function and checks if f(p) == f(input)

storing hash is better as if theres an attack and hacker retrieves hash very hard to reverse into password

21
Q

offline dictionary attack

A

passwords - specifically the hash of password (f(p)) has leaked

The hacker gets a list of dictionary words and for each dictionary word checks if the hash (f(input)) is equal to the leaked hash they have ( f(p)) - if it is they gasses the password

Offline as they are ARE WORKING ON THEIR COMPUTER not yours and so are not subjected by rate limited , lockouts …

22
Q

Timing channel attack

A

When we have password stored on disk or memory -compares input and password directly

Attacker can use a timer to measure no of microseconds for system to reject password

the longer it takes to say incorrect password - closer you are to getting the password correct

turns from exponential to linear - as you can go character by character now

solution to this problem - add a randomised delay or better yet dont store passwords

23
Q

untrappable key

A

so we are saying a user cant always trust system

ie i may be trying to login but its a fake login screen

solution:
untrappable keys(APPS CANT CAPTURE / REPLICATE BEHAVIOUR)
ie control alt delete
if i press this and expected output (takes me to task manager ) then real
if nothing then fake

24
Q

What is cryptography

A

cryptography - techniques (involving codes) for secure communication

If something is physically secure ( CHANNEL NOT EXPOSED TO ATTACKERS ) cryptography is not needed

25
further properties of cryptography
confidentiality , authenticity , integirity Non-repudiation → This means that once someone sends a message, they cannot later deny it. Plausible deniability → This is the opposite situation: even if a message is sent, it’s possible for the sender to deny they were the one who sent it, because there’s no cryptographic proof tying the message to them.
26
how keys are used to make commumication secure
so essentially Cippers ( the functions E and D) are public knowledge cause they are jut pieces of math and can easiely reverse so we combine the functions with keys that are private to the communicating parties C (cipher texts) = E(P,K) P (plain text) = D(C, K) now thats fully secure as even if attacker has the functions they have no way of knowing what the key is to decrypy
27
How can we ensure integrity
Compute: 𝐶 = 𝐸 ( 𝑃 + + ℎ 𝑎 𝑠 ℎ ( 𝑃 ) , 𝐾 ) C=E(P++hash(P),K) → encrypt the message and its hash together with the key 𝐾 K. 2️⃣ Receiver side: Decrypt: 𝑀 = 𝐷 ( 𝐶 , 𝐾 ) = 𝑄 + + 𝐻 M=D(C,K)=Q++H where 𝑄 Q is the message, 𝐻 H is the attached hash. Check integrity: 𝐻 = ? ℎ 𝑎 𝑠 ℎ ( 𝑄 ) H = ? hash(Q) If it matches → message is valid. If it fails → message was tampered with. 3️⃣ Why attacker can’t bypass it: Without 𝐾 K, the attacker cannot: properly modify the ciphertext, compute a valid ℎ 𝑎 𝑠 ℎ ( 𝑄 ′ ) hash(Q ′ ) to match the modified message, re-encrypt it to make the whole thing look valid. → So any tampering breaks the hash check, and the receiver detects the tampering.
28
How to get authenticity
Step 1: challenge One party (say, the server) sends a random number called a nonce → this is just a one-time random value, 𝑋 X. 2️⃣ Step 2: response The other party (say, the user) encrypts the nonce with their secret key 𝐾 E(X,K) and sends it back. 3️⃣ Step 3: verification The server checks if the returned value correctly matches the expected encryption. → If it does, the server knows the user has the correct key → proves identity.
29