ch15[1] not included
TRANSCRIPT
-
7/21/2019 Ch15[1] Not Included
1/43
Chapter 15: SecurityChapter 15: Security
-
7/21/2019 Ch15[1] Not Included
2/43
15.2 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Chapter 15: SecurityChapter 15: Security
The Security Problem
Program Threats
System and Network Threats
Cryptography as a Security Tool
User Authentication
Implementing Security Defenses
Firewalling to Protect Systems and Networks
Computer-Security Classifications
An Example: Windows XP
-
7/21/2019 Ch15[1] Not Included
3/43
15.3 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
ObjectivesObjectives
To discuss security threats and attacks To explain the fundamentals of encryption, authentication, andhashing
To examine the uses of cryptography in computing
To describe the various countermeasures to security attacks
-
7/21/2019 Ch15[1] Not Included
4/43
15.4 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
The Security ProblemThe Security Problem
Security must consider external environment of the system, andprotect the system resources
Intruders (crackers) attempt to breach security
Threatis potential security violation
Attackis attempt to breach security
Attack can be accidental or malicious
Easier to protect against accidental than malicious misuse
-
7/21/2019 Ch15[1] Not Included
5/43
15.5 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Security ViolationsSecurity Violations
Categories
Breach of confidentiality
Breach of integrity
Breach of availability
Theft of service
Denial of service
Methods
Masquerading (breach authentication)
Replay attack
Message modification Man-in-the-middle attack
Session hijacking
-
7/21/2019 Ch15[1] Not Included
6/43
15.6 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Standard Security AttacksStandard Security Attacks
-
7/21/2019 Ch15[1] Not Included
7/4315.7 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Security Measure LevelsSecurity Measure Levels
Security must occur at four levels to be effective:
Physical
Human
Avoidsocial engineering, phishing, dumpster diving
Operating System
Network
Security is as week as the weakest chain
-
7/21/2019 Ch15[1] Not Included
8/4315.8 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Program ThreatsProgram Threats
Trojan Horse
Code segment that misuses its environment
Exploits mechanisms for allowing programs written by users to beexecuted by other users
Spyware, pop-up browser windows, covert channels
Trap Door
Specific user identifier or password that circumvents normal securityprocedures
Could be included in a compiler
Logic Bomb
Program that initiates a security incident under certain circumstances
Stack and Buffer Overflow
Exploits a bug in a program (overflow either the stack or memorybuffers)
-
7/21/2019 Ch15[1] Not Included
9/4315.9 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
C Program with Buffer-overflow ConditionC Program with Buffer-overflow Condition
#include
#define BUFFER SIZE 256
int main(int argc char !arg"$%
&
char 'ufferBUFFER SIZE$
if (argc ) 2%
return *+
else &
strc,-('ufferarg"+$%
return
/
/
-
7/21/2019 Ch15[1] Not Included
10/4315.10 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Layout of Typical Stack FrameLayout of Typical Stack Frame
-
7/21/2019 Ch15[1] Not Included
11/4315.11 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Modified Shell CodeModified Shell Code
#include )stdio.h0
int main(int argc char !arg"$%
&
e1ec",(3'in3sh443'in 3sh44 U%
return
/
-
7/21/2019 Ch15[1] Not Included
12/4315.12 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Hypothetical Stack FrameHypothetical Stack Frame
Before attack After attack
-
7/21/2019 Ch15[1] Not Included
13/4315.13 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Program Threats (Cont.)Program Threats (Cont.)
Viruses
Code fragment embedded in legitimate program
Very specific to CPU architecture, operating system,applications
Usually borne via email or as a macro
Visual Basic Macro to reformat hard driveSu' 7uto8,en(%
9im oFS
Set oFS :
;reate8'
-
7/21/2019 Ch15[1] Not Included
14/4315.14 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Program Threats (Cont.)Program Threats (Cont.)
Virus dropperinserts virus onto the system
Many categories of viruses, literally many thousands of viruses
File
Boot
Macro
Source code
Polymorphic
Encrypted
Stealth
Tunneling Multipartite
Armored
-
7/21/2019 Ch15[1] Not Included
15/4315.15 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
A Boot-sector Computer VirusA Boot-sector Computer Virus
-
7/21/2019 Ch15[1] Not Included
16/4315.16 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
System and Network ThreatsSystem and Network Threats
Worms usespawnmechanism; standalone program
Internet worm
Exploited UNIX networking features (remote access) and bugsinfingerandsendmailprograms
Grappling hookprogram uploaded main worm program
Port scanning Automated attempt to connect to a range of ports on one or arange of IP addresses
Denial of Service
Overload the targeted computer preventing it from doing anyuseful work
Distributed denial-of-service (DDOS) come from multiple sitesat once
-
7/21/2019 Ch15[1] Not Included
17/4315.17 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
The Morris Internet WormThe Morris Internet Worm
-
7/21/2019 Ch15[1] Not Included
18/4315.18 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Cryptography as a Security ToolCryptography as a Security Tool
Broadest security tool available
Source and destination of messages cannot be trusted withoutcryptography
Means to constrain potential senders (sources) and / orreceivers (destinations) ofmessages
Based on secrets (keys)
-
7/21/2019 Ch15[1] Not Included
19/4315.19 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Secure Communication over Insecure MediumSecure Communication over Insecure Medium
-
7/21/2019 Ch15[1] Not Included
20/4315.20 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
EncryptionEncryption
Encryption algorithm consists of
Set ofKkeys
Set ofMMessages
Set ofCciphertexts (encrypted messages)
A functionE:K (MC). That is, for eachkK,E(k) is a function forgenerating ciphertexts from messages.
BothEandE(k) for anykshould be efficiently computable functions.
A functionD:K (CM). That is, for eachkK,D(k) is a function forgenerating messages from ciphertexts.
BothDandD(k) for anykshould be efficiently computable functions.
An encryption algorithm must provide this essential property: Given a ciphertextcC,a computer can computemsuch thatE(k)(m) =conly if it possessesD(k).
Thus, a computer holdingD(k) can decrypt ciphertexts to the plaintexts used toproduce them, but a computer not holdingD(k) cannot decrypt ciphertexts.
Since ciphertexts are generally exposed (for example, sent on the network), it isimportant that it be infeasible to deriveD(k) from the ciphertexts
-
7/21/2019 Ch15[1] Not Included
21/4315.21 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Symmetric EncryptionSymmetric Encryption
Same key used to encrypt and decrypt
E(k) can be derived fromD(k), and vice versa
DES is most commonly used symmetric block-encryption algorithm(created by US Govt)
Encrypts a block of data at a time
Triple-DES considered more secure Advanced Encryption Standard (AES),twofishup and coming
RC4 is most common symmetric stream cipher, but known to havevulnerabilities
Encrypts/decrypts a stream of bytes (i.e wireless transmission)
Key is a input to psuedo-random-bit generator
Generates an infinitekeystream
-
7/21/2019 Ch15[1] Not Included
22/4315.22 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Asymmetric EncryptionAsymmetric Encryption
Public-key encryption based on each user having two keys:
public key published key used to encrypt data
private key key known only to individual user used to decryptdata
Must be an encryption scheme that can be made public without
making it easy to figure out the decryption scheme Most common is RSA block cipher
Efficient algorithm for testing whether or not a number is prime
No efficient algorithm is know for finding the prime factors of anumber
-
7/21/2019 Ch15[1] Not Included
23/4315.23 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Asymmetric Encryption (Cont.)Asymmetric Encryption (Cont.)
Formally, it is computationally infeasible to deriveD(kd, N)
fromE(ke, N), and soE(ke, N) need not be kept secret and
can be widely disseminated
E(ke, N) (or justke) is thepublic key
D(kd, N) (or justkd) is theprivate key
Nis the product of two large, randomly chosen prime
numberspandq(for example,pandqare 512 bitseach)
Encryption algorithm isE(ke, N)(m) =mkemodN, where
kesatisfieskekdmod (p1)(q1) = 1 The decryption algorithm is thenD(kd, N)(c) =ckdmodN
-
7/21/2019 Ch15[1] Not Included
24/43
15.24 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Asymmetric Encryption ExampleAsymmetric Encryption Example
For example. makep= 7andq= 13
We then calculateN= 713 = 91 and (p1)(q1) = 72
We next selectkerelatively prime to 72 and
-
7/21/2019 Ch15[1] Not Included
25/43
15.25 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Encryption and Decryption using RSAEncryption and Decryption using RSAAsymmetric CryptographyAsymmetric Cryptography
-
7/21/2019 Ch15[1] Not Included
26/43
15.26 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Cryptography (Cont.)Cryptography (Cont.)
Note symmetric cryptography based on transformations,asymmetric based on mathematical functions
Asymmetric much more compute intensive
Typically not used for bulk data encryption
-
7/21/2019 Ch15[1] Not Included
27/43
15.27 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
AuthenticationAuthentication
Constraining set of potential senders of a message
Complementary and sometimes redundant to encryption
Also can prove message unmodified
Algorithm components
A setKof keys
A setMof messages
A setAof authenticators
A functionS:K (MA)
That is, for eachkK,S(k) is a function for generating
authenticators from messages
BothSandS(k) for anykshould be efficiently computable functions
A functionV:K (MA{true, false}). That is, for eachkK,V(k) isa function for verifying authenticators on messages
BothVandV(k) for anykshould be efficiently computable functions
-
7/21/2019 Ch15[1] Not Included
28/43
-
7/21/2019 Ch15[1] Not Included
29/43
15.29 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Authentication Hash FunctionsAuthentication Hash Functions
Basis of authentication
Creates small, fixed-size block of data (message digest, hashvalue) fromm
Hash FunctionHmust be collision resistant onm
Must be infeasible to find anmmsuch thatH(m) =H(m)
IfH(m) =H(m), thenm=m The message has not been modified
Common message-digest functions includeMD5, which produces a128-bit hash, andSHA-1, which outputs a 160-bit hash
-
7/21/2019 Ch15[1] Not Included
30/43
15.30 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Authentication - MACAuthentication - MAC
Symmetric encryption used inmessage-authentication code(MAC) authentication algorithm
Simple example:
MAC definesS(k)(m) =f(k, H(m))
Wherefis a function that is one-way on its first argument
kcannot be derived fromf(k, H(m))Because of the collision resistance in the hash function,reasonably assured no other message could create thesame MAC
A suitable verification algorithm isV(k)(m, a) ( f(k,m) =a)
Note thatkis needed to compute bothS(k) andV(k), soanyone able to compute one can compute the other
-
7/21/2019 Ch15[1] Not Included
31/43
15.31 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Authentication Digital SignatureAuthentication Digital Signature
Based on asymmetric keys and digital signature algorithm
Authenticators produced aredigital signatures
In a digital-signature algorithm, computationally infeasible to deriveS(ks)
fromV(kv)
Vis a one-way function
Thus,kvis the public key andksis the private key
Consider the RSA digital-signature algorithm
Similar to the RSA encryption algorithm, but the key use is reversed
Digital signature of messageS(ks)(m) =H(m)ksmodN
The keyksagain is a paird, N, whereNis the product of two large,
randomly chosen prime numberspandq
Verification algorithm isV(kv)(m, a) ( akvmodN=H(m))
Wherekvsatisfieskvksmod (p 1)(q 1) = 1
-
7/21/2019 Ch15[1] Not Included
32/43
15.32 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Authentication (Cont.)Authentication (Cont.)
Why authentication if a subset of encryption?
Fewer computations (except for RSA digital signatures)
Authenticator usually shorter than message
Sometimes want authentication but not confidentiality
Signed patches et al
Can be basis fornon-repudiation
-
7/21/2019 Ch15[1] Not Included
33/43
15.33 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Key DistributionKey Distribution
Delivery of symmetric key is huge challenge
Sometimes doneout-of-band
Asymmetric keys can proliferate stored onkey ring
Even asymmetric key distribution needs care man-in-the-middle attack
Man-in-the-middleAttackonAsymmetricMan-in-the-middleAttackonAsymmetric
-
7/21/2019 Ch15[1] Not Included
34/43
15.34 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Maninthemiddle Attack on AsymmetricManinthemiddle Attack on AsymmetricCryptographyCryptography
-
7/21/2019 Ch15[1] Not Included
35/43
15.35 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Digital CertificatesDigital Certificates
Proof of who or what owns a public key
Public key digitally signed a trusted party
Trusted party receives proof of identification from entity and certifiesthat public key belongs to entity
Certificate authority are trusted party their public keys included
with web browser distributions They vouch for other authorities via digitally signing their keys,and so on
-
7/21/2019 Ch15[1] Not Included
36/43
15.36 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Encryption Example - SSLEncryption Example - SSL
Insertion of cryptography at one layer of the ISO network model
(the transport layer)
SSL Secure Socket Layer (also called TLS)
Cryptographic protocol that limits two computers to only exchangemessages with each other
Very complicated, with many variations
Used between web servers and browsers for securecommunication (credit card numbers)
The server is verified with acertificateassuring client is talking tocorrect server
Asymmetric cryptography used to establish a securesession key
(symmetric encryption) for bulk of communication during session Communication between each computer theb uses symmetric keycryptography
-
7/21/2019 Ch15[1] Not Included
37/43
15.37 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
User AuthenticationUser Authentication
Crucial to identify user correctly, as protection systems depend on
user ID
User identity most often established throughpasswords, can be
considered a special case of either keys or capabilities
Also can include something user has and /or a user attribute
Passwords must be kept secret Frequent change of passwords
Use of non-guessable passwords
Log all invalid access attempts
Passwords may also either be encrypted or allowed to be used onlyonce
-
7/21/2019 Ch15[1] Not Included
38/43
15.38 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Implementing Security DefensesImplementing Security Defenses
Defense in depthis most common security theory multiple layers
of security
Security policy describes what is being secured
Vulnerability assessment compares real state of system / networkcompared to security policy
Intrusion detection endeavors to detect attempted or successful
intrusions Signature-baseddetection spots known bad patterns
Anomaly detectionspots differences from normal behavior
Can detectzero-dayattacks
False-positivesandfalse-negativesa problem
Virus protection
Auditing, accounting, and logging of all or specific system ornetwork activities
-
7/21/2019 Ch15[1] Not Included
39/43
15.39 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Firewalling to Protect Systems and NetworksFirewalling to Protect Systems and Networks
A network firewall is placed between trusted and untrusted hosts
The firewall limits network access between these two securitydomains
Can be tunneled or spoofed
Tunneling allows disallowed protocol to travel within allowedprotocol (i.e. telnet inside of HTTP)
Firewall rules typically based on host name or IP address whichcan be spoofed
Personal firewallis software layer on given host
Can monitor / limit traffic to and from the host
Application proxy firewallunderstands application protocol and
can control them (i.e. SMTP) System-call firewallmonitors all important system calls and applyrules to them (i.e. this program can execute that system call)
-
7/21/2019 Ch15[1] Not Included
40/43
15.40 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Network Security Through Domain Separation Via FirewallNetwork Security Through Domain Separation Via Firewall
-
7/21/2019 Ch15[1] Not Included
41/43
15.41 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Computer Security ClassificationsComputer Security Classifications
U.S. Department of Defense outlines four divisions of computer
security:A,B,C, andD.
D Minimal security.
C Provides discretionary protection through auditing. Divided intoC1andC2.C1identifies cooperating users with the same level ofprotection.C2allows user-level access control.
B All the properties ofC, however each object may have uniquesensitivity labels. Divided intoB1,B2, andB3.
A Uses formal design and verification techniques to ensuresecurity.
-
7/21/2019 Ch15[1] Not Included
42/43
15.42 Silberschatz, Galvin and Gagne 2005Operating System Concepts 7thEdition, Jan 10, 2005
Example: Windows XPExample: Windows XP
Security is based on user accounts
Each user has unique security ID
Login to ID createssecurity access token
Includes security ID for user, for users groups, and specialprivileges
Every process gets copy of tokenSystem checks token to determine if access allowed or denied
Uses a subject model to ensure access security. A subject tracks andmanages permissions for each program that a user runs
Each object in Windows XP has a security attribute defined by a
security descriptor
For example, a file has a security descriptor that indicates theaccess permissions for all users
-
7/21/2019 Ch15[1] Not Included
43/43
End of Chapter 15End of Chapter 15