Introduction and Security Principles
CS 161 Summer 2026 - Lecture 1
Computer Science 161
First: Introductions and Logistics
2
Computer Science 161
Course Overview
3
Computer Science 161
Learning Objectives
4
Computer Science 161
Course Outline (OLD)
5
Computer Science 161
Extra Tools and Skills
6
Computer Science 161
Prerequisites
7
Computer Science 161
Course Logistics
8
Computer Science 161
Course Logistics
9
Computer Science 161
Course Logistics
10
Computer Science 161
Temptation
11
Computer Science 161
Course Structure: Lectures
12
In-person | Synchronous online | Asynchronous online |
|
|
|
Computer Science 161
Course Structure: Discussions
13
In-person | Asynchronous online |
|
|
Computer Science 161
Course Structure: Office Hours
14
Computer Science 161
Course Structure: Exams
15
Computer Science 161
Resources
16
Computer Science 161
Platforms
17
Computer Science 161
Grading Structure
18
Computer Science 161
Class Policies: Extensions
19
Computer Science 161
Class Policies: DSP
20
Computer Science 161
Class Policies: Collaboration
21
Computer Science 161
Class Policies: Academic Honesty
22
Computer Science 161
Class Policies: Academic Honesty
23
Computer Science 161
Stress Management and Mental Health
24
Computer Science 161
Course Climate
25
Computer Science 161
Case Studies and Blue Slides
26
Computer Science 161
Example Case Study: Stuxnet
27
Computer Science 161
What is security?
28
Computer Science 161
What is security?
Enforcing a desired property in the presence of an attacker
data confidentiality
user privacy
data and computation integrity
authentication
availability
…
29
Computer Science 161
Why is security important?
30
Computer Science 161
Why is security important?
31
| |
FBI probe of alleged plane hack sparks worries over flight safety | |
Drew Harwell | May 18, 2015 |
| |
Pacemaker hack can kill via laptop | |
Jeremy Kirk | October 21, 2012 |
Computer Science 161
Why is security important?
32
| |
Data Breach Tracker: All the Major Companies That Have Been Hacked | |
Karavbrandeisky | October 30, 2014 |
Computer Science 161
Why is security important?
33
| |
America’s Electric Grid Has a Vulnerable Back Door—and Russia Walked Through It | |
Rebecca Smith and Rob Barry | January 10, 2019 |
A Wall Street Journal reconstruction of the worst known hack into the nation’s power system reveals attacks on hundreds of small contractors | |
Computer Science 161
What is hackable?
34
| |
For the First Time, Hackers Have Used a Refrigerator to Attack Businesses | |
Julie Bort | January 17, 2014 |
Computer Science 161
Security Principles
Textbook Chapter 1
35
Computer Science 161
First Module: Security Principles
36
Computer Science 161
Sending a message (Cryptography preview)
Create a system to transmit a secret message.
37
Computer Science 161
Principle: Know Your Threat Model
Textbook Chapter 1.1 & 1.12
38
Computer Science 161
The Parable of the Bear Race
“I don’t have to outrun the bear. I just have to outrun you.”�Takeaway: You often just need to have “good enough” defense to make attackers turn somewhere else.
39
Reminder: blue slides are case studies. Remember the takeaway, not the story!
Computer Science 161
Security Principle: Know Your Threat Model
40
Computer Science 161
Security Principle: Know Your Threat Model
41
Reminder: blue slides are case studies. Remember the takeaway, not the story!
Computer Science 161
Threat Model: Common Assumptions for Attackers
42
Computer Science 161
Trusted Computing Base
43
Computer Science 161
Sending a message (Cryptography preview)
Create a system to transmit a secret message.
Who are the attackers?
44
Computer Science 161
What's the Lesson?
45
Computer Science 161
Accident on Motorway
46
Here’s the hidden computer inside the sign.
Here’s a highway sign.
Here’s the control panel. Most signs use the default password, DOTS.
Computer Science 161
Caution! Zombies Ahead!!!
Note: Do not ever do this.
47
Computer Science 161
Trapped in Sign Factory! Send Help!
Takeaway: Shannon’s maxim/Don’t rely on security through obscurity
48
Computer Science 161
Principle:�Don’t Rely on Security Through Obscurity
Textbook Chapter 1.9
49
Computer Science 161
Security Principle: Shannon’s Maxim
50
Assume the attacker knows where the “secret” control panel is located, and has read the manual with instructions on resetting the password.
Computer Science 161
Sending a message (Cryptography preview)
Create a system to transmit a secret message.
Before starting, the defenders must tell the entire class how their system works. (You may not rely on security through obscurity).
The defenders are allowed one number or word to be shared secretly (a secret key) that the attackers don't know. You must decide on a key beforehand, and your system should be able to send arbitrary messages for any key.
51
Computer Science 161
Sending a message (Cryptography preview)
Create a system to transmit a secret message.
52
Computer Science 161
Sending a message (Cryptography preview)
Ex. "cat" with Secret Key 0xDEADBEEF
cat -> 2 0 19
2 0 19 -> 00000010 00000000 00010011
XOR everybit with the secret key -> 0xdcadad
53
Computer Science 161
Break
54
Computer Science 161
What's the Lesson?
55
Computer Science 161
Warning Dialogs
56
When you send information to the Internet, it might be possible for others to see that information. Do you want to continue?
In the future, do not show this message.
Yes
No
Computer Science 161
Warning Dialogs
57
When you see a dialog box like this, click ‘Yes’ to make it go away. If available, click the checkbox first to avoid being bothered by it again.
Yes
No
In the future, do not show this message.
Computer Science 161
Warning Dialogs
58
Examine Certificate...
Accept this certificate permanently
Accept this certificate temporarily for this session
Do not accept this certificate and do not connect to this Web site
Website Certified by an Unknown Authority
Unable to verify the identity of svn.xiph.org as a trusted site.
Possible reasons for this error:
- Your browser does not recognise the Certificate Authority that issued the site’s certificate.
- The site’s certificate is incomplete due to a server misconfiguration.
- You are connected to a site pretending to be svn.xiph.org, possibly to obtain your confidential information.
Please notify the site’s webmaster about this problem.
Before accepting this certificate, you should examine this site’s certificate carefully. Are you willing to accept this certificate for the purpose of identifying the Web site svn.xiph.org?
OK
Cancel
Computer Science 161
Warning Dialogs
59
View Incomprehensible Information
The presence of warning dialogs often represent a failure: How is the user supposed to know what to do?�Takeaway: Consider human factors
Unable to verify the identity of svn.xiph.org as a trusted site.
Blah blah geekspeak geekspeak geekspeak.
Before accepting this certificate, your browser can display a second dialog full of incomprehensible information. Do you want to view this dialog?
Make this message go away permanently
Make this message go away temporarily for this session
Stop doing what you were trying to do
OK
Cancel
Computer Science 161
Principle: Consider Human Factors
Textbook Chapter 1.2
60
Computer Science 161
Security Principle: Consider Human Factors
61
Physical security keys use the fact that humans are trained to safeguard keys
Computer Science 161
What's the Lesson?
62
Computer Science 161
Physical Safes
Takeaway: Security is economics
63
TL-15 ($3,000)�15 minutes with common tools
TL-30 ($4,500)�30 minutes with common tools
TRTL-30 ($10,000)�30 minutes with common tools and a cutting torch
TXTL-60 (>$50,000)�60 minutes with common tools, a cutting torch, and up to 4 oz of explosives
Computer Science 161
Security is Economics
Textbook Chapter 1.3
64
Computer Science 161
Security Principle: Security is Economics
65
Computer Science 161
What's the Lesson?
66
Computer Science 161
Burglar Alarms
67
Computer Science 161
Principle: Detect If You Can’t Prevent
Textbook Chapter 1.4
68
Computer Science 161
Security Principle: Detect if You Can’t Prevent
69
Computer Science 161
Response: Mitigation and Recovery
70
Computer Science 161
Detection but no Response
71
| |
Hacked Bitcoin Exchange Says Users May Share $68 Million Loss | |
Lulu Yilun Chen and Yuji Nakamura | August 5, 2016 |
Computer Science 161
What's the Lesson?
72
Computer Science 161
The Theodosian Walls of Constantinople
73
Computer Science 161
Principle: Defense in Depth
Textbook Chapter 1.5
74
Computer Science 161
Security Principle: Defense in Depth
75
Computer Science 161
What's the Lesson?
76
Computer Science 161
Welcome to a Nuclear Bunker
77
Computer Science 161
Principle: Separation of Responsibility
Textbook Chapter 1.7
78
Computer Science 161
Security Principle: Separation of Responsibility
79
Computer Science 161
What's the Lesson?
80
Computer Science 161
Spot the Issue
81
Computer Science 161
Principle: Ensure Complete Mediation
Textbook Chapter 1.8 & 1.13
82
Computer Science 161
Security Principle: Ensure Complete Mediation
83
The cars drove around the barrier
Computer Science 161
Time-of-Check to Time-of-Use
84
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. give w dollars to user
Suppose you have $5 in your account. How can you trick this system into giving you more than $5?
Computer Science 161
Time-of-Check to Time-of-Use
85
withdrawal(w=5)�1. let b := balance�2. if b < w, abort
withdrawal(w=5)�1. let b := balance�2. if b < w, abort�
// contact server to set balance�3. set balance := b - w��4. give w dollars to user
// contact server to set balance�3. set balance := b - w��4. give w dollars to user
The machine gives you $10!
Time
Computer Science 161
What's the Lesson?
86
Computer Science 161
Soda Hall
87
Computer Science 161
Principle: Use Fail-Safe Defaults
Textbook Chapter 1.10
88
Computer Science 161
Security Principle: Use Fail-Safe Defaults
89
Computer Science 161
What's the Lesson?
90
Computer Science 161
uTorrent
91
Computer Science 161
uTorrent
92
Computer Science 161
uTorrent
93
Computer Science 161
uTorrent
94
Computer Science 161
uTorrent
95
Computer Science 161
Principle: Least Privilege
Textbook Chapter 1.6
96
Computer Science 161
Security Principle: Least Privilege
97
Computer Science 161
Principle: Design in Security from the Start
Textbook Chapter 1.11
98
Computer Science 161
Security Principle: Design in Security from the Start
99
Computer Science 161
Security Principles: Summary
100
Computer Science 161