Upload
kateb
View
49
Download
0
Embed Size (px)
DESCRIPTION
ICT+ Introduction to Networks ดร. สุรศักดิ์ มังสิงห์ E-mail:[email protected] [email protected] URL:http://www.spu.ac.th/~surasak.mu. ICT + Agenda. การรักษาความปลอดภัยบนเครือข่าย. Types of Security. - PowerPoint PPT Presentation
Citation preview
1
ICT+ICT+ Introduction to Introduction to
NetworksNetworks
ดร . สุ�รศั�กด มั�งสุงห์� E-mail:[email protected] [email protected]
URL: http://www.spu.ac.th/~surasak.mu
ICTICT++ Agenda Agenda
3
การร�กษาความัปลอดภั�ยบนเคร�อข่�าย
4
Types of SecurityTypes of Security
Information Security - ความปลอดภัยของข�อม�ล Computer Security - ความปลอดภัยของ
คอมพิ�วเตอร์� Network Security - ความปลอดภัยของเคร์�อข�าย
5
Need for SecurityNeed for Security
Some people who cause security problems and why.
6
Security ThreatsSecurity Threats -- ภั�ยค�กคามัความัปลอดภั�ยภั�ยค�กคามัความัปลอดภั�ย Passive attacks (eavesdropping)
Release of message contents - ลกลอบนำ�าข�อม�ลออกไป Traffic analysis – แอบว�เคร์าะห์�สภัาวะการ์จร์าจร์ และสงเกต#กร์ะบวนำการ์
ร์บส�งข�อม�ล Difficult to detect because there is no data alteration Emphasis on prevention through encryption
Active attacks - เก$%ยวข�องกบการ์แก�ไขเปล$%ยนำแปลงสายข�อม�ลสายข�อม�ล Masquerade – ปลอมเป&นำผู้��ใช้�ที่$%ได�ร์บอนำ#ญาต Replay – ดกจบข�อม�ลโดยไม�ให์�ร์� �ตว แล�วนำ�ามาส�งให์ม�โดยม$วตถุ#ปร์ะสงค�
ร์�าย Modification of messages - เปล$%ยนำแปลงแก�ไขบางส�วนำของข�อความ
โดยม$วตถุ#ปร์ะสงค�ร์�าย Denial of Service – ป.องกนำการ์ใช้�งานำตามปกต�ห์ร์�อการ์ที่�าให์� server
ที่�างานำมากผู้�ดปกต�จนำไม�สามาร์ถุให์�บร์�การ์ได�ตามปกต�
7
Security RequirementsSecurity Requirements
Confidentiality – ความัล�บข่องข่�อมั ล เฉพาะผู้ �ที่&'ได�ร�บอน�ญาตเที่�าน�+นจึ-งจึะสุามัารถเข่�าถ-งข่�อมั ลได�เที่�าน�+น
Integrity – ความัมั�'นคงข่องข่�อมั ล เฉพาะผู้ �ที่&'ได�ร�บอน�ญาตเที่�าน�+นจึ-งจึะสุามัารถเปล&'ยนแปลงแก�ไข่ข่�อมั ลได�
Availability - ความัพร�อมัให์�บรการข่�อมั ลเพาะก�บผู้ �ที่&'ได�ร�บอน�ญาต
Authenticity - ความัสุามัารถในการพสุ จึน�ที่ราบผู้ �ใช้�
8
CryptographyCryptography
The encryption model (for a symmetric-key cipher).
9
Substitution CiphersSubstitution Ciphers
เป&นำว�ธี$การ์แที่นำตวอกษร์ห์นำ1%งตวห์ร์�อห์นำ1%งกล#�มด�วยตวอกษร์อ$กตวห์นำ1%งเพิ�%อป2ดบงค�าที่$%แที่�จร์�ง ว�ธี$การ์แบบนำ$3ที่$%เก�าแก�ที่$%ส#ดเร์$ยกว�า Caesar cipher
Plaintext: a b c d e f g h i j k l m n o p q r s t u v w x y z
Ciphertext: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
ตวอย�างเช้�นำ “attack” จะถุ�กแปลงเป&นำ “QZZQEA”
10
Transposition CiphersTransposition Ciphers
A transposition cipher.
เป&นำแบบที่$%ตวอกษร์ยงร์กษาล�าดบเด�มของตวอกษร์ในำข�อความต�นำฉบบเอาไว�แต�จดการ์สบเปล$%ยนำตวอกษร์เห์ล�านำ3นำเป&นำตวอ�%นำที่3งห์มด
11
One-Time PadsOne-Time Pads
เป&นำการ์สร์�าง ciphertext ที่$%ไม�สามาร์ถุถุอดร์ห์ส (โดยผู้��ที่$%ไม�ได�ร์บอนำ#ญาต ) ได� ข 3นำตอนำแร์กให์�เล�อกสายอกขร์ะ (bit string)
แบบส#�มเล�อก จากนำ3นำเปล$%ยนำ plaintext ให์�เป&นำสายอกขร์ะแล�วที่�าการ์ exclusive OR สายอกขร์ะที่3งสองเข�าด�วยกนำที่$ละบ�ต
12
Quantum CryptographyQuantum Cryptographyเป&นำการ์เข�าร์ห์สที่$%ใช้�กบการ์ส�%อสาร์สญญาณผู้�านำใยแก�วนำ�าแสงโดยใช้�ห์ลกการ์ของ quantum mechanics ซึ่1%งจะม$การ์ใช้� polarizing filter เพิ�%อปร์บความเข�มของแสงที่$%ลอดออกมา 2 ช้#ดส�าห์ร์บที่3งฝ่8ายผู้��ร์ บและฝ่8ายผู้��ส�งค�อ rectilinear basis และ diagonal basis
13
Symmetric EncryptionSymmetric Encryption
The only form of encryption prior to late 1970s Five components to the algorithm
Plaintext- เอกสาร์ห์ร์�อข�อม�ลต�นำฉบบ Encryption algorithm - ข3นำตอนำว�ธี$การ์เข�าร์ห์สข�อม�ล Secret key - ก#ญแจที่$%ใช้�ในำการ์เข�าร์ห์ส Ciphertext - ข�อความให์ม�ที่$%ผู้�านำการ์เข�าร์ห์สแล�ว Decryption algorithm - ข3นำตอนำว�ธี$ในำการ์ถุอดร์ห์สโดยใช้�
ก#ญแจตวเด�ม Two requirements
Strong encryption algorithm Secure exchange of keys
14
Conventional Encryption Conventional Encryption OperationOperation
15
Symmetric Encryption AttacksSymmetric Encryption Attacks
Cryptanalysis• เป&นำความพิยายามที่$%จะว�เคร์าะห์�ข3นำตอนำว�ธี$การ์เข�าร์ห์ส ห์าก
ม$ตวอย�างของข�อความก�อนำเข�าร์ห์สและห์ลงเข�าร์ห์สด�วยแล�วก9ย�%งม$โอกาสที่$%จะนำ�าไปส��ก#ญแจที่$%ใช้�ในำการ์เข�าร์ห์สได�
• ถุ�าปร์ะสบความส�าเร์9จ ข�อความที่$%ส�งไปแล�วและที่$%จะส�งให์ม�ในำอนำาคตซึ่1%งใช้�ก#ญแจดงกล�าวเข�าร์ห์สจะถุ�กถุอดร์ห์สได�
Brute Force• เป&นำการ์พิยายามใช้�ก#ญแจที่$%ค�ดว�าเป&นำไปได�ที่#กตวในำการ์
ถุอดร์ห์ส จนำกว�าจะได�ข�อความที่$%อ�านำได�อย�างม$เห์ต#ผู้ล• โดยฉล$%ยแล�วต�องใช้�ก#ญแจในำความพิยายามถุ1งคร์1%งของ
ก#ญแจที่$%เป&นำไปได�ที่3งห์มดจ1งจะปร์ะสบความส�าเร์9จ
16
Average time Required for Exhaustive Key Average time Required for Exhaustive Key SearchSearch
17
Symmetric Key Encryption Symmetric Key Encryption AlgorithmAlgorithm
Two most important symmetric algorithmsDES – Data Encryption StandardAES – Advanced Encryption Standard
Most commonly used symmetric encryption algorithm are block ciphers.
A block cipher processes the plaintext input in fixed-size blocks and produce a block of ciphertext of equal size for each plaintext block.
18
Data Encryption Standard (DES)Data Encryption Standard (DES)
เป&นำ encryption algorithm ที่$%ม$ความโดดเด�นำห์ลงจากที่$%เร์�%มใช้�งานำในำป: 1977
ก#ญแจขนำาด 56-bit ที่�าให์� algorithm นำ$3ง�ายเก�นำไปที่$%จะถุ�ก crack ได�ภัายในำไม�เก�นำป: 1998
ได�ม$การ์ย�ดอาย#การ์ใช้� DES โดยใช้�เที่คนำ�ค triple DES (3DES) Repeats basic DES algorithm three times, using either two or three
unique keys Key size of 112 or 168 bits Drawbacks: Algorithm is sluggish in software, 64-bit block size is
inefficient
19
Data Encryption StandardData Encryption Standard
The data encryption standard. (a) General outline.(b) Detail of one iteration. The circled + means exclusive OR.
20
Advanced Encryption StandardAdvanced Encryption Standard
3DES is not a reasonable candidate for long-term use
National Institute of Standard and Technology (NIST) proposes AES with equal or better strength than 3DES
AES be symmetric cipher with a block length of 128 bits and support for key lengths of 128, 192, and 256 bits
21
Advanced Encryption StandardAdvanced Encryption Standard
22
CryptanalysisCryptanalysis
23
Encryption across a Packet –Switching Encryption across a Packet –Switching NetworkNetwork
24
Location of Encryption DevicesLocation of Encryption Devices
Link encryption Each vulnerable communications link is equipped on both ends
with an encryption device. All traffic over all communications links is secured. Vulnerable at each switch
End-to-end encryption Encryption process carried out at two end systems Encrypted data transmitted unaltered across network;
destination shares key with source to decrypt data Packet headers cannot be secured
25
Symmetric Encryption Key Symmetric Encryption Key DistributionDistribution
Both parties must have the secret key Key is changed frequently Requires either manual delivery of keys, or a third-
party encrypted channel Most effective method is a Key Distribution Center
(e.g. Kerberos)
26
End-to-End EncryptionEnd-to-End Encryption
Two types of keys Session keys – data are encrypted with one-time session key
Permanent keys – used between entities for the purpose of distributing session keys
Required components Key distribution center – determines which systems are allowed to
communicate with each other and provides one-time session key for that connection
Security service module (SSM) – performs end-to-end encryption and obtain session keys on behalf of users.
27
Automated Key DistributionAutomated Key Distribution
28
Traffic PaddingTraffic Padding
เพิ�%อป.องกนำการ์โจมต$แบบ Cryptanalysis A function that produces ciphertext output continuously, even in the
absence of plaintext Continuous random data stream is generated. When plaintext is
available, it is encrypted and transmitted. When input plaintext is not present, the random data are encrypted and transmitted
Makes it impossible for an attacker to distinguish between true data flow and noise and therefore impossible to deduce the amount of traffic
29
Message Authentication Message Authentication
Must verify that contents have not been altered and that source is authentic
ApproachesAuthentication using symmetric encryptionAuthentication without message encryptionMessage authentication codeOne-way hash function
30
Message authentication code Message authentication code (MAC)(MAC)
31
Message Authentication using One-Way Hash Message Authentication using One-Way Hash FunctionFunction
Only sender and receiver share the encryption key.
32
Message Authentication using One-Way Hash Function Message Authentication using One-Way Hash Function (cont.)(cont.)
33
Message Authentication using One-Way Hash Function Message Authentication using One-Way Hash Function (cont.)(cont.)
Technique that uses a hash function but no encryption.
34
Hash Function (H) RequirementsHash Function (H) Requirements
Can be applied to a block of data of any size. Produces a fixed-length output. H(x) is relatively easy to compute for any given x For any given code h, it is computationally infeasible to
find x such that H(x) = h. For any given block x, it is computationally infeasible to
find y ≠ x with H(y) = H(x). It is computationally infeasible to find any pair (x, y) such
that H(x) = H(y).
35
Public-Key EncryptionPublic-Key Encryption
ใช้�ว�ธี$การ์เข�าร์ห์สที่$%ใช้�ค$ย�ในำการ์เข�าร์ห์สและถุอดร์ห์สแตกต�างกนำ และค$ย�ที่$%ใช้�ถุอดร์ห์สนำ3นำไม�สามาร์ถุสร์�างข13นำมาจากค$ย�ที่$%ใช้�เข�าร์ห์สได�
การ์เข�าร์ห์ส (E) และการ์ถุอดร์ห์ส (D) จะต�องอย��ในำเง�%อนำไข 3 ปร์ะการ์
1. D(E(P))=P
2. เป&นำการ์ยากที่$%จะสร์�าง D ข13นำมาจาก E3. E จะต�องที่นำที่านำต�อว�ธี$การ์ถุอดร์ห์สแบบ chosen plaintext attack
Asymmetric, involving the use of two separate keys ความเข�าใจผู้�ดเก$%ยวกบการ์เข�าร์ห์สด�วย public key
ค�ดว�าม$ความปลอดภัยส�งจากการ์โจมต$แบบ cryptanalysis
ค�ดว�าเป&นำเที่คนำ�คที่$%ใช้�ได�เอนำกปร์ะสงค�ที่$%ที่�าให์� conventional encryption ล�าสมย ค�ดว�าม$ความย#�งยากนำ�อยกว�า conventional encryption
36
Public-Key Encryption Public-Key Encryption ComponentsComponents
Plaintext Encryption algorithm Public and private key Ciphertext Decryption algorithm
37
Public-Key Encryption OperationPublic-Key Encryption Operation
Encryption
38
Public-Key Signature OperationPublic-Key Signature Operation
Authentication
39
Characteristics of Public-Key
Computationally infeasible to determine the decryption key given knowledge of the cryptographic algorithm and the encryption key
Either of the two related keys can be used for encryption, with the other used for decryption
40
Steps in Public Key EncryptionSteps in Public Key Encryption
Each user generates a pair of keys to be used for the encryption and decryption of messages.
Each user places one of the two keys in a public register or other accessible file. This is the public key. The companion key is kept private.
If Bob wishes to send a private message to Alice, Bob encrypts the message using Alice's public key.
When Alice receives the message, she decrypts it using her private key. No other recipient can decrypt the message because only Alice knows Alice's private key.
41
Digital Signature ProcessDigital Signature Process
42
RSA Encryption AlgorithmRSA Encryption Algorithm
Developed in 1977, by Ron Rivest, Adi Schamir and Len Adleman at MIT, first published in 1978
Widely accepted and implemented approach to public-key encryption – ในช้�วง 25 ป2ที่&'ผู้�านมัาย�งไมั�มั&ผู้ �ใดสุามัารถถอดรห์�สุวธี&การน&+ได�เลย (โดยไมั�ที่ราบค&ย�)
For plaintext block M and ciphertext block C C = Me mod n M = Cd mod n = (Me)d mod n = Med mod n
Both sender and receiver must know values of n and e; only receiver knows value of d
Public key of KU = {e, n} Private key of KR = {d, n}.
43
RSA Encryption AlgorithmRSA Encryption Algorithm (cont.)(cont.)
ว�ธี$การ์แบบ RSA นำ3นำนำ�าพิ�3นำฐานำของที่ฤษฎี$ตวเลขมาใช้� ม$ข 3นำตอนำการ์ที่�างานำดงนำ$31. เล�อกตวเลขที่$%เป&นำ prime number ขนำาดให์ญ� p และ q (โดยที่%วไปขนำาด 1024 bit)
2. ค�านำวณ n=p x q และ z=(p-1) x (q-1)
3. เล�อกตวเลขที่$%เป&นำ prime number เร์$ยกว�า d4. ห์าค�า e ซึ่1%ง e x d =1 mod z
44
RSARSA
An example of the RSA algorithm.
45
RSA Requirements RSA Requirements
It is possible to find values of e, d, n such that Med = M mod n for all M < n.
It is relatively easy to calculate Me and Cd for all values of M < n.
It is infeasible to determine d given e and n.This requirement can be met with large values of e
and n
46
Approaches to Defeating RSAApproaches to Defeating RSA
Brute force approach: try all possible private keys. The larger the number of bits in e and d, the more secure
the algorithm. However, the larger the size of the key, the slower the
system will run. Cryptanalysis: factoring n into its two prime factors
A hard problem, but not as hard as it used to be Currently, a 1024-bit key size is considered strong enough
for virtually all applications
47
Key ManagementKey Management
Symmetric encryption requires both parties to share a secret key
Secure distribution of keys is the most difficult problem for symmetric encryption
Public key encryption solves this problem, but adds the issue of authenticity
Public key certificates address this issue
48
Public Key Certificate ProcessPublic Key Certificate Process
Public-key Certificate consists of a public key plus a User ID of the key owner, with the whole block signed by the third trusted party.
49
Public Key Certificate ProcessPublic Key Certificate Process
1. A public key is generated by the user and submitted to Agency X for certification.
2. X determines by some procedure, such as a face-to-face meeting, that this is authentically the user’s public key.
3. X appends a timestamp to the public key, generates the hash code of the result, and encrypts that result with X’s private key forming the signature.
4. The signature is attached to the public key.
50
Virtual Private Networks (VPNs)Virtual Private Networks (VPNs)
Internet connectivity provides easier access for telecommuters and off-site employees
Use of a public network exposes corporate traffic to eavesdropping and provides an entry point for unauthorized users
A variety of encryption and authentication packages and products are available to secure and authenticate remote access
Need for a standard that allows a variety of platforms to interconnect securely
51
Virtual Private NetworksVirtual Private Networks
(a) A leased-line private network. (b) A virtual private network.
52
Applications of IPSecApplications of IPSec
Secures communications across a LAN, WANs, and/or the Internet
Can encrypt and/or authenticate all traffic at the IP level Examples of use:
Secure branch office connectivity over the Internet Secure remote access over the Internet Establishing extranet and intranet connectivity with partners Enhancing electronic commerce security
53
Benefits of IPSecBenefits of IPSec
When implemented in a firewall or router, provides strong security for all traffic crossing the perimeter
IPSec in a firewall is resistant to bypass Runs below the transport layer (TCP, UDP) and so is
transparent to applications Can be transparent to end users Can provide security for individual users if needed
54
An IP Security ScenarioAn IP Security Scenario
55
IPSec FunctionsIPSec Functions
IPSec provides three main facilitiesauthentication-only function referred to as
Authentication Header (AH)combined authentication/encryption function called
Encapsulating Security Payload (ESP)a key exchange function
For VPNs, both authentication and encryption are generally desired
56
IPsecIPsec
The IPsec authentication header in transport mode for IPv4.
57
IPsec (2)IPsec (2)
(a) ESP in transport mode. (b) ESP in tunnel mode.
58
ESP Transport and TunnelingESP Transport and Tunneling
Transport Mode provides protection primarily
for upper-layer protocols. Typically used for end-to-end
communication between two hosts
encrypts and optionally authenticates the IP payload but not the IP header
useful for relatively small networks; for a full-blown VPN, tunnel mode is far more efficient
Tunnel Mode Provides protection to the
entire packet Original packet is
encapsulated in ESP fields, protecting contents from examination
Used when one or both ends is a security gateway
Multiple hosts on networks behind firewalls may engage in secure communications without implementing IPSec
59
Scope of ESP Scope of ESP Encryption Encryption and and AuthenticationAuthentication
60
IPSec Key ManagementIPSec Key Management
Manual System administrator manually configures each system
with its own keys and with the keys of other communicating systems
Practical for small, relatively static environments Automated
Enables the on-demand creation of keys for SAs and facilitates the use of keys in a large distributed system
Most flexible but requires more effort to configure and requires more software
61
IPSec and VPNsIPSec and VPNs
Organizations need to isolate their networks and at the same time send and receive traffic over the Internet
Authentication and privacy mechanisms of secure IP allow for security strategy
IPSec can be implemented in routers or firewalls owned and operated by the organization, allowing the network manager complete control over security aspects of the VPN
62
FirewallsFirewalls
A firewall consisting of two packet filters and an application gateway.
63
E-Mail Security E-Mail Security - - Pretty Good Pretty Good Privacy(PGP)Privacy(PGP)
PGP in operation for sending a message.
ที่�าการ์เข�าร์ห์สข�อม�ลโดยการ์ใช้� block cipher เร์$ยกว�า IDEA (International Data Encryption Algorithm) ใช้�ค$ย�ขนำาด 128 bits การ์บร์�ห์าร์ค$ย� ใช้�ว�ธี$ RSA และการ์ตร์วจสอบความถุ�กต�องของข�อม�ลเป&นำแบบ MD5
64
Web SecurityWeb Security
Threats - ภัยค#กคาม Secure Naming- การ์ต3งช้�%ออย�างปลอดภัย SSL – The Secure Sockets Layer Mobile Code Security-การ์ใช้�โค�ดที่$%ปลอดภัย
ส�าห์ร์บโมบาย
65
ภัยค#กคามภัยค#กคาม Hackers- ที่$%ม$ความสามาร์ถุส�งกว�าโปร์แกร์มเมอร์�ที่%วไป Cracker – เว5บไซต�ยอดนยมั เช้�นำ Yahoo, CIA, NASA เคยถุ�กโจมต$
มาแล�ว Denial of Service attack ซึ่1%ง Cracker จะโดมต$ด�วยการ์สุ�ง
ข่�าวสุารจึ7านวนมัห์าศัาลมายงเว9บไซึ่ต�นำ3นำ ที่�าให์�ไม�สามาร์ถุบร์�การ์ได�ตามปกต� ป: 1999 Cracker ช้าวสว$เดนำบ#กเข�าเว9บไซึ่ต�ของ Microsoft Hotmail
แล�วสร์�าง mirror site ที่$%อนำ#ญาตให์�ผู้��ใดก9ได�สมาร์ถุพิ�มพิ�ช้�%อผู้��ใช้� hotmail แล�วอ�านข่�อความัใน email ได�
Cracker ช้าวร์สเซึ่$ย อาย# 19 ป:บ#กเข�าเว9บไซึ่ต� e-commerce แห์�งห์นำ1%งและข่โมัยห์มัายเลข่บ�ตรเครดตไปกว�า 30,000 ใบแล�วเร์$ยกร์�องเง�นำจากเจ�าของเว9บไซึ่ต� $100,000 เจ�าของร์�านำปฏิ�เสธี จ1งปร์ะกาศห์มายเลขเคร์ด�ตการ์�ดไปที่%วอ�นำเที่อร์�เนำ9ต ที่�าให์�เจ�าของบตร์ส�ญเส$ยเง�นำไปจ�านำวนำมาก
อ$กกร์ณ$ห์นำ1%ง ห์นำ#�มช้าวแคล�ฟอเนำ$ย อาย# 23 ป: ส�ง email เป&นำการ์แถุลงข�าวกล�าวว�า emulex Corporation ก�าลงจะนำ�ารายงานการข่าดที่�นการ์ปร์ะกอบการ์ในำไตร์มาสที่$%สามเป&นำเง�นำจ�านำวนำมากซึ่1%งม$ผู้ลที่�าให์�ปร์ะธีานำกร์ร์มการ์บร์�ห์าร์ต�องลาออกในำที่นำที่$ ภัายในำไม�ก$%ช้ %วโมงห์ลงจากนำ3นำ ห์#�นำของบร์�ษที่ได�ตกกว�า 60% ที่�าให์�ผู้��ถุ�อห์#�นำต�องขาดที่#นำไปกว�า $2,000 ล�าน แม�กร์ณ$นำ$3ไม�เก$%ยวกบการ์บ#กร์#กเข�าไปในำเว9บไซึ่ต�แต�ก�อให์�เก�ดความเส$ยห์ายแก�บร์�ษที่อย�างให์ญ�ห์ลวง
66
Secure NamingSecure Naming
(a) Normal situation. (b) An attack based on breaking into DNS and modifying Bob's record.
67
Secure DNSSecure DNS
An example RRSet for bob.com. The KEY record is Bob's public key. The SIG record is the top-level com server's signed has of the A and KEY records to verify their authenticity.
68
SSL—The Secure Sockets LayerSSL—The Secure Sockets Layer
Layers (and protocols) for a home user browsing with SSL.
69
Java Applet SecurityJava Applet Security
Applets inserted into a Java Virtual Machine interpreter inside the browser.
70