SlideShare a Scribd company logo
1 of 42
Dan Boneh
CS155
Computer Security
Course overview
Dan Boneh
Admin
• Course web site: https://cs155.Stanford.edu
• Profs: Dan Boneh and Zakir Durumeric
• Three programming projects (pairs) and two written homeworks
• Project #1 is posted. Please attend section this Friday!
• Use Piazza and Gradescope
• Automatic 72 hour extension
• No final exam this year
Dan Boneh
Live lectures on Zoom
ask
questions
Lectures are recorded … posted on canvas
Dan Boneh
The computer security problem
• Lots of buggy software
• Social engineering is very effective
• Money can be made from finding and exploiting vulns.
1. Marketplace for exploits
2. Marketplace for owned machines (PPI)
3. Many methods to profit from owned machines
current state of computer security
Dan Boneh
source: https://www.cvedetails.com/top-50-products.php?year=2019
Top 10 products by total number of “distinct” vulnerabilities in 2019
Dan Boneh
Vulnerable applications being exploited
Source: Kaspersky Security Bulletin 2017
Browser
Android
Office
Java
Dan Boneh
Why so many security bugs? Case study: Zoom client
Users have an expectation of privacy. But:
(1) Problems with crypto (Marczak and Scott-Railton, April 2020)
(2) How not to save a user click (J. Leitschuh, July 2019)
user’s MacOS system
Browser Zoom app
launch
zoom.com
https://zoom.com/[meeting]
Dan Boneh
Browser Zoom app
Why so many security bugs? Case study: Zoom client
Users have an expectation of privacy. But:
(1) Problems with crypto (Marczak and Scott-Railton, April 2020)
(2) How not to save a user clicks (J. Leitschuh, July 2019)
user’s MacOS system
launch
Can we bypass the
security dialog?
zoom.com
https://zoom.com/[meeting]
Dan Boneh
Browser Zoom
web server
Why so many security bugs? Case study: Zoom client
Local Zoom web server listens on port localhost:19421
• To launch app: web page from zoom.com tells
browser to send an HTTP request to the local web server
• Web requests do not require a dialog …
http://localhost:19421/launch?action=join&confno=[confrence number]
Can this be attacked?
zoom.com
Dan Boneh
Browser Zoom
web server
The problem [J. Leitschuh, July 2019]
Any web site can send a request to the local web server
• Joins users to conference w/o user’s knowledge!
What happened next? Responsible disclosure, 90 days (CVE-2019-13450).
• Fixed by Zoom. Web server removed by Apple’s MRT tool.
http://localhost:19421/launch?action=join&confno=[confrence number]
evil.com
Dan Boneh
Why so many security bugs? Case study: Zoom client
Users have an expectation of privacy. But:
(1) Problems with crypto (Marczak and Scott-Railton, April 2020)
(2) How not to save a user click (J. Leitschuh, July 2019)
(3) Disable MacOS hardened runtime (P. Wardle, April 2020)
Defends against code injection, library hijacking,
and process memory space tampering.
Once user gives Zoom access to camera and mic,
MacOS ensures that entire application code does not change
Dan Boneh
What happens if protection is disabled?
Can this be abused?
requires user
approval
Dan Boneh
The impact [Wardle, 4/2020]
Zoom
app
user’s MacOS system
libssl.1.0.0
curl64
⋮
dynamic libraries loaded at Zoom startup
User approved access
to camera & mic
Dan Boneh
The impact [Wardle, 4/2020]
Zoom
app
user’s MacOS system
libssl.1.0.0
curl64
⋮
hardened runtime
does not notify user
of change to libssl!
libssl.1.0.0
Attacker installs malware library that proxies libssl.
⇒ has access to camera & mic
disable-library-validation:true
Dan Boneh
Goals for this course
• Understand exploit techniques
– Learn to defend and prevent common exploits
• Understand the available security tools
• Learn to architect secure systems
Dan Boneh
This course
Part 1: basics (architecting for security)
• Securing apps, OS, and legacy code:
sandboxing, access control, and security testing
Part 2: Web security (defending against a web attacker)
• Building robust web sites, understand the browser security model
Part 3: network security (defending against a network attacker)
• Monitoring and architecting secure networks.
Part 4: securing mobile applications
Dan Boneh
Don’t try this at home !
Dan Boneh
Introduction
What motivates
attackers?
… economics
Dan Boneh
Why compromise systems?
1. IP address and bandwidth stealing
Attacker’s goal: look like a random Internet user
Use the IP address of infected machine or phone for:
• Spam (e.g. the storm botnet)
Spamalytics: 1:12M pharma spams leads to purchase
1:260K greeting card spams leads to infection
• Denial of Service: Services: 1 hour (20$), 24 hours (100$)
• Click fraud (e.g. Clickbot.a)
Dan Boneh
Why compromise systems?
2. Steal user credentials
keylog for banking passwords, corporate passwords, gaming pwds
Example: SilentBanker (and many like it)
Bank
Malware injects
Javascript
Bank sends login page
needed to log in
When user submits
information, also sent to
attacker
User requests login page
Similar mechanism used
by Zeus botnet, and others
Man-in-the-Browser (MITB)
Dan Boneh
Lots of financial malware
Source: Kaspersky Security Bulletin 2017
• records banking passwords
via keylogger
• spread via spam email and
hacked web sites
• maintains access to PC for
future installs
Dan Boneh
Similar attacks on mobile devices
Example: FinSpy.
• Works on iOS and Android (and Windows)
• once installed: collects contacts, call history, geolocation,
texts, messages in encrypted chat apps, …
• How installed?
– Android pre-2017: links in SMS / links in E-mail
– iOS and Android post 2017: physical access
Dan Boneh
Why own machines: 3. Ransomware
a worldwide problem
• Worm spreads via a vuln.
in SMB (port 445)
• Apr. 14, 2017: Eternalblue vuln.
released by ShadowBrokers
• May 12, 2017: Worm detected
(3 weeks to weaponize)
Dan Boneh
WannaCry
ransomware
Dan Boneh
Server-side attacks
• Data theft: credit card numbers, intellectual property
– Example: Equifax (July 2017), ≈ 143M “customer” data impacted
• Exploited known vulnerability in Apache Struts (RCE)
– Many many similar attacks since 2000
• Political motivation:
– DNC, Tunisia Facebook (Feb. 2011), GitHub (Mar. 2015)
• Infect visiting users
Dan Boneh
Infecting visiting users. Example: Mpack
• PHP-based tools installed on compromised web sites
– Embedded as an iframe on infected page
– Infects browsers that visit site
• Features
– management console provides stats on infection rates
– Sold for several 100$
– Customer care can be purchased, one-year support contract
• Impact: 500,000 infected sites (compromised via SQL injection)
– Several defenses: e.g. Google safe browsing
Dan Boneh
Data theft: what is stolen (2012-2015)
Source: California breach notification report, 2015
Dan Boneh
Physical document
loss
How companies lose customer data
Source: PrivacyRights.org, 2020
lost/stolen laptops or servers
malware/hacking
Accidental disclosure
How do we have this data?
21%
32%
17%
22%
8%
insider misuse/attack
Dan Boneh
Introduction
The Marketplace for
Vulnerabilities
Dan Boneh
Marketplace for Vulnerabilities
Option 1: bug bounty programs (many)
• Google Vulnerability Reward Program: up to $31,337
• Microsoft Bounty Program: up to $100K
• Apple Bug Bounty program: up to $200K
• Stanford bug bounty program: up to $1K
• Pwn2Own competition: $15K
Option 2:
• Zerodium: up to $2M for iOS, $2.5M for Android (2019)
• … many others
Dan Boneh
Marketplace for Vulnerabilities
Source: Zerodium payouts
RCE: remote code execution
LPE: local privilege escalation
SBX: sandbox escape
Dan Boneh
Marketplace for Vulnerabilities
Source: Zerodium payouts
RCE: remote code execution
LPE: local privilege escalation
SBX: sandbox escape
Dan Boneh
Why buy 0days?
https://zerodium.com/faq.html
Dan Boneh
Ken Thompson’s clever Trojan
(CACM Aug. 1984)
Turing award lecture
What code can we trust?
Dan Boneh
What code can we trust?
Can we trust the “login” program in a Linux distribution? (e.g. Ubuntu)
• No! the login program may have a backdoor
⇾ records my password as I type it
• Solution: recompile login program from source code
Can we trust the login source code?
• No! but we can inspect the code, then recompile
Dan Boneh
Can we trust the compiler?
No! Example malicious compiler code:
compile(s) {
if (match(s, “login-program”)) {
compile(“login-backdoor”);
return
}
/* regular compilation */
}
Dan Boneh
What to do?
Solution: inspect compiler source code,
then recompile the compiler
Problem: C compiler is itself written in C, compiles itself
What if compiler binary has a backdoor?
Dan Boneh
Thompson’s clever backdoor
Attack step 1: change compiler source code:
compile(s) {
if (match(s, “login-program”)) {
compile(“login-backdoor”);
return
}
if (match(s, “compiler-program”)) {
compile(“compiler-backdoor”);
return
}
/* regular compilation */
}
(*)
Dan Boneh
Thompson’s clever backdoor
Attack step 2:
• Compile modified compiler ⇒ compiler binary
• Restore compiler source to original state
Now: inspecting compiler source reveals nothing unusual
… but compiling compiler gives a corrupt compiler binary
Complication: compiler-backdoor needs to include all of (*)
Dan Boneh
What can we trust?
I order a laptop by mail. When it arrives, what can I trust on it?
• Applications and/or operating system may be backdoored
⇒ solution: reinstall OS and applications
• How to reinstall? Can’t trust OS to reinstall the OS.
⇒ Boot Tails from a USB drive (Debian)
• Need to trust pre-boot BIOS,UEFI code. Can we trust it?
⇒ No! (e.g. ShadowHammer operation in 2018)
• Can we trust the motherboard? Software updates?
Dan Boneh
So, what can we trust?
Sadly, nothing … anything can be compromised
• but then we can’t make progress
Trusted Computing Base (TCB)
• Assume some minimal part of the system is not compromised
• Then build a secure environment on top of that
will see how during the course.
Dan Boneh
THE END
Next time: control hijacking vulnerabilities

More Related Content

Similar to CS155 Computer Security at Stanford University

Built-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersBuilt-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersPhú Phùng
 
Honeypots, Deception, and Frankenstein
Honeypots, Deception, and FrankensteinHoneypots, Deception, and Frankenstein
Honeypots, Deception, and FrankensteinPhillip Maddux
 
Two-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for EveryoneTwo-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for EveryonePaul Melson
 
Ivanti Patch Tuesday for December 2019
Ivanti Patch Tuesday for December 2019Ivanti Patch Tuesday for December 2019
Ivanti Patch Tuesday for December 2019Ivanti
 
Information-Security-Lecture-7.pptx
Information-Security-Lecture-7.pptxInformation-Security-Lecture-7.pptx
Information-Security-Lecture-7.pptxanbersattar
 
How to Keep Hackers Out of Your Organisation
How to Keep Hackers Out of Your OrganisationHow to Keep Hackers Out of Your Organisation
How to Keep Hackers Out of Your OrganisationIBM Danmark
 
Allegory of the cave(1)
Allegory of the cave(1)Allegory of the cave(1)
Allegory of the cave(1)setuid0
 
Web application security
Web application securityWeb application security
Web application securityrandhawa121985
 
How to get genuine windows 7 with low cost
How to get genuine windows 7 with low cost How to get genuine windows 7 with low cost
How to get genuine windows 7 with low cost coldfire007
 
The hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsThe hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsn|u - The Open Security Community
 
Level Up Your Security with Threat Intelligence
Level Up Your Security with Threat IntelligenceLevel Up Your Security with Threat Intelligence
Level Up Your Security with Threat IntelligenceIBM Security
 
The attack against target - how was it done and how has it changed the securi...
The attack against target - how was it done and how has it changed the securi...The attack against target - how was it done and how has it changed the securi...
The attack against target - how was it done and how has it changed the securi...Thomas Burg
 
Bots and malware
Bots and malwareBots and malware
Bots and malwareDoron Segal
 
How to stay protected against ransomware
How to stay protected against ransomwareHow to stay protected against ransomware
How to stay protected against ransomwareSophos Benelux
 

Similar to CS155 Computer Security at Stanford University (20)

News bytes Sept-2011
News bytes Sept-2011News bytes Sept-2011
News bytes Sept-2011
 
Built-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersBuilt-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software Developers
 
Honeypots, Deception, and Frankenstein
Honeypots, Deception, and FrankensteinHoneypots, Deception, and Frankenstein
Honeypots, Deception, and Frankenstein
 
Two-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for EveryoneTwo-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for Everyone
 
Ivanti Patch Tuesday for December 2019
Ivanti Patch Tuesday for December 2019Ivanti Patch Tuesday for December 2019
Ivanti Patch Tuesday for December 2019
 
Information Security Overview
Information Security OverviewInformation Security Overview
Information Security Overview
 
Information-Security-Lecture-7.pptx
Information-Security-Lecture-7.pptxInformation-Security-Lecture-7.pptx
Information-Security-Lecture-7.pptx
 
How to Keep Hackers Out of Your Organisation
How to Keep Hackers Out of Your OrganisationHow to Keep Hackers Out of Your Organisation
How to Keep Hackers Out of Your Organisation
 
Network security
Network securityNetwork security
Network security
 
Nbt con december-2014-slides
Nbt con december-2014-slidesNbt con december-2014-slides
Nbt con december-2014-slides
 
Nbt con december-2014-slides
Nbt con december-2014-slidesNbt con december-2014-slides
Nbt con december-2014-slides
 
Allegory of the cave(1)
Allegory of the cave(1)Allegory of the cave(1)
Allegory of the cave(1)
 
Web application security
Web application securityWeb application security
Web application security
 
How to get genuine windows 7 with low cost
How to get genuine windows 7 with low cost How to get genuine windows 7 with low cost
How to get genuine windows 7 with low cost
 
The hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsThe hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignments
 
Level Up Your Security with Threat Intelligence
Level Up Your Security with Threat IntelligenceLevel Up Your Security with Threat Intelligence
Level Up Your Security with Threat Intelligence
 
How websites are attacked
How websites are attackedHow websites are attacked
How websites are attacked
 
The attack against target - how was it done and how has it changed the securi...
The attack against target - how was it done and how has it changed the securi...The attack against target - how was it done and how has it changed the securi...
The attack against target - how was it done and how has it changed the securi...
 
Bots and malware
Bots and malwareBots and malware
Bots and malware
 
How to stay protected against ransomware
How to stay protected against ransomwareHow to stay protected against ransomware
How to stay protected against ransomware
 

Recently uploaded

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligencePrecisely
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfAnubhavMangla3
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 

Recently uploaded (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 

CS155 Computer Security at Stanford University

  • 2. Dan Boneh Admin • Course web site: https://cs155.Stanford.edu • Profs: Dan Boneh and Zakir Durumeric • Three programming projects (pairs) and two written homeworks • Project #1 is posted. Please attend section this Friday! • Use Piazza and Gradescope • Automatic 72 hour extension • No final exam this year
  • 3. Dan Boneh Live lectures on Zoom ask questions Lectures are recorded … posted on canvas
  • 4. Dan Boneh The computer security problem • Lots of buggy software • Social engineering is very effective • Money can be made from finding and exploiting vulns. 1. Marketplace for exploits 2. Marketplace for owned machines (PPI) 3. Many methods to profit from owned machines current state of computer security
  • 5. Dan Boneh source: https://www.cvedetails.com/top-50-products.php?year=2019 Top 10 products by total number of “distinct” vulnerabilities in 2019
  • 6. Dan Boneh Vulnerable applications being exploited Source: Kaspersky Security Bulletin 2017 Browser Android Office Java
  • 7. Dan Boneh Why so many security bugs? Case study: Zoom client Users have an expectation of privacy. But: (1) Problems with crypto (Marczak and Scott-Railton, April 2020) (2) How not to save a user click (J. Leitschuh, July 2019) user’s MacOS system Browser Zoom app launch zoom.com https://zoom.com/[meeting]
  • 8. Dan Boneh Browser Zoom app Why so many security bugs? Case study: Zoom client Users have an expectation of privacy. But: (1) Problems with crypto (Marczak and Scott-Railton, April 2020) (2) How not to save a user clicks (J. Leitschuh, July 2019) user’s MacOS system launch Can we bypass the security dialog? zoom.com https://zoom.com/[meeting]
  • 9. Dan Boneh Browser Zoom web server Why so many security bugs? Case study: Zoom client Local Zoom web server listens on port localhost:19421 • To launch app: web page from zoom.com tells browser to send an HTTP request to the local web server • Web requests do not require a dialog … http://localhost:19421/launch?action=join&confno=[confrence number] Can this be attacked? zoom.com
  • 10. Dan Boneh Browser Zoom web server The problem [J. Leitschuh, July 2019] Any web site can send a request to the local web server • Joins users to conference w/o user’s knowledge! What happened next? Responsible disclosure, 90 days (CVE-2019-13450). • Fixed by Zoom. Web server removed by Apple’s MRT tool. http://localhost:19421/launch?action=join&confno=[confrence number] evil.com
  • 11. Dan Boneh Why so many security bugs? Case study: Zoom client Users have an expectation of privacy. But: (1) Problems with crypto (Marczak and Scott-Railton, April 2020) (2) How not to save a user click (J. Leitschuh, July 2019) (3) Disable MacOS hardened runtime (P. Wardle, April 2020) Defends against code injection, library hijacking, and process memory space tampering. Once user gives Zoom access to camera and mic, MacOS ensures that entire application code does not change
  • 12. Dan Boneh What happens if protection is disabled? Can this be abused? requires user approval
  • 13. Dan Boneh The impact [Wardle, 4/2020] Zoom app user’s MacOS system libssl.1.0.0 curl64 ⋮ dynamic libraries loaded at Zoom startup User approved access to camera & mic
  • 14. Dan Boneh The impact [Wardle, 4/2020] Zoom app user’s MacOS system libssl.1.0.0 curl64 ⋮ hardened runtime does not notify user of change to libssl! libssl.1.0.0 Attacker installs malware library that proxies libssl. ⇒ has access to camera & mic disable-library-validation:true
  • 15. Dan Boneh Goals for this course • Understand exploit techniques – Learn to defend and prevent common exploits • Understand the available security tools • Learn to architect secure systems
  • 16. Dan Boneh This course Part 1: basics (architecting for security) • Securing apps, OS, and legacy code: sandboxing, access control, and security testing Part 2: Web security (defending against a web attacker) • Building robust web sites, understand the browser security model Part 3: network security (defending against a network attacker) • Monitoring and architecting secure networks. Part 4: securing mobile applications
  • 17. Dan Boneh Don’t try this at home !
  • 19. Dan Boneh Why compromise systems? 1. IP address and bandwidth stealing Attacker’s goal: look like a random Internet user Use the IP address of infected machine or phone for: • Spam (e.g. the storm botnet) Spamalytics: 1:12M pharma spams leads to purchase 1:260K greeting card spams leads to infection • Denial of Service: Services: 1 hour (20$), 24 hours (100$) • Click fraud (e.g. Clickbot.a)
  • 20. Dan Boneh Why compromise systems? 2. Steal user credentials keylog for banking passwords, corporate passwords, gaming pwds Example: SilentBanker (and many like it) Bank Malware injects Javascript Bank sends login page needed to log in When user submits information, also sent to attacker User requests login page Similar mechanism used by Zeus botnet, and others Man-in-the-Browser (MITB)
  • 21. Dan Boneh Lots of financial malware Source: Kaspersky Security Bulletin 2017 • records banking passwords via keylogger • spread via spam email and hacked web sites • maintains access to PC for future installs
  • 22. Dan Boneh Similar attacks on mobile devices Example: FinSpy. • Works on iOS and Android (and Windows) • once installed: collects contacts, call history, geolocation, texts, messages in encrypted chat apps, … • How installed? – Android pre-2017: links in SMS / links in E-mail – iOS and Android post 2017: physical access
  • 23. Dan Boneh Why own machines: 3. Ransomware a worldwide problem • Worm spreads via a vuln. in SMB (port 445) • Apr. 14, 2017: Eternalblue vuln. released by ShadowBrokers • May 12, 2017: Worm detected (3 weeks to weaponize)
  • 25. Dan Boneh Server-side attacks • Data theft: credit card numbers, intellectual property – Example: Equifax (July 2017), ≈ 143M “customer” data impacted • Exploited known vulnerability in Apache Struts (RCE) – Many many similar attacks since 2000 • Political motivation: – DNC, Tunisia Facebook (Feb. 2011), GitHub (Mar. 2015) • Infect visiting users
  • 26. Dan Boneh Infecting visiting users. Example: Mpack • PHP-based tools installed on compromised web sites – Embedded as an iframe on infected page – Infects browsers that visit site • Features – management console provides stats on infection rates – Sold for several 100$ – Customer care can be purchased, one-year support contract • Impact: 500,000 infected sites (compromised via SQL injection) – Several defenses: e.g. Google safe browsing
  • 27. Dan Boneh Data theft: what is stolen (2012-2015) Source: California breach notification report, 2015
  • 28. Dan Boneh Physical document loss How companies lose customer data Source: PrivacyRights.org, 2020 lost/stolen laptops or servers malware/hacking Accidental disclosure How do we have this data? 21% 32% 17% 22% 8% insider misuse/attack
  • 30. Dan Boneh Marketplace for Vulnerabilities Option 1: bug bounty programs (many) • Google Vulnerability Reward Program: up to $31,337 • Microsoft Bounty Program: up to $100K • Apple Bug Bounty program: up to $200K • Stanford bug bounty program: up to $1K • Pwn2Own competition: $15K Option 2: • Zerodium: up to $2M for iOS, $2.5M for Android (2019) • … many others
  • 31. Dan Boneh Marketplace for Vulnerabilities Source: Zerodium payouts RCE: remote code execution LPE: local privilege escalation SBX: sandbox escape
  • 32. Dan Boneh Marketplace for Vulnerabilities Source: Zerodium payouts RCE: remote code execution LPE: local privilege escalation SBX: sandbox escape
  • 33. Dan Boneh Why buy 0days? https://zerodium.com/faq.html
  • 34. Dan Boneh Ken Thompson’s clever Trojan (CACM Aug. 1984) Turing award lecture What code can we trust?
  • 35. Dan Boneh What code can we trust? Can we trust the “login” program in a Linux distribution? (e.g. Ubuntu) • No! the login program may have a backdoor ⇾ records my password as I type it • Solution: recompile login program from source code Can we trust the login source code? • No! but we can inspect the code, then recompile
  • 36. Dan Boneh Can we trust the compiler? No! Example malicious compiler code: compile(s) { if (match(s, “login-program”)) { compile(“login-backdoor”); return } /* regular compilation */ }
  • 37. Dan Boneh What to do? Solution: inspect compiler source code, then recompile the compiler Problem: C compiler is itself written in C, compiles itself What if compiler binary has a backdoor?
  • 38. Dan Boneh Thompson’s clever backdoor Attack step 1: change compiler source code: compile(s) { if (match(s, “login-program”)) { compile(“login-backdoor”); return } if (match(s, “compiler-program”)) { compile(“compiler-backdoor”); return } /* regular compilation */ } (*)
  • 39. Dan Boneh Thompson’s clever backdoor Attack step 2: • Compile modified compiler ⇒ compiler binary • Restore compiler source to original state Now: inspecting compiler source reveals nothing unusual … but compiling compiler gives a corrupt compiler binary Complication: compiler-backdoor needs to include all of (*)
  • 40. Dan Boneh What can we trust? I order a laptop by mail. When it arrives, what can I trust on it? • Applications and/or operating system may be backdoored ⇒ solution: reinstall OS and applications • How to reinstall? Can’t trust OS to reinstall the OS. ⇒ Boot Tails from a USB drive (Debian) • Need to trust pre-boot BIOS,UEFI code. Can we trust it? ⇒ No! (e.g. ShadowHammer operation in 2018) • Can we trust the motherboard? Software updates?
  • 41. Dan Boneh So, what can we trust? Sadly, nothing … anything can be compromised • but then we can’t make progress Trusted Computing Base (TCB) • Assume some minimal part of the system is not compromised • Then build a secure environment on top of that will see how during the course.
  • 42. Dan Boneh THE END Next time: control hijacking vulnerabilities

Editor's Notes

  1. SISL
  2. Syllabus and readings on the course web site.
  3. CVE: Common Vulnerabilities and Exposures
  4. Jonathan Leitschuh
  5. Patrick Wardle
  6. Patrick Wardle.
  7. Patrick Wardle.
  8. In this segment we will describe a few sample attacks. We will come back to this and discuss malware in far greater detail later on in the course. Here we give a few examples to illustrate the state of the world.
  9. DDoS service from hack-shop.org.ru Source: http://www.defcon.org/images/defcon-15/dc15-presentations/dc-15-holt.pdf Mobile bot-nets: more reliable because phones are always on
  10. Good user interface. Bitcoin.
  11. Target (2013): 140M CC stolen
  12. Sysadmin: Terry Childs Third example: Roger Duronio
  13. In this segment I want to tell you about market places that have evolved around exploits and vulnerabilities
  14. There are many people who work on finding vulnerabilities in software, such as Windows or software that runs on top of windows. Finding an explotable vulnerability can take months and the question is what to do when they find one. Most likely they publish an article in a security conference like Blackhat and boost their reputation. But it shouldn’t be too surprising that they can also make money from selling the vulnerability before announcing it at a conference. There are three options.
  15. Now, the 3rd option is to go to the black market. We don’t quite know the value of vulns. there, but I list here a few quotes that suggest that prices could be higher than with the other two options.
  16. Now, the 3rd option is to go to the black market. We don’t quite know the value of vulns. there, but I list here a few quotes that suggest that prices could be higher than with the other two options.
  17. Creator of UNIX, the B programming language, UTF-8, and much more.
  18. ShadowHammer: exploits ASUS Live Update which is used to update BIOS/UEFI on Asus computers. The attack used a backdoored version of Live Update. The attack took place between June and Nov. 2018.