Software Security: Principles CS 161: Computer Security Prof. Vern - - PowerPoint PPT Presentation

software security principles
SMART_READER_LITE
LIVE PREVIEW

Software Security: Principles CS 161: Computer Security Prof. Vern - - PowerPoint PPT Presentation

Software Security: Principles CS 161: Computer Security Prof. Vern Paxson TAs: Jethro Beekman, Mobin Javed, Antonio Lupher, Paul Pearce & Matthias Vallentin http://inst.eecs.berkeley.edu/~cs161/ January 31, 2013 TL-15 TL-30


slide-1
SLIDE 1

Software Security: Principles

CS 161: Computer Security

  • Prof. Vern Paxson

TAs: Jethro Beekman, Mobin Javed, Antonio Lupher, Paul Pearce & Matthias Vallentin

http://inst.eecs.berkeley.edu/~cs161/

January 31, 2013

slide-2
SLIDE 2

TL-­‑15

slide-3
SLIDE 3

TL-­‑30

slide-4
SLIDE 4

TRTL-­‑30

slide-5
SLIDE 5

TXTL-­‑60

slide-6
SLIDE 6

“Security is economics.”

slide-7
SLIDE 7

What ¡does ¡this ¡program ¡do?

slide-8
SLIDE 8

What ¡can ¡this ¡program ¡do? Can ¡it ¡delete ¡all ¡of ¡your ¡files?

  • YES. ¡ ¡Why?
slide-9
SLIDE 9

“Least privilege.”

slide-10
SLIDE 10

Touchstones for Least Privilege

  • When assessing the security of a system’s design,

identify the Trusted Computing Base (TCB).

– What components does security rely upon?

  • Security requires that the TCB:

– Is correct – Is complete (can’t be bypassed) – Is itself secure (can’t be tampered with)

  • Best way to be assured of correctness and its security?

– KISS = Keep It Simple, Stupid! – Generally, Simple = Small

  • One powerful design approach: privilege separation

– Isolate privileged operations to as small a component as possible – (See lecture notes for more discussion)

slide-11
SLIDE 11
slide-12
SLIDE 12

“Ensure complete mediation.”

slide-13
SLIDE 13

Ensuring Complete Mediation

  • To secure access to some capability/resource,

construct a reference monitor

  • Single point through which all access must occur

– E.g.: a network firewall

  • Desired properties:

– Un-bypassable (“complete mediation”) – Tamper-proof – Verifiable – (Note, just restatements of what we want for TCBs)

  • One subtle form of reference monitor flaw

concerns race conditions …

slide-14
SLIDE 14

¡procedure ¡withdrawal(w) ¡ ¡ ¡ ¡// ¡contact ¡central ¡server ¡to ¡get ¡balance ¡ ¡ ¡ ¡1. ¡let ¡b ¡:= ¡balance ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡2. ¡if ¡b ¡< ¡w, ¡abort ¡ ¡ ¡ ¡// ¡contact ¡server ¡to ¡set ¡balance ¡ ¡ ¡ ¡3. ¡set ¡balance ¡:= ¡b ¡-­‑ ¡w ¡ ¡ ¡ ¡4. ¡dispense ¡$w ¡to ¡user

TOCTTOU Vulnerability

TOCTTOU = Time of Check To Time of Use

slide-15
SLIDE 15

¡public ¡void ¡buyItem(Account ¡buyer, ¡Item ¡item) ¡{ ¡ ¡ ¡ ¡if ¡(item.cost ¡> ¡buyer.balance) ¡ ¡ ¡ ¡ ¡ ¡return; ¡ ¡ ¡ ¡buyer.possessions.put(item); ¡ ¡ ¡ ¡buyer.possessionsUpdated(); ¡ ¡ ¡ ¡buyer.balance ¡-­‑= ¡item.cost; ¡ ¡ ¡ ¡buyer.balanceUpdated(); ¡ ¡}

slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18
slide-19
SLIDE 19

“Separation of responsibility.”

slide-20
SLIDE 20

5 Minute Break

Questions Before We Proceed?

slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23

“Defense in depth.”

slide-24
SLIDE 24

“Company ¡policy: ¡passwords ¡must ¡be ¡at ¡least ¡10 characters ¡long, ¡contain ¡at ¡least ¡2 ¡digits, ¡1 uppercase ¡character, ¡ ¡1 ¡lowercase ¡character, ¡and 1 ¡special ¡character.”

slide-25
SLIDE 25
slide-26
SLIDE 26

TC-­‑0

slide-27
SLIDE 27

What a piece of work is a man! how Noble in Reason! how infinite in faculty! in form and moving how express and admirable! in Action, how like an Angel! in apprehension, how like a God!

  • - Hamlet Act II, Scene II

“Humans are incapable of securely storing high-quality cryptographic keys, and they have unacceptable speed and accuracy when performing cryptographic operations. (They are also large, expensive to maintain, difficult to manage, and they pollute the environment. It is astonishing that these devices continue to be manufactured and deployed. But they are sufficiently pervasive that we must design our protocols around their limitations.)”

  • - Network Security: Private Communication in a Public World,

Charlie Kaufman, Radia Perlman, & Mike Speciner, 1995

slide-28
SLIDE 28

“Psychological acceptability.”

slide-29
SLIDE 29
slide-30
SLIDE 30
slide-31
SLIDE 31
slide-32
SLIDE 32
slide-33
SLIDE 33

“Consider human factors.”

slide-34
SLIDE 34
slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37
slide-38
SLIDE 38
slide-39
SLIDE 39

“Threat models change.”

slide-40
SLIDE 40
slide-41
SLIDE 41
slide-42
SLIDE 42

“Threat models change.” “Design security in from the start.” (Beware bolt-on security.)

slide-43
SLIDE 43
slide-44
SLIDE 44
slide-45
SLIDE 45
slide-46
SLIDE 46
slide-47
SLIDE 47
slide-48
SLIDE 48
slide-49
SLIDE 49

“Don’t rely on security through

  • bscurity.”
slide-50
SLIDE 50
slide-51
SLIDE 51
slide-52
SLIDE 52
slide-53
SLIDE 53
slide-54
SLIDE 54
slide-55
SLIDE 55
slide-56
SLIDE 56

“Trusted path.”

slide-57
SLIDE 57

Soda ¡Hall ¡wiring ¡closet

slide-58
SLIDE 58
slide-59
SLIDE 59

Protection?

slide-60
SLIDE 60
slide-61
SLIDE 61

“Use fail-safe defaults.”