29
Operating Systems Security (524870) Computer Security & OS Lab Dept. of Software Science, DKU Cho, Seong-je (조성제) Fall, 2019 sjcho at dankook.ac.kr

Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

Operating Systems Security

(524870)

Computer Security & OS LabDept. of Software Science, DKU

Cho, Seong-je (조성제)

Fall, 2019

sjcho at dankook.ac.kr

Page 2: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 2 – 524870, F’19Computer Security & OS Lab.

Teaching Team

Instructor Prof. Cho, Seong-je (조성제 교수)

Room 510, SW∙ICT Hall

Computer Security & OS Lab.

Dept. of Software Science, Dankook Univ.

Faculty advisor of the Aegis, Information Security Club

Email) sjcho at dankook.ac.kr

http://SecureSW.dankook.ac.kr → On-going courses

» Lecture notes, Exam schedule, Assignments

TA SeungJae Han & JaeHee Cho (한승재 & 조재희)

Room 504/505, Media center building

Page 3: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

What is Operating Systems?

What is Computer Security?Which types of threats are there?

Page 4: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 4 – 524870, F’19

What is Computer Security?

Allow intended use of computer systems

Prevent unintended use that may cause harm

Protect information and systems from security threats Protect computing resources and system assets from security threats

※ Security threats: STRIDE

Computer Security & OS Lab.

Page 5: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 5 – 524870, F’19

Operating Systems & Security

Threats / Attacks

Password cracking for root ID

Bootkit, Rootkit, keylogger, backdoor, …

Privilege Escalation Attacks (User Super user)

Buffer overflows, Frame Pointer overwrite attack, Ret2Libc, ROP

Android rooting, iOS jailbreaking

Race condition vulnerabilities

DLL injection, GOT overwrite, …

Defenses

Secure boot, Measured boot, …

Stack Guard (Canary), Stack Shield, NX bit, DEP, PAX/ExecShield, ASLR

SELinux/SEAndroid, AppArmor, SMACK, TOMOYO, grsecurity, …

Sandbox, Trusted Execution Environment (TEE), Secure OS, …

Audit log, Computer forensics, …

Computer Security & OS Lab.

Page 6: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

Learn About Security

Make a Difference

What is This Class About?

Page 7: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 7 – 524870, F’19

Topics Covered in “Introduction to SW Security”, Spring, 2019

Basic security threats and properties

Microsoft STRIDE vs. CIA Triad

Primary concepts for Cryptography

Symmetric Cryptography vs. Public-key Cryptography

Cryptographic Hash Functions

C secure coding overview

BoF overview, Integer overflow, Format string overview

Malware analysis, Reverse Engineering

Web Security: SQL injection

Malware

Backdoor, Logic bomb, Viruses, Worms

Network security basics

Sniffing, Spoofing, Firewall, DDoS attacks

Computer Security & OS Lab.

Page 8: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 8 – 524870, F’19

Possible Topics Covered in Class of this Semester

Basic system security attacks and defense

Buffer overflow, Ret2Libc, ROP ↔ Stack canary, LibSafe, ASLR, Guard page

Privilege escalation, Code injection attacks, Code reuse attacks

Control flow hijacking ↔ Control flow integrity (CFI)

Race condition, PLT/GOT overwrite

Authentication, Password cracking, Logging

Linux Security Framework / Access Control

Access control (DAC/MAC/RBAC)

Multilevel Security (MLS), Type Enforcement (TE)

SELinux, SMACK, AppArmor, grsecurity, …

Malware / Rooting

Keylogger, Backdoor, Rootkits

Android rooting

Other OS security

Command injection, DLL injection, Hooking

Sandbox, Virtualization

Computer Security & OS Lab.

Page 9: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 9 – 524870, F’19Computer Security & OS Lab.

Tentative Schedule (subject to change)

Week 1: Course introduction, Threats, Overview of OS & Security

Week 2: Set-UID programs, Environment Variable and Set-UID Lab

Week 3: Buffer overflow, Privilege Escalation, BoF exercise

Stack overflow / Heap overflow / Data overflow

Week 4: Buffer overflow attack, BoF exercise

Week 5: Defense of BoF attacks: ASLR, Guard page, Ret2Libc, PLT/GOT overwrite

Week 6: Race conditions, Return Oriented Programming (ROP)

Week 7: Midterm exam

Week 8: Defenses against control flow hijacking, Examples for term project

Week 9: Access control: DAC, SetUID program, RUID/EUID

Week 10: Access control: MAC, Privilege escalation, SELinux overview

Week 11: Access control: RBAC, SELinux TE & RBAC & MLS

Week 12: Malware (Keylogger, Rootkit)

Week 13: Rooting, Trusted OS

Week 14: User authentication (Password cracking)

Week 15: Final exam, Presentation

Page 10: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 10 – 524870, F’19

Tentative schedule

Computer Security & OS Lab.

Week Lecture Hands-on Exercise(s)

1 IntroductionEnvironment variable & Set-UID Lab

2 Set-UID programs

3 Buffer Overflow (BoF)Buffer overflow Attack

4 Buffer overflow attacks

5 Defense for Buffer overflow, Ret2Libc PLT/GOT overwrite

6 Race condition & ROP Race condition

7 Mid-term exam

8 Defenses against control flow hijacking ROP or Dirty COW

9 Discretionary Access Control (DAC)SELinux (basic commands, user addition, policy insertion & change)

10 Mandatory Access Control (MAC)

11 Role-based Access Control (RBAC)

12 Malware (keylogger, Rootkit)

13 Android rooting TiwelRoot v3.0 APK

14 User Authentication (Password)

15 Final exam

Page 11: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 11 – 524870, F’19

Textbook

Computer Security: A Hands-on Approach, 2nd Edition(ISBN: 978-1733003902) -- By Wenliang Du

Software Security

Set-UID programs

Environment Variables and Attacks

Shellshock Attack

Buffer Overflow Attack

Return-to-libc Attack and ROP

Format String Vulnerability

Race Condition Vulnerability

Dirty COW

Reverse Shell

Hardware Security

Meltdown Attack

Spectre Attack

Computer Security & OS Lab.

Page 12: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 12 – 524870, F’19

Slides, Labs, Materials

Software Security (https://www.handsonsecurity.net/resources.html)

Set-UID programs

Environment Variables and Attacks

Shellshock Attack

Buffer Overflow Attack

Return-to-libc Attack and ROP

Format String Vulnerability

Race Condition Vulnerability

Dirty COW

Reverse Shell

SE Linux (Security-Enhanced Linux), AppArmor

The SELinux Notebook – 4th Edition http://freecomputerbooks.com/books/The_SELinux_Notebook-4th_Edition.pdf

Security-Enhanced Linux (User Guide) – Red Hat Enterprise Linux 6

SELinux User’s and Administrator’s Guide – Red Hat Enterprise Linux 7

SELinux for Android 8.0

Computer Security & OS Lab.

Page 13: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 13 – 524870, F’19

Course Format

Lecture: 15 weeks (including midterm/final exam)

Lecture + Practical exercise (roughly 70:30)

Midterm exam: Oct. 16 or 21

Final exam: Dec. 11 or 16

Students can get extra credit (or bonus points)

Presentation about recent security issues

E.g.: Android/iOS Security, Tizen Security, …

Reporting after a field trip to an expo

Technical report including hands-on experience (practical exercises) in current systems

Computer Security & OS Lab.

Page 14: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 14 – 524870, F’19

Assignments and Labs Tentative plan

Two types of homework

2~4 Labs + Team-based term project

Usually 2-3 weeks long

Lab & Team-based term project Lab environment: SEEDUbutu16.04 (Pre-built VM Image)

https://seedsecuritylabs.org/Labs_16.04/Software/ &

https://seedsecuritylabs.org/lab_env.html &

https://seedsecuritylabs.org/labs.html

Term project: will be done in groups of 3~4 (Pick partners soon!)

Expected Assignment/Lab PLT/GOT overwrite, ROP, DLL injection

Rootkit (Hooking), Rooting detection, Network security

Comparison of SELinux, AppArmor, and SMACK

Computer Security & OS Lab.

Page 15: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 15 – 524870, F’19

SEEL Labs: https://seedsecuritylabs.org/Labs_16.04/

Computer Security & OS Lab.

Page 16: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 16 – 524870, F’19

Grading

Coursework will consist of homeworks and a midterm exam, and a comprehensive final exam.

The overall grade will be determined as follows: 35% from the midterm exam

35% from the final exam

20% from assignments

Technical reports, Lab, Presentations & discussions

10% from attendance and participation

“A/B/C/D/F” Grading systems

Grade percentage can be variable

Only 10% to 20% of all students may receive grade ‘A’

Computer Security & OS Lab.

Page 17: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 17 – 524870, F’19

Cheating policy

Performance must be 100% individual effort on all exams, that is, no collaboration is allowed on exams. Any collaboration or copying will be considered cheating.

Group work on lab is permitted, but each student must list his or her collaborators in writing for each problem, using a phrase like "In collaboration with Gildong Hong...". If a student turns in a solution without listing the others who helped produce this solution, this act will be considered cheating (for it is plagiarism).

Late homework assignments will not be accepted without a medical or other life-emergency excuse.

Students caught cheating will be given a zero on the homework or exam in question and have a letter filed with their associate dean for academic affairs.

Computer Security & OS Lab.

Page 18: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 18 – 524870, F’19

Cheating policy & Course Requirements

No cheating What is cheating?

Sharing code: either by copying, retyping, looking at, or supplying a copy of a file.

What is NOT cheating? Helping others use systems or tools.

Helping others with high-level design issues.

Helping others debug their code.

Penalty for cheating: F grade

Active class participation Question Presentation & Discussion Feedback

Read newspapers including “보안뉴스” ( http://www.boannews.com/ )

Computer Security & OS Lab.

Page 19: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 19 – 524870, F’19

Reference 1

William Stallings and Lawrie Brown, Computer Security: Principles and Practice, 2/E or 3/E, Prentice Hall, 2011/2014, Pearson’ International Edition

http://williamstallings.com/ComputerSecurity/

http://www.pearsonhighered.com/educator/academic/product/1,,0132775069,00.html

http://www.pearsonhighered.com/educator/product/Computer-Security-Principles-and-Practice/9780133773927.page

Computer Security & OS Lab.

Page 20: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 20 – 524870, F’19

Contents of Text

Chap.1: Overview

Part I: Computer Security Technology and

Principles

Chap. 2: Cryptographic Tools

Chap. 3: User Authentication

Chap. 4: Access Control

Chap. 5: Database & Cloud Security

Chap. 6: Malicious Software

Chap. 7: Denial-of-Service Attacks

Chap. 8: Intrusion Detection

Chap. 9: Firewalls and IPS

Part II: SW Security and Trusted Systems

Chap. 10: Buffer Overflow

Chap. 11: Software Security

Chap. 12: OS Security

Chap. 13: Trusted Computing and

Multilevel Security

Computer Security & OS Lab.

Part III: Management Issues

Chap.14: Security Management and RA

Chap. 15: Security Controls, Plans, and Proc

Chap. 16: Physical & Infrastructure Sec

Chap. 17: Human Resource Security

Chap. 18: Security Auditing

Chap. 19: Legal & Ethical Aspects

Part IV: Cryptographic Algorithms

Chap. 20: Symmetric Encryption and

Message Confidentiality

Chap. 21: Public-key Cryptography &

Message Authentication

Part V: Network Security

Chap. 22: Internet Security Protocols and

Standards

Chap. 23: Internet Authentication

Applications

Chap. 24: Wireless Network Security

Page 21: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 21 – 524870, F’19

Reference 2 (Table of Contents)

Information Security: Principles and Practice, 2nd edition by Mark Stamp, Wiley, 2011

http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470626399,miniSiteCd-BSG.html

http://onlinelibrary.wiley.com/book/10.1002/9781118027974

You can find out online chapters and appendices are available

Introduction Chapter 1: Introduction

CrytoChapter 2: Crypto Basics

Chapter 3: Symmetric Key Crypto

Chapter 4: Public Key Crypto

Chapter 5: Hash Functions and

Other Topics

Chapter 6: Advanced Cryptanalysis

Access Control Chapter 7: Authentication

Chapter 8: Authorization

Protocol

Chapter 9: Simple Authentication Protocols

Chapter 10: Real-World Security Protocols

SoftwareChapter 11: Software Flaws and Malware

Chapter 12: Insecurity in Software

Chapter 13: Operating Systems and Security

Computer Security & OS Lab.

Page 23: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 23 – 524870, F’19

Contents of Textbook

Computer Security & OS Lab.

International Edition Original Edition

Chap.1:

Chap.2:

Chap.3:

Chap.4:

Chap.5:

Chap.6:

Chap.7:

Chap.8:

Chap.9:

Chap.10:

Introduction

Cryptography

Operating Systems Security

Malicious Software

Network Security I

Network Security II

Browser Security

Physical Security

Security Models and Practice

Application Security

Introduction

Physical Security

Operating Systems Security

Malware

Network Security I

Network Security II

Web Security

Cryptography

Security Models and Practice

Distributed Application Security

Page 24: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 24 – 524870, F’19

Other References

crackmes.de - A great site for testing your reversing skills. Crackmes range from Very Easy to Very Hard [1-9] for many Operating systems !

Reverser’s playground: www.crackmes.de

tdhack.com - a lot of challenges including cryptographic riddles, hackmes and software applications to crack for both Windows and Linux. Polish and English languages are supported.

Hacking, cracking, wargames, cryptography

Lord of the Root https://www.vulnhub.com/entry/lord-of-the-root-101,129/

https://www.vulnhub.com/ https://research.g0blin.co.uk/lord-of-the-root-vulnhub-writeup/

양대일, 정보보안 개론과 실습: 시스템 해킹과 보안(개정판), 한빛미디어, 2011 http://hack.pe.kr/321

Computer Security & OS Lab.

Page 25: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 25 – 524870, F’19

Notice / Notification

Be careful that only the attendee can download the lecture notes Copyright of all lecture notes should be protected

Please do not distribute/upload the lecture notes (PDF slides) via the Internet, blog, usb, email, … We are strictly prohibited from distributing the PPT/PDF

slides written by the authors of textbooks

Computer Security & OS Lab.

Page 26: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

Everyone is invited, regardless of skill

Contact: Cho, Seong-je <sjcho at dankook.ac.kr>

or

Visit: http://securesw.dankook.ac.kr

Computer Security & OS Lab.

We need great diligence and effort.

Every effort makes the next effort easier and more enjoyable

Page 27: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 27 – 524870, F’19

A Key Comment

• Do not try attacks at home or school!

• Our goal is to educate so you can defend, not attack

Computer Security & OS Lab.

Page 28: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 28 – 524870, F’19

Summary

Prerequisites

C language

System programming (Debugging)

Introduction to SW Security

Related courses

Computer architecture

Introduction to operating systems

Computer networks

http://securesw.dankook.ac.kr

Computer Security & OS Lab.

Page 29: Operating Systems Securitysecuresw.dankook.ac.kr/ISS19-2/2019_OS_Se_1_Course_intro.pdf · 2019-08-26 · –5 – 524870, F’19 Operating Systems & Security Threats / Attacks Password

– 29 – 524870, F’19

Any questions?

Hardships, The way of suffering

Diligence, An unremitting effort, Sincerity, Passion

---------------------------------------------------------------------

Expert, Specialist

Black hat vs. White hat

Computer Security & OS Lab.