Security Concepts (cont) Deian Stefan Slides adopted from Kirill - - PowerPoint PPT Presentation

security concepts cont
SMART_READER_LITE
LIVE PREVIEW

Security Concepts (cont) Deian Stefan Slides adopted from Kirill - - PowerPoint PPT Presentation

CSE 127: Computer Security Security Concepts (cont) Deian Stefan Slides adopted from Kirill Levchenko and Stefan Savage Incentives and Deterrents Attackers equation: (expected gain) > (cost of attack) Defenders equation:


slide-1
SLIDE 1

CSE 127: Computer Security

Security Concepts (cont)

Deian Stefan

Slides adopted from Kirill Levchenko and Stefan Savage

slide-2
SLIDE 2

Incentives and Deterrents

  • Attacker’s equation:


(expected gain) > (cost of attack)

  • Defender’s equation:


(cost of protection) < (expected loss)

slide-3
SLIDE 3

Incentives and Deterrents

  • Attacker’s equation:


(expected gain) > (cost of attack) + (expected punishment)

  • Defender’s equation:


(cost of protection) < (expected loss)

slide-4
SLIDE 4

Security Model

  • Subjects: Individuals or processes acting on their

behalf

  • Objects: Protected information or function

➤ Objects often also include subjects

  • Subjects operate on objects

➤ System mediates and facilitates subject-object

interaction

slide-5
SLIDE 5

Security Policy

  • What action is subject allowed to do with object
  • Is this enough?

➤ And who can introduce new subjects and objects

into system?

slide-6
SLIDE 6

Security Policy

  • What action is subject allowed to do with object
  • Is this enough?

➤ And who can introduce new subjects and objects

into system?

slide-7
SLIDE 7

Objects

{allowed {actions}

Access Control Matrix

Subjects

slide-8
SLIDE 8

Broccoli Fruit from Tree

  • f Life

Fruit from Tree

  • f Knowledge

Adam {see, eat} {see, eat} {see} Eve {see, eat} {see, eat} {see}

Access Control Matrix

slide-9
SLIDE 9

Access Control Lists (ACLs)

  • What are ACLs?

  • How are ACLs enforced?

  • Real world examples?

slide-10
SLIDE 10

Access Control Lists (ACLs)

  • An access control list of an object identifies

which subjects can access the object and what they are allowed to do

  • ACLs are object-centric: access control is

associated with objects in the system

  • Each access to object is checked against object’s

ACL

  • Example: guest list at a night club
slide-11
SLIDE 11

Capabilities

  • What is a capability?

  • How are capabilities enforced?

  • Real world example of capabilities?
slide-12
SLIDE 12

Capabilities

  • A capability grants a subject permission to

perform a certain action

➤ Unforgeable ➤ Usually transferrable

  • Capabilities are subject-centric: access control is

associated with subjects in the system

  • Example: car key
slide-13
SLIDE 13

Unix File System Security Model

  • Subjects:
  • Objects:
  • Actions:
slide-14
SLIDE 14

Unix File System Sec. Model

  • Subjects: Users
  • Objects: Files and directories
  • Actions: read, write, execute

➤ Execute a file means can call exec() on file ➤ Directory “execute” means user can traverse it

  • Unix is a simplified ACL system

➤ Arbitrary ACLs not possible in traditional Unix ➤ Modern Unix operating systems allow arbitrary

slide-15
SLIDE 15

Permissions

  • Each file has an owner and a group

➤ Group: named set of users

  • File permissions specify what owner, group, and
  • ther (neither owner nor group) is allowed (read,

write, exec)


  • rwxrw-r--
slide-16
SLIDE 16

Permissions

  • Each file has an owner and a group

➤ Group: named set of users

  • File permissions specify what owner, group, and
  • ther (neither owner nor group) is allowed (read,

write, exec)


  • rwxrw-r--

Other’s permissions Group’s permissions Owner’s permissions

slide-17
SLIDE 17

Permissions

  • User’s allowed actions on file are:

➤ Owner’s permissions if the user is the owner, ➤ Group’s permissions if the user is in the group, ➤ Other’s permissions otherwise

slide-18
SLIDE 18

Permissions

  • Users interact with system via processes acting
  • n their behalf
  • When you interact with system via terminal,

command shell acts on your behalf

  • Each process is associated with a user
slide-19
SLIDE 19

Permissions

  • Who can change permissions?

➤ Only owner and superuser can change permissions

  • Who can change owner?

➤ Only superuser can change owner

  • Who can change group?

➤ Owner can only change to group she belongs to

slide-20
SLIDE 20

Permissions

  • Can you change group to arbitrary group?

➤ A: yes, B: no

slide-21
SLIDE 21

Permissions

  • Only owner and superuser can change

permissions

  • Only superuser can change owner
  • Only owner and superuser can change group

➤ Owner can only change to group she belongs to

  • User’s allowed actions on file are:

➤ Owner’s permissions if the user is the owner, ➤ Group’s permissions if the user is in the group,

slide-22
SLIDE 22

Login

  • When user connects to system via physical

terminal, system runs login process as root to start session

➤ Authenticates user using username and password ➤ Changes its user id and group id to that of user ➤ Executes user’s shell

  • sshd performs similar actions
slide-23
SLIDE 23

Login

  • When user connects to system via physical

terminal, system runs login process as root to start session

➤ Authenticates user using username and password ➤ Changes its user id and group id to that of user ➤ Executes user’s shell

  • sshd performs similar actions
slide-24
SLIDE 24

Changing Privilege

  • Superuser can drop privilege to become regular

user

slide-25
SLIDE 25

Changing Privilege

  • Superuser can drop privilege to become regular

user

  • Want way to elevate privilege in controlled

manner

slide-26
SLIDE 26

Changing Privilege

  • Superuser can drop privilege to become regular

user

  • Want way to elevate privilege in controlled

manner

  • How?
slide-27
SLIDE 27

Elevating Privilege

  • Executable files have a setuid and setgid bit
  • If setuid is set, files is executed with privilege
  • f owner

➤ ruid is that of executing user, euid and suid that

  • f owner
  • The setgid bit does same for group

➤ But supplementary groups remain that of executing

user

slide-28
SLIDE 28

Unix Security Model

  • What do you like about the Unix security model?
  • What do you dislike about it?
  • Is it a good model?