Bcai 204 Os Unit 5
Bcai 204 Os Unit 5
Operating System Concepts – 8th Edition, Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.2 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.4 Silberschatz, Galvin and Gagne ©2009
Principles of Protection Domain Structure
Guiding principle – principle of least privilege Access-right = <object-name, rights-set>
z Programs, users and
P d systems
t should
h ld bbe given
i jjustt enough
h privileges
i il tto where rights-set is a subset of all valid operations that can be performed on
perform their tasks the object.
Domain
D i = sett off access-rights
i ht
Operating System Concepts – 8th Edition 9.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.6 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.7 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.8 Silberschatz, Galvin and Gagne ©2009
Use of Access Matrix Use of Access Matrix (Cont)
If a process in Domain Di tries to do “op” on object Oj, then “op” must be in Access matrix design separates mechanism from policy
the access matrix z M h i
Mechanism
Operating system provides access-matrix + rules
Can be expanded to dynamic protection
If ensures that the matrix is only manipulated by authorized agents
z Operations to add, delete access rights and that rules are strictly enforced
z Special access rights: z Policy
owner of Oi User dictates policy
copy op from Oi to Oj Who can access what object and in what mode
control – Di can modify
y Dj access rights
g
transfer – switch from domain Di to Dj
Operating System Concepts – 8th Edition 9.9 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.10 Silberschatz, Galvin and Gagne ©2009
M
Each Row = Capability
p y List ((like a key)
y)
Fore each domain, what operations allowed on what objects.
Object 1 – Read
Object
j 4 – Read, Write, Execute
Object 5 – Read, Write, Delete, Copy
Figure B
Operating System Concepts – 8th Edition 9.11 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.12 Silberschatz, Galvin and Gagne ©2009
Access Matrix with Copy Rights Access Matrix With Owner Rights
Operating System Concepts – 8th Edition 9.13 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.14 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.15 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.16 Silberschatz, Galvin and Gagne ©2009
Revocation of Access Rights Capability-Based Systems
Access List – Delete access rights from access list Hydra
z Si l
Simple z Fi d sett off access rights
Fixed i ht known
k to
t and
d interpreted
i t t d by
b the
th system
t
z Immediate z Interpretation of user-defined rights performed solely by user's program;
system provides access protection for use of these rights
Capability List – Scheme required to locate capability in the system before
capability can be revoked Cambridge CAP System
z Reacquisition z Data capability - provides standard read
read, write
write, execute of individual
z Back-pointers storage segments associated with object
Operating System Concepts – 8th Edition 9.17 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.18 Silberschatz, Galvin and Gagne ©2009
Interpret protection specifications to generate calls on whatever protection Attack can be accidental or malicious
system is provided by the hardware and the operating system Easier to protect against accidental than malicious misuse
Operating System Concepts – 8th Edition 9.19 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.20 Silberschatz, Galvin and Gagne ©2009
Security Violations Standard Security Attacks
Categories
z B
Breach
h off confidentiality
fid ti lit
z Breach of integrity
z Breach of availability
z Theft of service
z Denial of service
Methods
z Masquerading (breach authentication)
z Replay attack
Message modification
z Man-in-the-middle attack
z Session hijacking
Operating System Concepts – 8th Edition 9.21 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.22 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.23 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.24 Silberschatz, Galvin and Gagne ©2009
Program Threats (Cont.) Program Threats (Cont.)
Viruses Virus dropper inserts virus onto the system
z C d ffragmentt embedded
Code b dd d iin llegitimate
iti t program Many
M categories
t i off viruses,
i literally
lit ll many th
thousands
d off viruses
i
z Very specific to CPU architecture, operating system, applications z File
z Usually borne via email or as a macro z Boot
Visual Basic Macro to reformat hard drive z Macro
Sub AutoOpen() z Source code
Dim oFS z Polymorphic
Set oFS = CreateObject(’’Scripting.FileSystemObject’’)
z Encrypted
vs = Shell(
Shell(’’c:command.com
c:command.com /k format c:’’,vbHide)
c: ,vbHide)
z Stealth
End Sub
z Tunneling
z Multipartite
z Armored
Operating System Concepts – 8th Edition 9.25 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.26 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.27 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.28 Silberschatz, Galvin and Gagne ©2009
The Morris Internet Worm Cryptography as a Security Tool
Broadest security tool available
z S
Source anddd
destination
ti ti off messages cannott be
b trusted
t t d without
ith t
cryptography
z Means to constrain potential senders (sources) and / or receivers
(destinations) of messages
Based on secrets (keys)
Operating System Concepts – 8th Edition 9.29 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.30 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.31 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.32 Silberschatz, Galvin and Gagne ©2009
Symmetric Encryption Asymmetric Encryption
Same key used to encrypt and decrypt Public-key encryption based on each user having two keys:
z E(k) can b
be d
derived
i d ffrom D(k),
D(k) and
d vice
i versa z public
bli kkey – published
bli h d kkey used
d tto encryptt d
data
t
DES is most commonly used symmetric block-encryption algorithm (created z private key – key known only to individual user used to decrypt data
by US Govt) Must be an encryption scheme that can be made public without making it
z Encrypts a block of data at a time easy to figure out the decryption scheme
Triple-DES considered more secure z Most common is RSA block cipher
Advanced Encryption Standard (AES), twofish up and coming z Efficient algorithm for testing whether or not a number is prime
RC4 is most common symmetric stream cipher, but known to have z No efficient algorithm is know for finding the prime factors of a number
vulnerabilities
z Encrypts/decrypts a stream of bytes (i.e wireless transmission)
z Key is a input to psuedo-random-bit generator
Generates an infinite keystream
Operating System Concepts – 8th Edition 9.33 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.34 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.35 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.36 Silberschatz, Galvin and Gagne ©2009
Encryption and Decryption using RSA
Asymmetric Cryptography Cryptography (Cont.)
Note symmetric cryptography based on transformations, asymmetric based
on mathematical functions
z Asymmetric much more compute intensive
z Typically not used for bulk data encryption
Operating System Concepts – 8th Edition 9.37 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.38 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.39 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.40 Silberschatz, Galvin and Gagne ©2009
Authentication – Hash Functions Authentication – Digital Signature
Basis of authentication Based on asymmetric keys and digital signature algorithm
Creates
C t small,
ll fifixed-size
d i bl block
k off d
data
t ((message digest,
di t hhash
h value)
l ) ffrom m A th ti t
Authenticators d are digital
produced
d di it l signatures
i t
Hash Function H must be collision resistant on m In a digital-signature algorithm, computationally infeasible to derive S(ks ) from V(kv)
z V is a one-way function
z Must be infeasible to find an m
m’ ≠ m such that H(m) = H(m
H(m’))
z Thus, kv is the public key and ks is the private key
If H(m) = H(m’), then m = m’
Consider the RSA digital-signature algorithm
z The message has not been modified
z Similar to the RSA encryption algorithm
algorithm, but the key use is reversed
Common message-digest functions include MD5, which produces a 128-bit z Digital signature of message S(ks )(m) = H(m)ks mod N
hash, and SHA-1, which outputs a 160-bit hash
z The key ks again is a pair d, N, where N is the product of two large, randomly
chosen
h prime
i numbers
b p anddq
z Verification algorithm is V(kv)(m, a) ≡ (akv mod N = H(m))
Where kv satisfies kvks mod (p − 1)(q − 1) = 1
Operating System Concepts – 8th Edition 9.41 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.42 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.43 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.44 Silberschatz, Galvin and Gagne ©2009
Man-in-the-middle Attack on Asymmetric
Cryptography Digital Certificates
Proof of who or what owns a public key
Public
P bli kkey di
digitally
it ll signed
i d a ttrusted
t d party
t
Trusted party receives proof of identification from entity and certifies that
public key belongs to entity
Certificate authority are trusted party – their public keys included with web
browser distributions
z They vouch for other authorities via digitally signing their keys
keys, and so
on
Operating System Concepts – 8th Edition 9.45 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.46 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 9.47 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.48 Silberschatz, Galvin and Gagne ©2009
Implementing Security Defenses Firewalling to Protect Systems and Networks
Defense in depth is most common security theory – multiple layers of A network firewall is placed between trusted and untrusted hosts
security The firewall limits network access between these two security domains
z
Security policy describes what is being secured Can be tunneled or spoofed
Vulnerability assessment compares real state of system / network Tunneling allows disallowed protocol to travel within allowed protocol
z
compared to security policy (i.e. telnet inside of HTTP)
Intrusion detection endeavors to detect attempted or successful intrusions z Firewall rules typically based on host name or IP address which can be
z Signature-based detection spots known bad patterns spoofed
z Anomaly detection spots differences from normal behavior Personal firewall is software layer on given host
Can detect zero-day attacks z Can monitor / limit traffic to and from the host
z False positives and false-negatives
False-positives false negatives a problem Application proxy firewall understands application protocol and can control
Virus protection them (i.e. SMTP)
Auditing, accounting, and logging of all or specific system or network System-call firewall monitors all important system calls and apply rules to
activities
ti iti them (i.e.
(i e this program can execute that system call)
Operating System Concepts – 8th Edition 9.49 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.50 Silberschatz, Galvin and Gagne ©2009
Network Security Through Domain Separation Via Firewall Computer Security Classifications
U.S. Department of Defense outlines four divisions of computer security: A,
C and D
B C,
B,
D – Minimal security
C – Provides discretionary protection through auditing
z Divided into C1 and C2
C1 identifies cooperating users with the same level of protection
C2 allows user-level access control
B – All the properties of C, however each object may have unique sensitivity
labels
z Divided into B1, B2, and B3
A – Uses formal design and verification techniques to ensure security
Operating System Concepts – 8th Edition 9.51 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8th Edition 9.52 Silberschatz, Galvin and Gagne ©2009
Example: Windows XP
Operating System Concepts – 8th Edition 9.53 Silberschatz, Galvin and Gagne ©2009