Bài giảng An ninh mạng - Chương 0: Giới thiệu tổng quan - Trần Trung Dũng

pdf 46 trang hoanguyen 2651
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng An ninh mạng - Chương 0: Giới thiệu tổng quan - Trần Trung Dũng", để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên

Tài liệu đính kèm:

  • pdfbai_giang_an_ninh_mang_ngay_1_gioi_thieu_tong_quan_phan_1_tr.pdf

Nội dung text: Bài giảng An ninh mạng - Chương 0: Giới thiệu tổng quan - Trần Trung Dũng

  1. An ninh mạng TS. Trần Trung Dũng 02-2011
  2. Tại sao cần nghiên cứu an tòan trên mạng?  Có rất nhiều người dùng chia sẻ cùng một mạng  Có cùng lí do với thế giới thực: • Trộm, cắp, nghe nhìn lén,  Vấn đề an ninh càng tốt thì Internet càng trở thành môi trường kinh doanh tốt
  3. Phân loại các bài toán an toàn cơ bản  Xác thực(authentication): tôi đang nói với ai?  Tin cậy (confidentiality): liệu có người thứ 3 nghe thấy?  Không chối bỏ (non-repudiation): Bạn có chắc là bạn không gửi nó, ngay cả khi bạn thật sự không làm?  Tính toàn vẹn (integrity): liệu nó có bị thay đổi trước khi tôi nhận nó không?  Quyền hạn (authorization): bạn có được phép xem, thực thi hàm này không?
  4. Authentication – xác thực Read Kaufman 9.1-2, 10.1-10, 11.1-2, 12.2 • Chưa cần đọc phần public-key slide 4
  5. Bài toán cơ bản ? Làm sao để chứng minh với ai đó rằng bạn chính là người đang giao tiếp với họ? Các hệ thống cho phép truy cập từ xa đều gặp phải bài toán này slide 5
  6. Many Ways to Prove Who You Are What you know (bạn biết gì) • Passwords • Secret key Where you are (địa chỉ của bạn) • IP address What you are (bạn như thế nào) • Biometrics (sinh trắc học) What you have (bạn có gì) • Secure tokens slide 6
  7. Password-Based Authentication User has a secret password. System checks it to authenticate the user. How is the password communicated? • Eavesdropping risk (nguy cơ bị nghe lén) How is the password stored? • In the clear? Encrypted? Hashed? How does the system check the password? How easy is it to guess the password? • Easy-to-remember passwords tend to be easy to guess • Password file is difficult to keep secret slide 7
  8. Other Aspects Usability • Hard-to-remember passwords? • Carry a physical object all the time? Denial of service • Attacker tries to authenticate as you, account locked after three failures • “Suspicious” credit card usage slide 8
  9. Hard-to-Remember Passwords slide 9
  10. Passwords and Computer Security First step after any successful intrusion: install sniffer or keylogger to steal more passwords Second step: run cracking tools on password files • Usually on other hijacked computers In Mitnick‟s “Art of Intrusion”, 8 out of 9 exploits involve password stealing and/or cracking slide 10
  11. UNIX-Style Passwords “cypherpunk” user system password file t4h97t4m43 hash fa6326b1c2 function N53uhjr438 Hgg658n53 slide 11
  12. Password Hashing Instead of user password, store H(password) When user enters password, compute its hash and compare with entry in password file • System does not store actual passwords! • Difficult to go from hash from password! – Do you see why hashing is better than encryption here? Hash function H must have some properties • One-way: given H(password), hard to find password – No known algorithm better than trial and error • Is collision resistance needed? slide 12
  13. Dictionary Attack Password file /etc/passwd is world-readable • Contains user IDs and group IDs which are used by many system programs Dictionary attack is possible because many passwords come from a small dictionary • Attacker can pre-compute H(word) for every word in the dictionary – this only needs to be done once!! – This is an offline attack – Once password file is obtained, cracking is instantaneous • With 1,000,000-word dictionary and assuming 10 guesses per second, brute-force online attack takes 50,000 seconds (14 hours) on average slide 13
  14. Salt shmat:fURxfg,4hLBX:14510:30:Vitaly:/u/shmat:/bin/csh /etc/passwd entry salt (chosen randomly when password is first set) Password hash(salt,pwd) • Users with the same password have different entries in the password file • Offline dictionary attack becomes much harder slide 14
  15. Advantages of Salting Without salt, attacker can pre-compute hashes of all dictionary words once for all password entries • Same hash function on all UNIX machines; identical passwords hash to identical values • One table of hash values works for all password files With salt, attacker must compute hashes of all dictionary words once for each combination of salt value and password • With 12-bit random salt, same password can hash to 4096 different hash values slide 15
  16. Password Security Risks Keystroke loggers • Hardware – KeyGhost, KeyShark, others • Software (spyware) Shoulder surfing Same password at multiple sites Social engineering slide 16
  17. Default Passwords Default password • Eximbank “abc123” Examples from Mitnick‟s “Art of Intrusion” • U.S. District Courthouse server: “public” / “public” • NY Times employee database: pwd = last 4 SSN digits • “Dixie bank”: break into router (pwd=“administrator”), then into IBM AS/400 server (pwd=“administrator”), install keylogger to snarf other passwords – “99% of people there used „password123‟ as their password” slide 17
  18. How People Use Passwords Write them down Use a single password at multiple sites • Do you use the same password for Amazon and your bank account? UT Direct? Do you remember them all? Make passwords easy to remember • “password”, “Kevin123”, “popcorn” Some services use “secret questions” to reset passwords • “What is your favorite pet‟s name?” • Paris Hilton‟s T-Mobile cellphone hack slide 18
  19. Social Engineering Univ. of Sydney study (1996) • 336 CS students emailed asking for their passwords – Pretext: “validate” password database after suspected break-in • 138 returned their passwords; 30 returned invalid passwords; 200 reset passwords (not disjoint) Treasury Dept. report (2005) • Auditors pose as IT personnel attempting to correct a “network problem” • 35 of 100 IRS managers and employees provide their usernames and change passwords to a known value slide 19
  20. Strengthening Passwords Add biometrics • For example, keystroke dynamics or voiceprint • Revocation is often a problem with biometrics Graphical passwords • Goal: increase the size of memorable password space Rely on the difficulty of computer vision • Face recognition is easy for humans, hard for machines • Present user with a sequence of faces, he must pick the right face several times in a row to log in slide 20
  21. Graphical Passwords Images are easy for humans to remember • Especially if you invent a memorable story to go along with the images Dictionary attacks on graphical passwords are believed to be difficult • Images are very “random” (is this true?) Still not a perfect solution • Need infrastructure for displaying and storing images • Shoulder surfing slide 21
  22. Passfaces Meets the Challenge Secure and Usable
  23. The Brain Deals with Faces Differently than Any Other Image Face recognition is a dedicated process which is different from general object recognition. Source: Face Recognition: A Literature Survey. National Institute of Standards and Technology Passfaces Corporation ■ 175 Admiral Cochrane Drive ■ Annapolis, Maryland 21401 ■ 1.800.682.0604
  24. Recall vs. Recognize You must RECALL a password You simply RECOGNIZE a face Remember High School . What kind of test did your prefer? Fill in the Blank Multiple Choice 1 2 3 g f w y Passfaces Corporation ■ 175 Admiral Cochrane Drive ■ Annapolis, Maryland 21401 ■ 1.800.682.0604
  25. Our approach Familiarize the user with a randomly-selected set of faces and check if they can recognize them when they see them again It’s as easy as recognizing an old friend Passfaces Corporation ■ 175 Admiral Cochrane Drive ■ Annapolis, Maryland 21401 ■ 1.800.682.0604
  26. How Passfaces Works Library of Faces User Interface Users Are Assigned a Set of 5* Passfaces * Typical implementation – 3 to 7 possible as standard Passfaces Corporation ■ 175 Admiral Cochrane Drive ■ Annapolis, Maryland 21401 ■ 1.800.682.0604
  27. How Passfaces Works  5 Passfaces are Associated with 40 associated decoys  Passfaces are presented in five 3 by 3 matrices each having 1 Passface and 8 decoys Passfaces Corporation ■ 175 Admiral Cochrane Drive ■ Annapolis, Maryland 21401 ■ 1.800.682.0604
  28. Empirical Results Experimental study of 154 computer science students at Johns Hopkins and Carnegie Mellon Conclusions: • “ faces chosen by users are highly affected by the race of the user the gender and attractiveness of the faces bias password choice In the case of male users, we found this bias so severe that we do not believe it possible to make this scheme secure against an online attack ” slide 28
  29. User Quotes “I chose the images of the ladies which appealed the most” “I simply picked the best lookin girl on each page” “In order to remember all the pictures for my login (after forgetting my ‘password’ 4 times in a row) I needed to pick pictures I could EASILY remember So I chose beautiful women. The other option I would have chosen was handsome men, but the women are much more pleasing to look at” slide 29
  30. Shoulder Surfing Graphical password schemes are perceived to be more vulnerable to “shoulder surfing” Experimental study with graduate students at the University of Maryland Baltimore County • 4 types of passwords: Passfaces with mouse, Passfaces with keyboard, dictionary text password, non-dictionary text password (random words and numbers) Result: non-dictionary text password most vulnerable to shoulder surfing • Why do you think this is the case? slide 30
  31. Biometric Authentication Nothing to remember Passive • Nothing to type, no devices to carry around Can‟t share (usually) Can be fairly unique • if measurements are sufficiently accurate slide 31
  32. Biometric Error Rates (Benign) “Fraud rate” vs. “insult rate” • Fraud = system accepts a forgery (false accept) • Insult = system rejects valid user (false reject) Increasing acceptance threshold increases fraud rate, decreases insult rate • Pick a threshold so that fraud rate = insult rate For biometrics, U.K. banks set target fraud rate of 1%, insult rate of 0.01% [Ross Anderson] • Common signature recognition systems achieve equal error rates around 1% - not good enough! slide 32
  33. Risks of Biometrics Criminal gives an inexperienced policeman fingerprints in the wrong order Can be attacked using recordings Birthday paradox • With false accept rate of 1 in a million, probability of false match is above 50% with only 1609 samples slide 33
  34. Cloning a Finger [Matsumoto] slide 34
  35. Xác thực trên mạng Mục tiêu: Nam muốn Lan chứng minh chính mình là người đang nói •Protocol ap1.0: Lan nói “Tôi là Lan” •“Tôi là Lan” Có tin cậy được không??
  36. Xác thực (Authentication) Mục tiêu: Nam muốn Lan chứng minh chính mình là người đang nói •Protocol ap1.0: Lan nói “Tôi là Lan” Trong mạng Nam không “thấy” Lan nên Hiền có thể tự xưng •“Tôi là Lan” mình là Lan??
  37. Xác thực: cách khác Protocol ap2.0: Lan nói “Tôi là Lan” trong gói tin chứa địa chỉ IP của máy cô ấy Lan‟s “Tôi là Lan” IP address Có tin cậy được không??
  38. Xác thực: cách khác •Protocol ap2.0: Lan nói “Tôi là Lan” trong gói tin chứa địa chỉ IP của máy cô ấy Hiền có thể tạo gói tin với địa chỉ IP của Lan?? Lan‟s “Tôi là Lan” IP address
  39. Xác thực: cách khác Protocol ap3.0: Lan nói “Tôi là Lan” và gửi 1 mật mã bí mật để chứng minh. Lan‟s Lan‟s Tôi là Lan” IP addr password Đáng tin cậy?? Lan‟s OK IP addr
  40. Xác thực: cách khác Protocol ap3.0: Lan nói “Tôi là Lan” và gửi 1 mật mã bí mật để chứng minh. Lan‟s Lan‟s “Tôi Lan” IP addr password Tấn công playback: Hiền lưu gói tin của Lan và Lan‟s OK sau đó gửi lại nó cho IP addr Nam Lan‟s Lan‟s “Tôi là Lan” IP addr password
  41. Xác thực: cách khác nữa Protocol ap3.1: Lan nói “Tôi là Lan” và gửi mật mã đã được mã hóa để chứng minh. encrypted Lan‟s “Tôi là Lan” IP addr password Lan‟s OK Đã an toàn chưa?? IP addr
  42. Xác thực: cách khác nữa Protocol ap3.1: Lan nói “Tôi là Lan” và gửi mật mã đã được mã hóa để chứng minh. Lan‟s encrypted “Tôi là Lan” Lưu và sau đó IP addr password gửi lại gói tin vẫn hoạt động tốt Lan‟s OK IP addr encrypted Lan‟s “Tôi là Lan” IP addr password
  43. Xác thực: cách khác nữa Mục tiêu: tránh việc lưu và gửi lại Mật số: số (R) chỉ sử dụng một lần ap4.0: để xác thực Lan “live”, Nam gửi Lan mật số, R. Lan phải trả lời bằng con số này được mã hóa bằng khóa chung “Tôi là Lan” R K (R) Lan đang nói A-B chuyện, và chỉ có Lan biết khóa để mã hóa mật số, Có vấn đề gì không? vậy đó phải là Lan!
  44. Xác thực: ap 5.0 ap4.0 cần phải chia sẻ khóa dùng chung Chúng ta có thể sử dụng kĩ thuật public key? ap5.0: dùng mật số, public key “Tôi là Lan” Nam tính R + - - K (K (R)) = R K (R) A A A Và biết chỉ có Lan biết private key, nên đã mã hóa R sao cho “gửi Nam public key của Lan” + - + K (K (R)) = R K A A A
  45. Ap 5.0: lỗ hỏng trong thiết kế Man-in-the-middle: Hiền đóng vai là Lan (với Nam) và vai Nam (với Lan) Tôi là Lan Tôi là Lan R K- (R) H R Gửi Nam public key K- (R) + L K Gửi Nam public key H + KL + Hiền nhận K H (m) - m = K (K+ (m)) + H H K L (m) m = K - (K+ (m)) Gửi m tới Lan mã L L hóa bằng public key của Lan
  46. Ap 5.0: lỗ hỏng trong thiết kế Man-in-the-middle : Hiền đóng vai là Lan (với Nam) và vai Nam (với Lan) •Khó để nhận ra: • Nam nhận được tất cả thông tin Lan gửi, và ngược lại. • Vấn đề là Hiền nhận được tất cả các gói tin! •Giải bài toán: public key