Security and Auth entication CS-4513 D-term 200 8 1 Security and Authentication CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts, 7 th ed., by Silbershatz, Galvin, & Gagne, Distributed Systems: Principles & Paradigms, 2 nd ed. By Tanenbaum and Van Steen, and Modern Operating Systems, 2 nd ed., by Tanenbaum)
62
Embed
Security and Authentication CS-4513 D-term 20081 Security and Authentication CS-4513 Distributed Computing Systems (Slides include materials from Operating.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Security and Authentication
CS-4513 D-term 2008 1
Security and Authentication
CS-4513Distributed Computing Systems
(Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne, Distributed Systems: Principles & Paradigms, 2nd ed. By Tanenbaum and Van Steen, and
Modern Operating Systems, 2nd ed., by Tanenbaum)
Security and Authentication
CS-4513 D-term 2008 2
Reading Material
• Tanenbaum, Modern Operating Systems, Chapter 9– Security and threats
– Viruses• How to write and
detect!
– Protection – implementation of security
• Silbershatz, Chapters 14-15– Protection
– Security
• Tanenbaum & Van Steen– Chapter 9
Security and Authentication
CS-4513 D-term 2008 3
Puzzle
• Alice wishes to send secret message to Bob– She places message in impenetrable box– Locks the box with unbreakable padlock– Sends locked box to Bob
• Problem:– Bob has no key to unlock box– No feasible way to securely send key to Bob
• How does Bob retrieve message?
Security and Authentication
CS-4513 D-term 2008 4
Answer
• Bob adds 2nd unbreakable padlock to box– Locks with own key– Sends box back to Alice (with two padlocks!)
• Alice unlocks and removes her lock– Sends box back to Bob
• Bob unlocks his lock– Opens box and reads message
• What could go wrong?
Security and Authentication
CS-4513 D-term 2008 5
Answer
• Bob adds 2nd unbreakable padlock to box– Locks with own key– Sends box back to Alice (with two padlocks!)
• Alice unlocks and removes her lock– Sends box back to Bob
• Bob unlocks his lock– Opens box and reads message
• What could go wrong?
Security and Authentication
CS-4513 D-term 2008 6
Authentication
• How does a system (distributed or not) know who it is talking to?
• Who do I say that I am?
• How can I verify that?• Something I know (that nobody else should know)• Something I have (that nobody else should have)• Something I am (that nobody else should be…)
Security and Authentication
CS-4513 D-term 2008 7
Threats against Authentication
I want to pretend to be you:• I can steal your password
– the sticky note on your monitor or the list in your desk drawer
– by monitoring your communications or looking over your shoulder
• I can guess your password – particularly useful if I can also guess your user name
• I can get between you and the system you are talking to
Security and Authentication
CS-4513 D-term 2008 8
Getting between you and system you are talking to
Security and Authentication
CS-4513 D-term 2008 9
Login Spoof
• I create a login screen in my process– On a public machine
– Looks exactly like real one
• You log into system– My login process records your user ID and password
– Logs you in normally
• Result:– I have gotten between you and system without your knowledge– Also, I have stolen your user ID and password
Security and Authentication
CS-4513 D-term 2008 10
The Trouble with Passwords
• They are given away
• They are too easy to guess
• They are used too often
• There are too many of them
• They are used in too many places
Security and Authentication
CS-4513 D-term 2008 11
Some ways around the problem
• Better passwords– longer– larger character set– more random in nature/encrypted
• Used less often– changed frequently, one system per password– challenge/response – use only once
Security and Authentication
CS-4513 D-term 2008 12
The Challenge/Response Protocol
Art MaryHello, I’m Art
Decrypt This {R}P
R
Hello Art! How can I help you?
Security and Authentication
CS-4513 D-term 2008 13
The Challenge/Response Protocol
Art MaryHello, I’m Art
Decrypt This {R}P
R
Hello Art! How can I help you?
P is a shared secret
R is a r
andom number
Security and Authentication
CS-4513 D-term 2008 14
Threat: Steal passwords from the system
• Don’t keep them in an obvious place
• Encrypt them so that version seen by system is not same as what user enters
• … or version on the wire
• …… or version used last time
Security and Authentication
CS-4513 D-term 2008 15
Too many passwords to remember?
• Third-party authentication– Get someone to vouch for you
• The basics: “This guy says you know him..”“Yes, I trust him, so you should too..”
• Kerberos – Certificate-based authentication within a trust community
Security and Authentication
CS-4513 D-term 2008 16
What is in a certificate?
• Who issued it
• When was it issued
• For what purpose was it issued
• For what time frame is it valid
• (possibly other application-specific data)
• A “signature” that proves it has not been forged
Security and Authentication
CS-4513 D-term 2008 17
Systems and Networks Are Not Different
• Same basic rules about code behavior apply
• Same authentication rules apply
• The same security principles apply
• Same Coding Rules Apply To: – An application
– Code which manages incoming messages
– Code which imposes access controls on a network
– ...
Security and Authentication
CS-4513 D-term 2008 18
The Principles
• Understand what you are trying to protect
• Understand the threat(s) you are trying to protect against– Also, costs and risks
• Be prepared to establish trust by telling people how you do it
• Assume that the bad guys are at least as clever as you are!
Security and Authentication
CS-4513 D-term 2008 19
Security must occur at four levels to be effective
• Physical– The best security system is no better than the lock on your front
door (or desk, or file cabinet, etc.)!
• Human– Phishing, dumpster diving, social engineering
• Operating System– Protection and authentication subsystems– Prevention of unauthenticated access to data
• Network– Protection and authentication subsystems– Separate from underlying protocols
• Security is as weak as the weakest link in chain
Security and Authentication
CS-4513 D-term 2008 20
How do these attacks work?
• Messages that attack mail readers or browsers
• Denial of service attacks against a web server
• Password crackers
• Viruses, Trojan Horses, other “malware”
Security and Authentication
CS-4513 D-term 2008 21
The concept of a “Vulnerability”
• Buffer overflow
• Protocol/bandwidth interactions– Protocol elements which do no work
• “execute this” messages– The special case of “mobile agents”
• Human user vulnerabilities– eMail worms– Phishing
Security and Authentication
CS-4513 D-term 2008 22
Another Principle
• There is a never-ending war going on between the “black hats” and the rest of us.
• For every asset, there is at least one vulnerability
• For every protective measure we add, “they” will find another vulnerability
Security and Authentication
CS-4513 D-term 2008 23
Yet Another Principle
• There is no such thing as a bullet-proof barrier
• Every level of the system and network deserves an independent threat evaluation and appropriate protection
• Only a multi-layered approach has a chance of success!
Security and Authentication
CS-4513 D-term 2008 24
Actual Losses:
• Approximately 70% are due to human error
• More than half of the remainder are caused by insiders
• “Social Engineering” accounts for more loss than technical attacks.
Security and Authentication
CS-4513 D-term 2008 25
What is “Social Engineering”?
“Hello. This is Dr. Burnett of the cardiology department at the Conquest Hospital in Hastings. Your patient, Sam Simons, has just been admitted here unconscious. He has an unusual ventricular arrhythmia. Can you tell me if there is anything relevant in his record?”
• What rights MAY a user have? – Define the maximum!
• What rights can a user pass on?
• How can a user acquire additional rights?
• Linux/Unix: -rwxr-xr-- /foo -rw--w---- /bar
Security and Authentication
CS-4513 D-term 2008 32
Policy Models (1)
A “Policy Model” is a framework for creating a specific policy for a specific organization
• Linux/Unix– Users, groups, everybody– “owner” (or “…”) controls grant of rights– Rights based on UID, GID – Focus on files– Process has rights of parent
• can change GID or drop rights
Security and Authentication
CS-4513 D-term 2008 33
Policy Models (2)
• Win200X– Users and groups– Groups may be members of groups– Rights are the combined rights of all groups of
which the user is a direct or indirect member– Administrator controls everything
• can grant any right
– The default is strong control over admin functions and little control over files
Security and Authentication
CS-4513 D-term 2008 34
Policy Models (3)
• Typical Business– Managers can (usually) grant rights to their staff
– Information is visible to people above in the organization
– Managers do not have authority to grant access downward for some classes of information
– Overall control is maintained by restricting access to applications rather than to data
– Databases have their own distinct access controls
Security and Authentication
CS-4513 D-term 2008 35
Policy Models (4)
• The Military Mind– Access rights are granted only by a higher
authority– Access is broken into two models
• need-to-know (usually organizational with upward visibility)
• item-by-item (classification may occur in advance of creation or after)
– Creator may be denied access to own work
– Some weird anomalies
Security and Authentication
CS-4513 D-term 2008 36
Policy Models (5)
• The BMA (British Medical Assoc.) model (1995)– Each medical record has an access control list– Access may be granted to a new clinician by the subject
or the primary clinician– Patient must be notified of all ACL changes, and may
revoke access– Deletions are not allowed– All access must be logged and auditable– Information may be aggregated from A into B only if
ACL(A) is a superset of ACL(B)• Reference
Anderson, Ross, “An Update on the BMA Security Policy,” 1996. (.pdf)
• The HIPAA model (1998)– The patient controls the right to access
“personally identifiable health information”– Access is granted to any clinician or facility
staff participating in the care of the patient– Patient must be notified of all breaches– Deletions are not allowed– All access must be logged and auditable– Privileges may be revoked
Security and Authentication
CS-4513 D-term 2008 38
More Principles
• Think about Assets, Threats and Vulnerabilities FIRST
• Find an appropriate (and minimally complex) Policy Model
• Match your OS capabilities to the policy model as best you can
• Broadest security tool available– Source and destination of messages cannot be
trusted without cryptography– Means to constrain potential senders (sources)
and / or receivers (destinations) of messages
• Based on secrets (keys)
Security and Authentication
CS-4513 D-term 2008 41
Principles
• Cryptography is about the exchange of messages
• The key to success is that all parties to an exchange trust that the system will both protect them from threats and accurately convey their message
• TRUST is essential
Security and Authentication
CS-4513 D-term 2008 42
Therefore
• Algorithms must be public and verifiable
• We need to be able to estimate the risk of compromise
• The solution must practical for its users, and impractical for an attacker to break
Security and Authentication
CS-4513 D-term 2008 43
Guidelines
• Cryptography is always based on algorithms which are orders of magnitude easier to compute in the forward (normal) direction than in the reverse (attack) direction.
• The attacker’s problem is never harder than trying all possible keys
• The more material the attacker has the easier his task
Security and Authentication
CS-4513 D-term 2008 44
Example
• What is 314159265358979 314159265358979?
vs.
• What are prime factors of3912571506419387090594828508241?
Security and Authentication
CS-4513 D-term 2008 45
Time marches on…
• We must assume that there will always be improvements in computational power, mathematics and algorithms.– Messages which hang around get less secure
with time!
• Increases in computing power help the good guys and hurt the bad guys for new and short-lived messages
Security and Authentication
CS-4513 D-term 2008 46
Caveat
• We cannot mathematically PROVE that the inverse operations are really as hard as they seem to be…It is all relative…
The Fundamental Tenet of Cryptography:
If lots of smart people have failed to solve a problem, it won’t be solved (soon)
Security and Authentication
CS-4513 D-term 2008 47
Secret key cryptography
f (T,K) g (C,K)Cleartext Cleartext
K K
CyphertextT TC
Security and Authentication
CS-4513 D-term 2008 48
Secret Key Methods
• DES (56 bit key)
• IDEA (128 bit key)• http://www.mediacrypt.com/community/index.asp
• Triple DES (three 56 bit keys)
• AES– From NIST, 2000– choice of key sizes up to 256 bits and more– Commercial implementations available