Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views37 pages

05 - OS Security

The document provides an overview of computer security, focusing on operating systems security, virtualization architectures, trusted computing, and security evaluation standards. It discusses the vulnerabilities of PCs, the concept of the Trusted Computing Base (TCB), and approaches to enhance platform security. Additionally, it covers the evolution of security evaluation standards, particularly the Common Criteria and its assurance levels.

Uploaded by

Ahmad Alhazmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views37 pages

05 - OS Security

The document provides an overview of computer security, focusing on operating systems security, virtualization architectures, trusted computing, and security evaluation standards. It discusses the vulnerabilities of PCs, the concept of the Trusted Computing Base (TCB), and approaches to enhance platform security. Additionally, it covers the evolution of security evaluation standards, particularly the Common Criteria and its assurance levels.

Uploaded by

Ahmad Alhazmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Computer Security

Operating Systems Security


Lecture Overview

a. OS Security Architectures
b. Virtualisation Architectures
c. Trusted Computing
d. Security Evaluation

Umm Al-Qura University Computer Security 2


System & Communication Security

• "Using encryption on the Internet is the equivalent of


arranging an armored car to deliver credit card
information from someone living in a cardboard box to
someone living on a park bench.“
(Gene Spafford)

Umm Al-Qura University Computer Security 3


Vulnerabilities of the PC today

Process memory
access and corrup-
tion: most attacks
happen here !!!

Access to
protected
memory
through Insert malicious code
DMA Access to Access to
into file that will be
keyboard or graphics executed later
mouse data frame buffer

Umm Al-Qura University Computer Security 4


System
TCB – Trusted Computing Base TCB
• The trusted computing base (TCB) of a computer Security-
Relevant
is the set of all hardware, firmware, and/or Components
software components that are critical to its
security, in the sense that bugs or vulnerabilities Components
of components inside the TCB might jeopardize that are
irrelevant for
the security goals of the entire system. Security
security
is not affected by components outside the TCB.
(TCSEC: Trusted Computer Evaluation Criteria 1985)

• “A trusted computing component is is


one that can break the security policy”
(Bruce Schneier, prominent security expert)

Umm Al-Qura University Computer Security 5


Approaches to strengthening platform security
• Remove bugs and vulnerabilities in the OS
– News releases and constant patching
• Add security features to the computing platform
– Protection Rings, Data Execution Prevention, ASLR
• Platform security monitoring
– Anti-virus tools
– Firewall, intrusion detection
• Virtualisation technology
– Separates processes by separating virtual systems
• Trusted Computing
– Authenticated boot
– Add secure hardware to the commodity platform
• E.g. TPM (Trusted Platform Module)
Umm Al-Qura University Computer Security 6
OS Security Protection Rings
• Hierarchic security levels were introduced in
X86 CPU architecture in 1985 (Intel 80386)
• 4 ordered privilege levels
– Ring 0: highest
– Ring 3: lowest
– Intended usage → see diagram:

Umm Al-Qura University L08 - Computer Security 7


What happened to rings 1 & 2 ?

... it eventually became clear that the hierarchical


protection that rings provided did not closely match
the requirements of the system programmer and
gave little or no improvement on the simple system of
having two modes only. Rings of protection lent
themselves to efficient implementation in hardware,
but there was little else to be said for them. [...]. This
again proved a blind alley...
Maurice Wilkes (1994)

Umm Al-Qura University Computer Security 8


CPU Protection Ring structure from 2006
• New Ring -1 introduced for virtualization.
• Necessary for protecting hypervisor from
VMs (Virtual Machines) running in Ring 0.
• Hypervisor controls VMs in Ring 0
• Ring -1 is aka.: Supervisor Mode

Ring -1: Hypervisor Mode -v1

Ring 0: Kernel Mode (Unix root, Win. Adm.) 0


Ring 1: Not used 1
Ring 2: Not used 2
Ring 3: User Mode 3

Umm Al-Qura University Computer Security 9


Principle of protection ring model
• A SW (software) process can SW Ring 3
access and modify any data Data
and software at the same or
Ring 2
less privileged level as itself.
• A process that runs in kernel
mode (Ring 0) can access data Ring 1
and SW in Rings 0, 1, 2 and 3
– but not in Ring -1
• The goal of attackers is to get Ring 0 SW
SW
access to kernel (Ring 0) or Data
hypervisor mode (Ring -1). Ring -1
– through exploits
SW Data
– by tricking users to install malware
Privileged CPU Instructions

• Some of the system instructions (called “privileged


instructions”) are protected from use by application
programs.
• The privileged instructions control system functions
(such as the loading of system registers). They can be
executed only when the Privilege Level is 0 or -1 (most
privileged).
• If a privileged instruction is attempted by a non-privileged
process, then a general-protection exception (#GP) is
generated, and the program crashes.

Umm Al-Qura University Computer Security 11


Controlled Invocation of code segments

Code segment of 1
Ring 3 user process
Kernel API
4

Rings 1 & 2 (no code segments) 3 2

Ring 0 Driver Kernel


Code Segments Code Segments

Hypervisor
Ring -1
Code Segments

Umm Al-Qura University Computer Security 12


Platform Virtualization
Type 1 VM Architecture (native)

App. App. App. App. App. App.


Guest OS VM Guest OS VM Guest OS VM Virtual
e.g. Windows e.g. Linux e.g. Mac OS Machines

Hypervisor
Hardware (X86 CPU from Intel or AMD)

• No host OS
• Hypervisor runs directly on hardware
• High performance
• Traditionally limited GUI, but good GUI in modern hypervisors
• Driver support can be an issue
Umm Al-Qura University Computer Security 14
Type 2 VM Architecture (hosted)

App. App. App. App. App. App.


Guest OS VM Guest OS VM Virtual
Guest OS VM Guest OS VM
e.g. Linux e.g. Windows Machines
Hypervisor
Hypervisor

Host OS (e.g. Windows, Linux or Mac OS) Host


Machine
Hardware (X86 CPU from Intel or AMD)

• Hypervisor runs on top of host OS


• Performance penalty, because hardware access goes through 2 OSs
• Traditionally good GUI
• Good HW support, because host OS drivers available

Umm Al-Qura University Computer Security 15


Challenges of Running VMs
VMs and Apps in a VM must
not detect that Hypervisor
exists or that they share HW
resources with other VMs

App. App. App. App.


Hypervisor must protect VMs’
memory areas from each other
Guest OS VM Guest OS VM

Hypervisor Hypervisor must protect itself


from all VMs
Hardware

Hypervisor must present virtual


hardware interface to VMs

Umm Al-Qura University Computer Security 16


Type 1 VM Architecture Ring Allocation

Ring 3 App. App. App. App.

Run VMs in Ring 0


Ring 0 Guest OS VM Guest OS VM

Run Hypervisor in Ring -1


Ring -1 Hypervisor

Hardware

• Guest OS VMs are less privileged than the hypervisor.


• Hypervisor is well protected from the VMs.
• Good performance and good security !
Umm Al-Qura University Computer Security 17
Type 2 VM Architecture Ring Allocation

App. App. App. App.


Ring 3 Run VMs in Ring 3
Guest OS VM Guest OS VM
Run Hypervisor in Ring 3
Hypervisor

Ring 0 Host OS Run Host OS in Ring 0

Hardware

• Hypervisor and Guest OS VMs run in Ring 3.


• Guest OS VMs call privileged instructions that are forbidden in Ring 3.
• Forbidden instructions cause exceptions that are handled by
interrupt/exception handler to be executed by Host OS.
• Slow performance !
Umm Al-Qura University Computer Security 18
Platform Virtualisation Products

• Microsoft Hyper-V
• VMWare ESX
Type 1
• Citrix XenServer (Xen)
(Native)
• ORACLE VM Server (Xen)
• Amazon EC2 (Xen)
• IBM System Z Hypervisor
Hypervisor types

• Microsoft Virtual PC
Type 2
• VMWare Workstation
(Hosted)
• Citrix XenClient
• VirtualBox

Umm Al-Qura University Computer Security 19


Virtualization examples of use
• Cloud providers run large server parks
– Each customer gets its own VM
– Many customers share the same hardware
– Easy to migrate VMs between servers to
increase/reduce capacity
Amazon EC2 Data Centre
• Testing and software analysis
– Potentially damaging experiments can be safely
executed in isolated environment
– Take a snapshot of the current state of the OS
– Use this later to reset the system to that state
– Malware Analysis

Umm Al-Qura University Computer Security 20


Trusted Computing

Umm Al-Qura University Computer Security 21


Trusted Computing Motivation
• Software alone can not be strongly trusted because
software can easily be corrupted.
• Malware infection in OS kernel remains undetected
by anti-malware tools.
• Physical access to computers opens for attacks
that can circumvent traditional TCBs (Trusted
Computing Base), e.g. secure operating systems.
• Remote parties do not know the security state of
systems they are communicating with.
• Remote parties do not know the physical identity of
hosts they are communicating with.

Umm Al-Qura University Computer Security 22


Trusted Computing Group
TPM History & Evolution
• October 1999: TCPA formed
– Trusted Computing Platform Alliance
– Founders: IBM, HP, Compaq, Intel and Microsoft
• 2001: 1st TPM specification released
– Trusted Platform Module
• 2002: Changed name to TCG (Trusted Computing Group)
– Due to bad publicity about TCPA
• 2003: TPM spec. 1.2 released
• 2012: Draft TPM Specification 2.0 published
– TPM 2.0 spec. not compatible with TPM 1.2 spec.
• 2015: Official TPM specification 2.0

Umm Al-Qura University Computer Security 23


Pervasiveness of the TPM

• The TPM chip sits


on the motherboard
• Installed in billions
of devices
• Relatively obscure
technology for most
people

Umm Al-Qura University Computer Security 24


TPM usage
• TPM is both the name of a standard and a chip
• Current TPM chips implement TPM spec. 2.0 from 2015
• TPM chip mounted on motherboard,
• Computing platforms equipped with TPM
– Laptops, servers, pads, mobile phones
• Used by software platforms
– Windows, Linux, and MAC OS
• Supports 3 basic services:
– Authenticated/Secure boot
– Remote attestation,
– Sealed Storage / Encryption

Umm Al-Qura University Computer Security 25


Boot security with TPM in Windows

• UEFI/BIOS must be trusted


• UEFI/BIOS then uses the TPM to verify Boot Loader
by measuring it (i.e. checking hash of Boot Loader)
• Boot Loader then uses TPM to verify Kernel
• … etc.
Legend:
UEFI Unified Extensible Firmware Interface
(equivalent to BIOS)
TPM Trusted Platform Module
TCG Trusted Computing Group
PCR Platform Configuration Register
CSP Configuration Service Provider
Umm Al-Qura University Computer Security 26
Remote Attestation
with TPM
• With a measurement attestation
signed by the TPM, the device can
prove its state to remote parties.
• Remote parties validate the signature
based on a TPM PKI, and thereby
obtain trust about the device state.
• Remote parties can have a policy to
grant access and privileges based on
attestation of device state.

Umm Al-Qura University - Computer Security 29


Sealed Storage / Encryption with TPM
• Windows BitLocker is used for disk encryption
– Can operate with or without TPM
• With TPM, the data can only be decrypted
– by a certain machine in given configuration
• Depends on
– Storage Root Key (SRK) unique to machine
– Decryption only possible on unique machine
• Prevents stolen disks from being decrypted on a
different machine
– Is this useful?

Umm Al-Qura University Computer Security 28


Security Evaluation

Umm Al-Qura University Computer Security 29


IS 15408
Security Evaluation Standards: Evolution

TCSEC
(Orange Bk)
1985 Canadian
Criteria
UK Conf 1993
Levels
1989 ITSEC
U.S.
1991
Federal
German
Criteria
Criteria
Draft 1993 Common
Criteria

French V1 1996
Criteria V2 1998
V3 2006
Umm Al-Qura University Computer Security 31
TCSEC (1985)
• TCSEC applied to operating systems
• Focused on user authentication and
access control
• Defined the concept of TCB

Level A: VERIFIED PROTECTION A1

Level B: MANDATORY PROTECTION B1 B2 B3

Level C: DISCRETIONARY PROTECTION C1 C2

Level D: MINIMAL PROTECTION (failed evaluation)

Umm Al-Qura University Computer Security 32


Common Criteria (1996)

• Criteria for the security evaluation of IT systems and


devices, called the Target of Evaluation (TOE).
• Protection Profile (PP): a (re-usable) set of security
requirements, including an EAL; should be developed by
user communities to capture typical protection
requirements.
• Security Target (ST): expresses security requirements
for a specific TOE, e.g. by reference to a PP; basis for
any evaluation.
• Evaluation Assurance Level (EAL): define the specific
evaluation requirements that must be satisfied in an
evaluation; there are seven hierarchically ordered EALs.

Umm Al-Qura University Computer Security 33


The CC Standard
ISO 15408
• Part 1 -Overview
• Part 2 – SFRs Security Functional Requirements
– Security Functional Requirements (SFRs) are “what the product
does.” Taken together, the SFRs a product claims describe the
product’s security functionality. A product’s security features, for
example, might be how it identifies and authenticates users.
• Part 3 – SARs: Security Assurance Requirements
– Security Assurance Requirements (SARs) define the development
environment in all its phases: specification, development tools and
practices, for example, the use of automated tools to prevent
unauthorized modifications to the product, the completeness of test
coverage.

Umm Al-Qura University Computer Security 34


CC Assurance Levels

• EAL1 - functionally tested


• EAL2 - structurally tested
• EAL3 - methodically tested and checked
• EAL4 - methodically designed, tested, and reviewed
• EAL5 - semiformally designed and tested
• EAL6 - semiformally verified design and tested
• EAL7 - formally verified design and tested

Umm Al-Qura University Computer Security 35


Using the Common Criteria

• CC is useful for:
– Evaluating the security features of products or systems
– Specifying security features in product or system
– Making it easier to integrate security features into products or systems
– Supporting the marketing of evaluated products
• But
– Evaluation is expensive and slow
– New versions of a product must be re-evaluated, but can be done
more quickly than the original evaluation.

Umm Al-Qura University Computer Security 36


End of lecture

Umm Al-Qura University Computer Security 37

You might also like