Op Sy 03 Ch 61a


Published on

Published in: Education, Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Op Sy 03 Ch 61a

  1. 1. Security and Protection <ul><li>The security Environment </li></ul><ul><li>Basics of Cryptography </li></ul><ul><li>User authentication </li></ul><ul><li>Attacks from inside the system </li></ul><ul><li>Attacks from outside the system </li></ul><ul><li>Protection mechanisms </li></ul><ul><li>Trusted systems </li></ul><ul><li>Summary </li></ul>
  2. 2. The Security Environment <ul><li>Security and protection interchangeable terms. </li></ul><ul><li>To avoid confusion we will use the term security to refer overall problem, and the term protection mechanism to refer the specific operating system mechanism used to safeguard information in the computer. </li></ul><ul><li>Fist we will look at security to see what nature of the problem is. </li></ul><ul><li>Later on in the chapter we will look at the protection mechanism and models available to help achieve security. </li></ul>
  3. 3. Threads <ul><li>The sources of threats are listed in figure 9.1. </li></ul><ul><li>Security goals and threats </li></ul>
  4. 4. <ul><li>The fist one, Data confidentiality, is concerned with having secret remaining secret. </li></ul><ul><li>The second goal, data integrity, means that unauthorized users should not be able to modify any data without the owner’s permissions. </li></ul><ul><li>The third goal, system availability, means that nobody can disturb the system to make it unusable. </li></ul><ul><li>Such denial of service attacks are increasingly common (this is because floods of requests). </li></ul><ul><li>Another aspect of security is privacy: protecting individuals from misuse information's about them. </li></ul>
  5. 5. Intruders <ul><li>In security literature, people who are noising around places where they have no business being called intruders (davetsiz misafir) or something adversaries (rakip, düşman). </li></ul><ul><li>Intruders act in two ways. </li></ul><ul><ul><li>Passive intruders; just want to read files they are nor authorized to red. </li></ul></ul><ul><ul><li>Active Intruders are more malicious (kötülük kin); they want to make unauthorized changes to data. </li></ul></ul>
  6. 6. <ul><li>Designing a system secure against intruders;some common categories. </li></ul><ul><ul><li>Causal praying by non-hectically users; Sharing files reading mails. </li></ul></ul><ul><ul><li>Snooping by insiders; break security is a personal challenge. </li></ul></ul><ul><ul><li>Determined attempts to make money; steal from banks where they were working for. </li></ul></ul><ul><ul><li>Commercial or military espionage; stealing programs, trade secrets, paten-table ideas, technology, circuit designs, business plans and so forth ( casusluk). </li></ul></ul><ul><li>A virus may be an Intruders itself. </li></ul><ul><li>Intruders try to break into specific system to steal or destroy particular data, whereas a virus usually cause more general damage. </li></ul>
  7. 7. Accidental data loss <ul><li>In addition to threads caused by malicious intruders, valuable data can be lost by accident. </li></ul><ul><li>Some common causes of accidental data loss are; </li></ul><ul><ul><li>Act of God; fires, floods, earthquakes, wars, riots, or rats gnawing tapes or floppy disks. </li></ul></ul><ul><ul><li>Hardware or software errors; CPU malfunctions, unreadable disks or tapes, telecommunication errors, program bugs. </li></ul></ul><ul><ul><li>Human errors; incorrect data entry, wrong tape or disk mounted, wrong program running, lost disk or tape, or some other mistakes. </li></ul></ul><ul><li>Maintaining adequate backups, preferable far from the original data. </li></ul>
  8. 8. Basics of Cryptography <ul><li>A little knowledge of Cryptography may be useful for understanding parts of this chapter. </li></ul><ul><li>The purpose of Cryptography is to take a message or file, called the plaintext, and encrypt it into cipher text in such a way that only authorized people know to convert it back to the plaintext. </li></ul><ul><li>The encryption and decryption algorithms should be public? </li></ul><ul><li>They can now be kept secret. </li></ul><ul><li>In trade this tactic is called security by obscurity and </li></ul>
  9. 9. <ul><li>Instead, the secrecy is depends on parameters to the algorithms called keys. </li></ul><ul><li>If P is the plaintext, K E is the encrypted key, C is the cipher text, and E encryption algorithm (function) then C=E(P,K E ). </li></ul><ul><li>This the definition of the encryption. </li></ul><ul><li>Similarly, P=D(C,K D ) where D is the decryption algorithm, K D is the decryption key and P is the plaintext. </li></ul><ul><li>This relation is shown in figure 9.2. </li></ul>
  10. 10. <ul><li>Figure 9.2. </li></ul><ul><li>Relationship between the plaintext and the cipher text </li></ul>
  11. 11. Secret-key Cryptography <ul><li>Mono-alphabetic substitution </li></ul><ul><ul><li>each letter replaced by different letter </li></ul></ul><ul><li>Given the encryption key, </li></ul><ul><ul><li>easy to find decryption key </li></ul></ul><ul><li>Secret-key crypto called symmetric-key crypto </li></ul>
  12. 12. <ul><li>To make this clearer, consider an encryption algorithm in which each letter is replaced by a different letter, for example, all As are replaced by Qs, and all Bs are replaced by Ws, all Cs are replaced by Es and so on. Like this: </li></ul><ul><li>Plain text: ABCDEFGHIJKLMNOPQRSTUVWZ </li></ul><ul><li>Chipher-text: QWERTYUIOPASDFGHJKLZXCVBNM </li></ul><ul><li>This general system is called a mono-alphabetic substitution (yerine koyma); for example the plaintext ATTACK would be transformed into the chipper text QZZQEA. </li></ul>
  13. 13. <ul><li>At the first glance this might appear to be safe system because although knows the general system, he does not know which of 26! = (yaklaşık) 4x 10^26 possible key is in use. </li></ul><ul><li>However in English e is the most common letter and followed by t,o,a, n, i, and most common diagrams are th, in er, re, etc. </li></ul><ul><li>Many crypto-graphics system like this one (is easy to find the decryption key and vice versa). </li></ul><ul><li>Such systems are called secret-key cryptography or symmetric-key cryptography. </li></ul><ul><li>For security 1024 bit keys should be used giving a search of space 2^1024 = (y) 2x 10^308 keys. </li></ul>
  14. 14. Public-key Cryptography <ul><li>All users pick a public key/private key pair </li></ul><ul><ul><li>publish the public key </li></ul></ul><ul><ul><li>private key not published </li></ul></ul><ul><li>Public key is the encryption key </li></ul><ul><ul><li>private key is the decryption key </li></ul></ul><ul><li>Secret key mechanisms are efficient but both person be in possession of shared secret keys. </li></ul><ul><li>To get around this problem, public-key cryptography is used. </li></ul>
  15. 15. <ul><li>Public key cryptography, consider the following two questions; </li></ul><ul><li>Question 1: how much is the 314159265358979x314159265358979? </li></ul><ul><li>Question 2: what is the square root of 3912571506419387090594828508241? </li></ul><ul><li>Encryption makes use of the easy operations but decryption without the key requires you perform the hard operation. </li></ul><ul><li>A public key system called RSA exploit the fact that multiplying by numbers is much easier for a computer to do than factoring big numbers, especially when all arithmetic is done using modulo arithmetic and all numbers involved have hundreds of digits.. </li></ul>
  16. 16. <ul><li>This is a thousand times slower than symmetric cryptography. </li></ul><ul><li>Every one pick (publickey, privatekey). </li></ul><ul><li>The public key is the encryption key; and the private key is the decryption key. </li></ul><ul><li>To send a secret message to a user a correspondent encrypts the message with the receiver's public key. </li></ul><ul><li>Since receivers has the private key, only the receivers can decrypts the message. </li></ul>
  17. 17. One-way functions <ul><li>Function such that given formula for f(x) </li></ul><ul><ul><li>easy to evaluate y = f(x) </li></ul></ul><ul><li>But given y </li></ul><ul><ul><li>computationally infeasible to find x </li></ul></ul><ul><li>There are various situations that we will see later in which it is desirable some functions, f, which means has property that given f and its parameters x, computing y=f(x) is easy to do, but given only f(x), finding x is computationally in feasible (initialize y to x). </li></ul><ul><li>Then it could have a loop that iterates a many as times as there are 1 bits in x, with each iteration permuting bits of y in an iteration-dependent way, adding in a different constant on each iteration, and generally mixing the bits up very thoroughly. </li></ul>
  18. 18. Digital signatures <ul><li>Digital signatures make it possible to sign email message and other digital documents in such a way that they cannot be repudiated by the sender later (this requires an hashing operation). </li></ul><ul><li>The most popular hashing function used are MD5 (message Digest) which produces a 16-byte result and SHA (Secure Hash Algorithm) which produces a 20-byte result. </li></ul><ul><li>The next step assumes the use of public key cryptography as described above. </li></ul><ul><li>The document owned then applies his private hey to the hash to get D (hash). </li></ul><ul><li>This value, called the signature block, is applied to the document and sent to the receiver, as shown in figure 9.3. </li></ul>
  19. 19. <ul><li>Figure 9.3. </li></ul><ul><li>Computing a signature block </li></ul><ul><li>What the receiver gets </li></ul>
  20. 20. <ul><li>The receiver computes the has of the document using MD5 or SHA, as agreed upon in advance. </li></ul><ul><li>The receiver than applies the sender2s public key to the signature block to get E(D(hash)). </li></ul><ul><li>E(D(x)) = x </li></ul><ul><li>We originally asked for was that </li></ul><ul><li>D(E(x)) = x </li></ul><ul><li>E is the encryption function and D is the decryption function. </li></ul><ul><li>The order of application must not matter and RSA algorithm has this property. </li></ul><ul><li>One common method for message senders to attach a certificate to a message, which contains users name and public key and digitally signed by a trusted third party. </li></ul>
  21. 21. User Authentication <ul><li>Security issues in operating systems. </li></ul><ul><li>When a user logs into a computer, the OS normally wishes to determine who the user is, a process called user authentication . </li></ul><ul><li>Three general principles of user authentication is given below. </li></ul><ul><ul><li>Something the user knows. </li></ul></ul><ul><ul><li>Something the user has. </li></ul></ul><ul><ul><li>Something the user is. </li></ul></ul><ul><li>These principles leads to different authentication schemas with different complexity and security properties. </li></ul>
  22. 22. <ul><li>People who want to cause trouble on a particular system have to first log into that system, which means getting past whichever authentication procedure is used. </li></ul><ul><li>These peoples are called hackers ( this term used for programmers so a term of honor is reserved for great programmer. </li></ul><ul><li>In true sense we will call people who try to break into computer system where they do not belong crackers (üşütük) . </li></ul>
  23. 23. Authentication using passwords <ul><li>The most widely used form of authentication is to require the user to type a login name and password (asterisk). </li></ul><ul><li>If they marched login is allowed to not. </li></ul><ul><li>Another area in which not quite getting it right has serious security implications is illustrated in figure 0.4, </li></ul><ul><ul><li>A successful login is shown, </li></ul></ul><ul><ul><li>A failed attempt by a cracker to log into system A. </li></ul></ul><ul><ul><li>A failed attempt by a cracker to log into system B. </li></ul></ul><ul><li>In 9.4.b, the system complains as soon as it sees invalid login name. </li></ul><ul><li>This is mistake, as it allows the cracker to keep trying login names until she find a valid one. </li></ul><ul><li>The last option is really trying. </li></ul>
  24. 24. <ul><li>(a) A successful login </li></ul><ul><li>(b) Login rejected after name entered </li></ul><ul><li>(c) Login rejected after name and password typed </li></ul>
  25. 25. How hacker break in <ul><li>Most crackers break in by just calling up the target computer and trying many (login name, password) combinations until they find one that works (names birth date, and ect.). </li></ul><ul><li>War dialer which dial up 10,000 telephone numbers in random order and after 2.6 million calls he located 20,000 computers in an area and 200 of which had no security at all. </li></ul><ul><li>The combination of a war dialer and password guessing can be deadly. </li></ul><ul><li>An alternative to using a war dialer is attack to computers over Internet. Every computer on the Internet has a 32-bit IP address used to identify it. </li></ul>
  26. 26. <ul><li>People usually writes these addressing dotted decimal notation as w.x.y.z where each of the four components of the IP addresses is an integer from 0 to 255 in decimal. </li></ul><ul><li>ping w.x.y.z </li></ul><ul><li>telnet w.x.y.z </li></ul><ul><li>Many telnet diamonds break the underlying TCP connection after some number of unsuccessful login attempts in order to slow down crackers (cracker start many threads). </li></ul><ul><li>To find IP addresses they use, all he has to to this type; </li></ul><ul><li>dnsquery foobar.edu. </li></ul><ul><li>And will get some of their IP addresses. </li></ul><ul><li>One hopes their security is better, but there is little reason to believe that since another nuclear weapon lab, Los, Alamos, lost a hard disk full of classified information in 2000. </li></ul>
  27. 27. <ul><li>LBL > telnet elxsi </li></ul><ul><li>ELXSI AT LBL </li></ul><ul><li>LOGIN: root </li></ul><ul><li>PASSWORD: root </li></ul><ul><li>INCORRECT PASSWORD, TRY AGAIN </li></ul><ul><li>LOGIN: guest </li></ul><ul><li>PASSWORD: guest </li></ul><ul><li>INCORRECT PASSWORD, TRY AGAIN </li></ul><ul><li>LOGIN: uucp </li></ul><ul><li>PASSWORD: uucp </li></ul><ul><li>WELCOME TO THE ELXSI COMPUTER AT LBL </li></ul><ul><li>Once a cracker has broken into a system and become super user, it may be possible to install a packet signifier, software that exams all incoming and outgoing network packets looking certain patterns. </li></ul><ul><li>Increasingly many breaks ins are being done by technically naive who are just running scripts they found on the Internet. These scripts either use brute forces attacks of the type described above, or try to exploit known bugs in specific programs. Real hacker refer to them as script kiddies. </li></ul>
  28. 28. UNIX password security <ul><li>Some older OS keep the password file on the disk in unencrypted from, but protect by the usual system protection mechanisms. </li></ul><ul><li>This is just looking for trouble. </li></ul><ul><li>A better solution, used in UNIX, works like this. </li></ul><ul><li>The login program ask to type his name and password. </li></ul><ul><li>The password is immediately encrypted by using it as a key to encrypt a fixed block of data. </li></ul><ul><li>One way function is used. </li></ul><ul><li>The login program then reads the password file, which is just series of ASCII lines, one per user, until it finds the line containing the user’s login name. </li></ul><ul><li>Read the chapter. </li></ul>
  29. 29. <ul><li>To prevent the possibility of attacks (is to associate an n bit random number, are called salt, with each password. </li></ul><ul><li>The random number is changed whenever the password is changed. </li></ul><ul><li>Figure 9.6, the use of salt to defeat pre-computation of the encrypted passwords. </li></ul><ul><li>The notation e(Dog4238) represents the result of concentrating Bobbie’s password, (Dog, with her randomly assigned salt 4238 and running it through the encryption function e. </li></ul>
  30. 30. Improving password security <ul><li>The program that users call to install or change their password can also give a warning when poor password is chosen. </li></ul><ul><li>Among other it might complain about are. </li></ul><ul><ul><li>Passwords should be a minimum of seven characters. </li></ul></ul><ul><ul><li>Passwords should contain both upper and lower case letters. </li></ul></ul><ul><ul><li>Passwords should contain at least one digit or special character. </li></ul></ul><ul><ul><li>Passwords should not be dictionary words, people’s name etc. </li></ul></ul>
  31. 31. One time passwords <ul><li>The most extreme form of changing the password all the time is one-time password . </li></ul><ul><li>Each login uses the next password in a list. </li></ul><ul><li>If an intruder discovers a password, ,t will not to do him any good, since next time a different password must be used. </li></ul><ul><li>If the secret password is s, the first password is given by running one-way function n times. </li></ul><ul><li>P1 = f(f(f(f(s)))) </li></ul><ul><li>The second password is given by running the one-way function n-1 times; </li></ul><ul><li>P2 = f(f(f(s))) </li></ul>
  32. 32. Challenge response authentication <ul><li>A variation on the password idea is to have each new user provide a long list of questions and answers that are then stored on the server securely (encrypted). </li></ul><ul><li>The questions should be chosen so that the user does not need to write them down. </li></ul><ul><li>Possible questions are; </li></ul><ul><ul><li>Who is Majolein’s sister? </li></ul></ul><ul><ul><li>On what street was your elementary school? </li></ul></ul><ul><ul><li>What did Mrs Worobooff teach? </li></ul></ul><ul><li>At login, the server asks one of them at random and checks the answer. </li></ul><ul><li>Another variation is challenge response. User send 7 and the user types 49 (the function is x^2). </li></ul>
  33. 33. Authentication using a physical object <ul><li>The second method for authenticating a user is to check for some physical object they have rather than something they know (like door keys). </li></ul><ul><li>Chip cards contain an integrated circuit (chip) on them. </li></ul><ul><li>These card can be subdivided into two categories: stored value cards and smart cards. </li></ul><ul><li>Stored value cards contain a small amount of memory (usually less than 1 KB) using EEPROM technology to allow the value to be remembered when the card is removed from the reader and thus the power turned off. </li></ul><ul><li>However, nowadays, much security work is being focused on the smart cards which currently have something like-a 4- MHz 8-bit CPU, 16 KB of ROM , 4 KB of EEPROm, 512 bytes of starching RAM and 9600 –bpsd communication channel to the reader. </li></ul>
  34. 34. <ul><li>Smart cards can be used to hold money, as do stored value cards, but with much better security and universality. </li></ul><ul><li>Various authentication schemas can be used with a smart card. A simple challenge response works like this. </li></ul><ul><li>Figure 9.7 use of a smart card authentication </li></ul><ul><li>Magnetic cards </li></ul><ul><ul><li>magnetic stripe cards </li></ul></ul><ul><ul><li>chip cards: stored value cards, smart cards. </li></ul></ul>
  35. 35. Authentication using biometrics <ul><li>The third authentication method measures phys,cal characteristics of the user that are hard to forge (taklit). </li></ul><ul><li>These are called biometrics. </li></ul><ul><li>For example, a fingerprint or a voiceprint reader in the terminal could verify the user2s identity. </li></ul><ul><li>A typical biometrics system has two parts; </li></ul><ul><ul><li>Enrolment (characteristics are measured and stored in a record;significant features are extracted) and, </li></ul></ul><ul><ul><li>Identification (the user show up and provides a login name. Then the system makes the measurements again). </li></ul></ul>
  36. 36. <ul><li>Finger length measurements is surprisingly practical as illustrated in figure 9.8 but not perfect. The system can be attacked with hand molds made of plaster of Pairs or some other materials. </li></ul><ul><li>A device for measuring finger length. </li></ul>
  37. 37. Countermeasures <ul><li>Intruder may broke into a system and does major damages. </li></ul><ul><li>Extra measure can be taken. </li></ul><ul><li>Restricting login times to 8 A.M. To 5 P. M. </li></ul><ul><li>Dial-up lines may be made up more secure. </li></ul><ul><li>In any event with or without call back, the system should take at least 5 seconds to check any password typed in on a dial-up line, and should increase this time after several consecutive unsuccessful login attempts. </li></ul><ul><li>All logins should be recorded and reported. </li></ul><ul><li>The next step is lying baited traps to catch intruders (A simple schema is to have one special login name with an easy password and then the security manager can see who is the intruder). </li></ul><ul><li>Other traps can be easy-to-find bugs in the OS and similar things, designed for the purpose of catching intruders in the act. </li></ul>
  38. 38. <ul><li>Limiting times when someone can log in </li></ul><ul><li>Automatic callback at number pre-specified </li></ul><ul><li>Limited number of login tries </li></ul><ul><li>A database of all logins </li></ul><ul><li>Simple login name/password as a trap </li></ul><ul><ul><li>security personnel notified when attacker bites </li></ul></ul>
  39. 39. Operating System Security Attacks from Inside the System <ul><li>Free program made available to unsuspecting user </li></ul><ul><ul><li>Actually contains code to do harm </li></ul></ul><ul><li>Place altered version of utility program on victim's computer </li></ul><ul><ul><li>trick user into running that program </li></ul></ul>
  40. 40. Trojan horses <ul><li>Free program made available to unsuspecting user </li></ul><ul><ul><li>Actually contains code to do harm </li></ul></ul><ul><li>Place altered version of utility program on victim's computer </li></ul><ul><ul><li>trick user into running that program </li></ul></ul><ul><li>One insiders attack is the Trojan horse, ,in which a seemingly innocent program contains code to perform an unexpected and undesirable function. </li></ul><ul><li>This function might be modifying, deleting or encrypting the user’s files, copying them to a place where the cracker can retrieve them later, or even sending them to a cracker or a temporary safe hiding place via email or FTP. </li></ul>
  41. 41. Login spoofing <ul><li>(a) Correct login screen </li></ul><ul><li>(b) Phony login screen </li></ul><ul><li>Somewhat related to Trojan horse is login proofing . </li></ul><ul><li>Normally login screen displayed. </li></ul><ul><li>A cracker or cheater writes a program to display the screen of figure (b) user enters login name and then (asks password) password. </li></ul><ul><li>The login name and password is collected. </li></ul>
  42. 42. Logic bombs <ul><li>Company programmer writes program </li></ul><ul><ul><li>potential to do harm </li></ul></ul><ul><ul><li>OK as long as he/she enters password daily </li></ul></ul><ul><ul><li>ff programmer fired, no password and bomb explodes. </li></ul></ul><ul><li>Another insider attack. </li></ul><ul><li>High employee mobility is the logic bomb. </li></ul><ul><li>The programmer secretly insert into a production OS </li></ul><ul><li>As long as the programmer feeds its daily password, it does nothing. </li></ul><ul><li>A person is fired and removed prom premises without warning. </li></ul><ul><li>The next day the logic bomb does not get fed its daily password, so it goes off. </li></ul>
  43. 43. Trap doors <ul><li>(a) Normal code. </li></ul><ul><li>(b) Code with a trapdoor inserted </li></ul>
  44. 44. Buffer overflows (1) <ul><li>Most system programs are written in the C programming language. </li></ul><ul><li>Unfortunately, no C compiler does array bound checking. </li></ul><ul><ul><li>int i; </li></ul></ul><ul><ul><li>char c[1024]; </li></ul></ul><ul><ul><li>i = 12000; </li></ul></ul><ul><ul><li>C[i] = 0; </li></ul></ul><ul><li>This property of C leads to attack of following kind of. </li></ul><ul><li>This may change memory areas where other programs codes resides. </li></ul><ul><li>Then the running code of other program changed to a random junk and probably the program will crash within seconds. </li></ul><ul><li>If the changed program parts was a correct program instead of a junk program! </li></ul>
  45. 45. Buffer overflows (2) <ul><li>(a) Situation when main program is running </li></ul><ul><li>(b) After program A called </li></ul><ul><li>(c) Buffer overflow shown in gray </li></ul>
  46. 46. Generic security attacks <ul><li>Typical attacks </li></ul><ul><li>Request memory, disk space, tapes and just read; may not be erased and may be full of interesting information. </li></ul><ul><li>Try illegal system calls; many system can easily be confused. </li></ul><ul><li>Start a login and hit DEL, RUBOUT, or BREAK; password checking program will be killed and login is successful. </li></ul><ul><li>Try modifying complex OS structures; Keep user in user space. Changing the system can wreak havoc (hasar) with the security. </li></ul><ul><li>Try to do specified DO NOT s; Manuals says that do not do X, try as many as variations of X as possible. </li></ul><ul><li>Convince a system programmer to add a trap door; by skipping certain vital security checks for any user with your login name. </li></ul><ul><li>Beg administrator's secretary to help a poor user who forgot password; bribe a secretary and access wonderful information. </li></ul>
  47. 47. Famous security flaws <ul><li>The TENEX – password problem. </li></ul><ul><li>One character password checking program. </li></ul><ul><li>Stopping as soon as it saw that the password was wrong. </li></ul><ul><li>When the first character of the password is correct page fault occurred. </li></ul><ul><li>And the intruder is informed.that the password is correct. </li></ul>
  48. 48. Design principles for security <ul><li>System design should be public; other wise intruder will find out sooner or late and system sunk. </li></ul><ul><li>Default should be no access; Errors in legimate access is refused will be reported much faster than unauthorized accesses. </li></ul><ul><li>Check for current authority; check the permission when a file is opened. </li></ul><ul><li>Give each process least privilege possible; Trojan horse will not do much damage. </li></ul><ul><li>Protection mechanism should be </li></ul><ul><ul><li>Simple </li></ul></ul><ul><ul><li>Uniform </li></ul></ul><ul><ul><li>in lowest layers of system </li></ul></ul><ul><li>Scheme should be psychologically acceptable. Much work is not acceptable. </li></ul><ul><li>And … keep it simple </li></ul>
  49. 49. Network Security <ul><li>External threat </li></ul><ul><ul><li>code transmitted to target machine </li></ul></ul><ul><ul><li>code executed there, doing damage </li></ul></ul><ul><li>Goals of virus writer </li></ul><ul><ul><li>quickly spreading virus </li></ul></ul><ul><ul><li>difficult to detect </li></ul></ul><ul><ul><li>hard to get rid of </li></ul></ul><ul><li>Virus = program can reproduce itself </li></ul><ul><ul><li>attach its code to another program </li></ul></ul><ul><ul><li>additionally, do harm </li></ul></ul>
  50. 50. Attacks from outside the System <ul><li>Since a virus is just a program, it can do anything a program can do. </li></ul><ul><li>Black mail; a virus can encrypt all files on victim's hard disk an the intruder try to get money. </li></ul><ul><li>Another thing a virus can do is render the computer unusable as long as the virus is running. </li></ul><ul><li>This called a denial of service attack . </li></ul><ul><li>BIOS in Flash ROM. </li></ul><ul><li>A virus can write random junk in the flash ROM. </li></ul><ul><li>A virus can also be released with a specific target. </li></ul><ul><li>Another example of a target virus is one that could be written by ambitious corporate vice president and release onto the local LAN. </li></ul>
  51. 51. Virus Damage Scenarios <ul><li>Blackmail </li></ul><ul><li>Denial of service as long as virus runs </li></ul><ul><li>Permanently damage hardware </li></ul><ul><li>Target a competitor's computer </li></ul><ul><ul><li>do harm </li></ul></ul><ul><ul><li>espionage </li></ul></ul><ul><li>Intra-corporate dirty tricks </li></ul><ul><ul><li>sabotage another corporate officer's files </li></ul></ul>
  52. 52. <ul><li>Parasitic viruses . </li></ul><ul><li>Cavity viruses . </li></ul><ul><li>Memory resident viruses. </li></ul><ul><li>Boot sector viruses . </li></ul><ul><li>Device driver viruses. </li></ul><ul><li>Macro viruses ; words document creates a macro and the macro contains a macro viruses. </li></ul><ul><li>Source code viruses . </li></ul>
  53. 53. How Viruses Work (1) <ul><li>Virus written in assembly language </li></ul><ul><li>Inserted into another program </li></ul><ul><ul><li>use tool called a “dropper” </li></ul></ul><ul><li>Virus dormant (hareketsiz ve uyur) until program executed </li></ul><ul><ul><li>then infects other programs </li></ul></ul><ul><ul><li>eventually executes its “payload” </li></ul></ul>
  54. 54. How Viruses Work (2) <ul><li>Recursive procedure that finds executable files on a UNIX system </li></ul><ul><li>Virus could </li></ul><ul><li>infect them all </li></ul>
  55. 55. How Viruses Work (3) <ul><li>Parasitic viruses; can attach themselves to the front, the back , or middle of the executable program </li></ul><ul><li>(a) An executable program </li></ul><ul><li>(b) With a virus at the front </li></ul><ul><li>( c) With the virus at the end </li></ul><ul><li>(d) With a virus spread over free space within program </li></ul>
  56. 56. How Viruses Work (4) <ul><li>Boot sector viruses ; </li></ul><ul><li>(a) After virus has captured interrupt, trap vectors </li></ul><ul><li>(b) After OS has retaken printer interrupt vector </li></ul><ul><li>( c) After virus has noticed loss of printer interrupt vector and recaptured it. </li></ul>
  57. 57. How Viruses Spread <ul><li>Virus placed where likely to be copied </li></ul><ul><li>When copied </li></ul><ul><ul><li>infects programs on hard drive, floppy </li></ul></ul><ul><ul><li>may try to spread over LAN </li></ul></ul><ul><li>Attach to innocent looking email </li></ul><ul><ul><li>when it runs, use mailing list to replicate </li></ul></ul>
  58. 58. Antivirus and Anti-Antivirus Techniques <ul><li>(a) A program </li></ul><ul><li>(b) Infected program </li></ul><ul><li>(c) Compressed infected program </li></ul><ul><li>(d) Encrypted virus </li></ul><ul><li>(e) Compressed virus with encrypted compression code </li></ul>
  59. 59. Antivirus and Anti-Antivirus Techniques <ul><li>Examples of a polymorphic virus, All of these examples do the same thing </li></ul><ul><li>Calculation code of X=A+B+C-4). </li></ul><ul><li>Do the same thing but NOPs inserted. </li></ul><ul><li>Virus uses ( c) instead of (a) and still works; A virus that mutates on each copy is called a polymorphic virus. (d) and (e) does the same. (A mutilator engine changes code without changing its function) </li></ul>
  60. 60. Antivirus and Anti-Antivirus Techniques <ul><li>Integrity checkers </li></ul><ul><li>Behavioral checkers </li></ul><ul><li>Virus avoidance </li></ul><ul><ul><li>good OS </li></ul></ul><ul><ul><li>install only shrink-wrapped software </li></ul></ul><ul><ul><li>use antivirus software </li></ul></ul><ul><ul><li>do not click on attachments to email </li></ul></ul><ul><ul><li>frequent backups </li></ul></ul><ul><li>Recovery from virus attack </li></ul><ul><ul><li>halt computer, reboot from safe disk, run antivirus </li></ul></ul>
  61. 61. The Internet worms <ul><li>Consisted of two programs </li></ul><ul><ul><li>bootstrap to upload worm </li></ul></ul><ul><ul><li>the worm itself </li></ul></ul><ul><li>Worm first hid its existence </li></ul><ul><li>Next replicated itself on new machines </li></ul>
  62. 62. Mobile Code (1) Sandboxing <ul><li>(a) Memory divided into 1-MB sandboxes </li></ul><ul><li>(b) One way of checking an instruction for validity. </li></ul><ul><li>When the program jumps to an unauthorized area trap is occurred. </li></ul>
  63. 63. Mobile Code (2) <ul><li>Applets can be interpreted by a Web browser </li></ul>
  64. 64. Mobile Code (3) <ul><li>How code signing works </li></ul>
  65. 65. Java security (1) <ul><li>A type safe language </li></ul><ul><ul><li>compiler rejects attempts to misuse variable </li></ul></ul><ul><li>Checks include … </li></ul><ul><ul><li>Attempts to forge (taklit) pointers </li></ul></ul><ul><ul><li>Violation of access restrictions on private class members </li></ul></ul><ul><ul><li>Misuse of variables by type </li></ul></ul><ul><ul><li>Generation of stack over/underflows </li></ul></ul><ul><ul><li>Illegal conversion of variables to another type </li></ul></ul>
  66. 66. Java security (2) <ul><li>Examples of specified protection with JDK 1.2. </li></ul><ul><li>In the fist line, the user Susan has setup her permission files; the www. taxre .com have read access to 1040.xls. </li></ul><ul><li>In addition to applets from all sources, whether signed or not can read and write files in /usr/tmp. </li></ul><ul><li>Furtherer more Susan also t h rust Microsoft enough to allow applets originating at its site read and writes to update or fix bugs. Trusted companies must signed their certificate ant necessary public key must be on her disk. </li></ul><ul><li>Files are not the only source that can be protected (other sources also) </li></ul>
  67. 67. Protection Mechanisms Protection Domains (1) <ul><li>Examples of three protection domains </li></ul><ul><li>A domain is a set of (object,rights) pairs. Each pair specifies an object and some subset of the operations that can be performed on it. </li></ul><ul><li>A right in this context means permission to perform one of operations </li></ul>
  68. 68. Protection Domains (2) <ul><li>A protection matrix </li></ul><ul><li>In Unix, the domain of a process is defined by its UID and GID (UID,GID) combinations are also possible. </li></ul>
  69. 69. Protection Domains (3) <ul><li>A protection matrix with domains as objects </li></ul><ul><li>Process in domain 1 can switch to domain 2 but once there they cannot go back. </li></ul>
  70. 70. Access control lists (1) <ul><li>Use of access control lists of manage file access </li></ul><ul><li>A list containing all domains that may access the object. This list is called Access Control List or ALC. </li></ul><ul><li>Often in security literature, the users are called subjects or principals, to contrast them with things owned, the objects, such as files. </li></ul>
  71. 71. Access control lists (2) <ul><li>Two access control lists </li></ul><ul><li>A portion of ACL might be as shown in figure 9-26. </li></ul>
  72. 72. Capabilities (1) <ul><li>Each process has a capability list </li></ul>
  73. 73. Capabilities (2) <ul><li>Cryptographically-protected capability </li></ul><ul><li>Server generates and returns a capability to user of the form showed in figure 9-28. </li></ul><ul><li>Generic Rights </li></ul><ul><ul><li>Copy capability; create newt capability to create the same object. </li></ul></ul><ul><ul><li>Copy object; create a duplicate object with a new capability. </li></ul></ul><ul><ul><li>Remove capability; delete an entry from the C-list; object unaffected. </li></ul></ul><ul><ul><li>Destroy object; permanently remove an object and a capability. </li></ul></ul>f(Objects, Rights, Check) Rights Object Server
  74. 74. Trusted Systems Trusted Computing Base <ul><li>A reference monitor </li></ul><ul><li>Is possible to build a secure computer system? </li></ul><ul><li>If so, is it not done? </li></ul>
  75. 75. Formal model of security systems <ul><li>(a) An authorized state </li></ul><ul><li>(b) An unauthorized state </li></ul><ul><li>Robert has found a way to issue command to have matrix changed to fig 9-30 (b) and gained access mailbox7. </li></ul><ul><li>The OS carries out his request because it does not know that the state is unauthorized. </li></ul>
  76. 76. Multilevel security (1) <ul><li>The Bell-La Padula multilevel security model; designed for handling military security but also applicable to other organizations. </li></ul><ul><li>The simple security property ; a process running at a security level k can read only objects at it level or lower. </li></ul><ul><li>The * property ; a process running at security lvel k can write only objects it level or higher. </li></ul>
  77. 77. Multilevel security (2) <ul><li>The Bell-La Padula multilevel security model; </li></ul>
  78. 78. Multilevel security (3) <ul><li>The Biba Model </li></ul><ul><li>Principles to guarantee integrity of data </li></ul><ul><li>Simple integrity principle </li></ul><ul><ul><li>process can write only objects at its security level or lower </li></ul></ul><ul><li>The integrity * property </li></ul><ul><ul><li>process can read only objects at its security level or higher </li></ul></ul>
  79. 79. Orange Book Security (1) <ul><li>Orange Book dividing OS into seven categories based on their security properties. </li></ul><ul><li>Level C is intended for environments with cooperating users. </li></ul><ul><li>C1 requires a mode operating system, The Unix rwx schema meets C1 but does not meet C2. </li></ul><ul><li>C2 adds the requirements that discretionary access control is down to the level of the individual users . </li></ul><ul><li>The B and A levels requires all controlled users and objects to be assigned a security level k-label such as un classified, secret or top secret. </li></ul><ul><li>B2 adds to this requirement that the system has been designed top-down in a modular way. </li></ul><ul><li>B3 contains all of B2’s features plus must be ACLs with use and group, </li></ul><ul><li>A1 requires a formal model of protection system and a prrof that the model is correct. Read from the book. </li></ul>
  80. 80. Orange Book Security (2) <ul><li>Symbol X means new requirements </li></ul><ul><li>Symbol -> requirements from next lower category apply here also. </li></ul>
  81. 81. Orange Book Security (3)
  82. 82. Covert channels (1) <ul><li>Client, server and collaborator processes </li></ul>Encapsulated server can still leak to collaborator via covert channels <ul><li>The collaborator can try to detect the bit stream by carefully monitoring its response time. </li></ul><ul><li>In general, it will get better response when the server is sending a 0 than when the server is sending a 1. </li></ul>
  83. 83. Covert channels (2) <ul><li>A covert channel using file locking </li></ul><ul><li>Locking and unlocking to transmit the secret bit stream 11010100. </li></ul><ul><li>Acquiring and releasing dedicated sources can also be used for signaling. </li></ul>
  84. 84. Covert channels (3) <ul><li>Pictures appear the same </li></ul><ul><li>Picture on right has text of 5 Shakespeare plays </li></ul><ul><ul><li>encrypted, inserted into low order bits of color values </li></ul></ul>Hamlet, Macbeth, Julius Caesar Merchant of Venice, King Lear Zebras
  85. 85. Summary <ul><li>The security Environment; threads Intruders and accidental losses. </li></ul><ul><li>Basics of Cryptography; secret and public keys, digital signatures </li></ul><ul><li>User authentication; using password, physical object, biometrics. </li></ul><ul><li>Attacks from inside the system; Trojan horse, login spoofing, logic bombs, trap doors, buffer overflows, security attacks and flaws </li></ul><ul><li>Attacks from outside the system; viruses and Antivirus, techniques, worms and mobile codes. </li></ul><ul><li>Protection mechanisms;domains, control lists and capabilities. </li></ul><ul><li>Trusted systems; trusted base computing, multi level and orange book security. </li></ul>