1 / 40

네트워크계층 보안 IPSec

네트워크계층 보안 IPSec. 중부대학교 정보보호학과 이병천 교수. CONTENTS …. 1. IPSec 개요 2. IPSec 의 구조 3. 인증헤더 (Authentication Header) 4. 암호화페이로드 (Encapsulating Security Payload) 5. 보안연계 (Security Associations) 6. 키관리 (Key Management). 1. IP Security Overview. 현재 IP 프로토콜의 문제점

Download Presentation

네트워크계층 보안 IPSec

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 네트워크계층 보안 IPSec 중부대학교 정보보호학과 이병천 교수

  2. CONTENTS… 1. IPSec 개요 2. IPSec의 구조 3. 인증헤더(Authentication Header) 4. 암호화페이로드(Encapsulating Security Payload) 5. 보안연계(Security Associations) 6. 키관리(Key Management)

  3. 1. IP Security Overview • 현재 IP 프로토콜의 문제점 • IP는 도청, 패킷 변경, 무인증으로 인한 취약점 노출 • IP Spoofing : IP 데이터그램의 주소 변조 • IP Sniffing : IP 데이터 그램을 도청 • IPsec을 이용하여 암호(encryption)와 인증(authentication) 서비스를 패킷 단위로 제공 • IPSec 이란? • IP 계층에서 Security를 보장하기 위한 메커니즘 • 어플리케이션과 독립적 • IPv6에서는 필수, IPv4에서는 옵션 • IETF에서 1995년 8월 RFC로 채택 • 보안을 위해 AH(Authentication Header), ESP(Encapsulating Security Payload) 기능 이용

  4. 1. IP Security Overview • IPsec의 용어 설명 • SA (Security Association) : 보안 서비스를 위한 공유 정보 • AH(Authentication Header) : 데이터 무결성과 근원인증 제공 • ESP(Encapsulating Security Payload) : 데이터 기밀성 제공 • SAD(Security Association Database) : SA에 관련되는 매개변수들을 정의하고 있는 데이터베이스 • SPD(Security Policy Database) : 모든 inbound, outbound 트래픽에 대한 정책을 저장하는 데이터베이스

  5. Internet Key Management Protocol Internet Key Management Protocol Security Policy DB Security Policy DB • IP Security • Protocol • AH Protocol • ESP Protocol • IP Security • Protocol • AH Protocol • ESP Protocol Security Association Security Association Database Security Association Database AH : Authentication Header ESP : Encapsulating Security Payload 1. IP Security Overview Party B Party A

  6. 1. IP Security Overview • AH(Authentication Header) • IP 데이터그램에 무결성과 인증성을 제공. • 선택적인 되풀이 공격(replay attack) 방지 가능 • AH 서비스는 connectionless(per-packet basis로 제공) • AH의 적용 : 전송 모드와 터널 모드에서 적용가능 • ESP(Encapsulation Security Payload) • IP 데이터그램에 무결성 검증, 근원인증, 암호화를 제공 • 선택적인 되풀이 공격 방지 가능 • IPsec은 AH와 ESP를 함께 사용해야 보다 안전 • ESP의 적용 : 전송 모드와 터널 모드에서 적용가능

  7. Easy to deploy e-commerce protocols Applications E-mail Higher-level net protocols TCP/IP Data link Physical Applications E-mail Higher-level net protocols TCP/IP Data link Physical S/MIME, PGP SSL, TLS, SSH, Kerberos IPSEC H/W link encryption Internet More transparent 1. IP Security Overview

  8. 1. IP Security Overview • IPSec의 응용분야 • Secure branch office connectivity over the Internet • Secure remote access over the Internet • Establishing extranet and intranet connectivity with partners • Enhancing electronic commerce security

  9. 1. IP Security Overview

  10. 2. IP Security Architecture • IPSec Documents: IETF published five security-related Proposed Standards • RFC 1825: An overview of a security architecture • RFC 1826: Description of a packet authentication extension to IP • RFC 1828: A specific authentication mechanism • RFC 1827: Description of a packet encryption extension to IP • RFC 1829: A specific encryption mechanism

  11. 2. IP Security Architecture • IPSec Documents: The documents are divided into 7 groups • Architecture: 일반적 개념, 보안요구사항,정의, 메커니즘 등을 기술 • Encapsulating Security Payload(ESP) :암호화를 위하여 ESP 사용과 관련된 패킷 형식 및 일반 이슈 • Authentication Heather(AH) :인증을 위하여 AH 사용과 관련된 패킷 형식 및 일반 이슈 • Encryption Algorithm : ESP에서 암호알고리즘의 사용방법 • Authentication Algorithm: AH와 ESP에서 인증알고리즘의 사용 • Key Management : 키관리 방법 • Domain of Interpretation (DOI) : 암호/인증 알고리즘 식별자 등 여러 도큐먼트에서 공통적으로 사용되는 값

  12. 2. IP Security Architecture

  13. 2. IP Security Architecture • IPSec Services • Access control • Connectionless integrity • Data Origin authentication • Rejection of replayed packets • Confidentiality

  14. 2. IP Security Architecture • Security Association(SA) : 보호속성들의 집합 • IPSec으로 통신을 하는 송/수신자간에 인증/암호화 알고리즘과 암호키를 공유하는 관계를 지칭함 • 전송자와 수신자간의 트래픽에 보안 서비스를 제공하기 위해 상호 협상에 의해 생성 • 단방향으로 양방향 통신이 필요할 경우 각 방향에 대해 하나씩 두개의 SA가 필요 • 어플리케이션마다 독립적으로 생성 관리됨 • 다음 정보들에 의해 유일하게 결정됨 • SPI (IPSec header 에 있는 것 : 어느 IPSec Packet이 어느 SA에 대응되는지를 나타냄) • IP destination Address (end user system, router, firewall) • Security Protocol Identifier (AH인지 ESP인지를 나타냄)

  15. 2. IP Security Architecture • SA Parameter • Security Association Database(SAD)를 정의하는 parameter들 • Sequence Number Counter • Sequence Counter Overflow • Anti-Replay Window • AH Information • ESP Information • Lifetime of this Security Association • IPSec Protocol Mode • Path MTU

  16. 2. IP Security Architecture • SA Selectors • Security Policy Database(SPD)를 정의하는 Parameter들 • Destination IP address • Source IP address • UserID • Data Sensitivity Level • Transport Layer Protocol • IPSec Protocol(AH or ESP or AH/ESP) • Source and destination port • IPv6 Class • IPv6 Flow label • IPv4 type of service(TOS)

  17. 2. IP Security Architecture • Transport and Tunnel Modes • Transport mode • IP Payload 부분만을 인증/암호화 • TCP, UDP, ICMP등과 같은 transport 계층 segment • 주로 두개의 호스트간의 communication에 쓰임 • 게이트웨이가 호스트로서 동작하는 경우 • Tunnel mode • IP Header까지 포함한 전체 IP Packet을 인증/암호화 • 부가적인 IP 헤더의 구성이 필요 • 통신하는 양쪽 단말중 하나가 게이트웨이일 경우 터널 모드이어야 한다 • 두개의 호스트가 터널모드로 작동할 수도 있다.

  18. 3. Authentication Header • Consists of… • Next Heather(8bits) • Payload Length(8bits) • Reserved(16bits) • Security Parameters Index(32bits) • Sequence Number(32bits) • Authentication Data(variable)

  19. 3. Authentication Header

  20. 3. Authentication Header • IP 패킷의 무결성 및 인증을 제공한다 • SPI : 목적지 IP 주소와 AH 보안 프로토콜을 조합하여 생성, IP 데이터그램에 대응되는 SA를 식별하기 위한 32bit 값 • Sequence Number : 재전송 공격을 방지하기 위한 32 bit 값 • Authentication Data : IP 패킷의 무결성을 조사하기 위한 값(Integrity Check Value:ICV)를 포함하는 필드 • 사용되는 알고리즘 • MD5, SHA-1등과 같은 해쉬 함수 사용가능 • HMAC-MD5-96와 HMAC-SHA-1-96을 반드시 기본 인증 알고리즘으로 제공해야 함

  21. 3. Authentication Header • Anti-Replay Attack • Sequence Number 필드로 authenticated packet의 copy를 이용한 attack을 막는 것. • 새로운 SA가 결정되면 sender가 sequence number counter를 0으로 초기화 • 이 SA로 packet을 보낼 때 마다 counter를 증가시키고 sequence number field에 그 값을 위치시킴(첫 값은 1) • 만약 232-1에 도달하면 새로운 key로 새로운 SA를 협상

  22. 3. Authentication Header • Integrity Check Value • Authentication Data field는 Integrity Check Value를 가리킨다. • 이 값은 MAC 값이거나 MAC algorithm으로 계산된 것의 truncated version이다. • MAC 계산시 다음을 고려해야 한다. • IP header중 전송과정에서 변하고(mutable) 예상 불가능한(unpredictable) 필드들은 0으로 한다. • AH header중 Authentication field는 0으로 한다. • Ex) IPv4에서는 TTL 과 Header Check Sum은 ICV 계산 전에 0으로 간주한다. IPv6에서는 Flow Label은 0으로 간주하고 계산한다.

  23. 3. Authentication Header • Transport and tunnel Modes • Transport Modes • TCP, UDP, ICMP 등과 같은 트랜스포트 계층 세그먼트를 인증할 경우 • Tunnel Modes • 전체 IP 패킷에 대하여 인증할 경우 • 새로운 IP헤더의 구성이 필요하다.

  24. 3. Authentication Header

  25. 3. Authentication Header

  26. 4. Encapsulating Security Payload • ESP provides • confidentiality services • confidentiality massage contents • limited traffic flow confidentiality • same authentication services as AH

  27. 4. Encapsulating Security Payload • ESP Format • Security Parameters index(32 bits)- 목적지 IP 주소와 ESP 보안 프로토콜을 조합하여 생성, IP 데이터 그램에 대응되는 SA를 식별하기 위한 32 비트 값 • Sequence Number(32bits):재전송 공격을 방지하기 위한 32 bit 값 • Payload Data(variable):기밀성을 위해 암호화된 데이터 • Padding(0-255 bytes):데이터 암호화시 발생하는 덧붙이기 데이터 • Pad Length(8 bits) • Next Heather(8 bits) • Authentication Data(variable): SA 생성시 인증서비스를 선택할 경우에 포함

  28. Bit : 0 16 24 31 Security Parameter Index(SPI) Sequence Number Authentication Coverage Confidentiality Coverage Payload Data (variable) Payload Data (variable) Pad Length Next Header Authentication Data (Variable) 4. Encapsulating Security Payload IPSec ESP Format

  29. 4. Encapsulating Security Payload • Encryption and Authentication Algorithm • Payload Data, Padding, Pad length, Next Header가 암호화된다. • IPv6 호스트나 ESP를 지원하는 IPv4 시스템은 반드시 DES-CBC 를 지원해야 하고, 다른 암호알고리즘(Three key triple DES, RC5, IDEA…)도 지원할 수 있다. • ESP가 MAC의 사용을 지원하는 경우(비밀성 및 인증을 제공하는 경우)는 HMAC-MD5-96, HMAC-SHA-1-96을 지원해야 한다.

  30. 4. Encapsulating Security Payload • Padding은 다음의 목적으로 사용된다. • 어떤 암호화 알고리즘들은 plaintext가 multiple of some number of byte가 되기를 요구한다. • ESP format은 ciphertext가 32비트의 정수배이기를 요구한다 • 부가적인 padding은 payload의 실제 길이를 알리지 않음으로 부분적으로 traffic flow의 기밀성을 제공할 수 있다.

  31. 4. Encapsulating Security Payload • Transport and Tunnel Modes • Transport Modes • TCP, UDP, ICMP 등과 같은 트랜스포트 계층 세그먼트를 암호화할 경우 • encrypt and optionally authenticate the data carried by IP • Tunnel Modes • encrypt an entire IP packet • ESP header is prefixed to the packet and then the packet plus the ESP trailer is encrypted • IP 헤더를 포함한 전체 IP 패킷이 암호화 되므로 라우팅을 위하여 새로운 IP 헤더의 구성이 필요

  32. 4. Encapsulating Security Payload

  33. 5. Combining Security Associations • Combining Security Associations • 어떤 Traffic flow들은 IPSec service를 제공하기 위해 여러 개의 SA가 적용 필요 • IPSec에서는 AH와 ESP 보호메카니즘의 결합된 사용을 허용함 • ESP 변환이 사용되고 암호화 된 메시지에 대한 무결성을 보장하는 알고리즘이 제공되지 않는다면 AH가 항상 사용됨 • 인증, 무결성, 및 기밀성은 AH와 ESP 모두를 사용하여 제공 받을 수 있음 • AH와 ESP 의 사용에 있어서 다양한 경우 • 트랜스포트 모드 ESP와 전체 데이터그램을 인증하는 AH • 터널모드 ESP와 전체 데이터그램을 인증하는 AH • 터널모드 ESP와 데이터그램의 ESP 한부분만을 인증하는 AH • Authentication Plus Confidentiality • ESP with Authentication Option • Transport mode ESP와 전체 다이어그램을 인증하는 AH • Transport mode AH 와 이것을 암호화하는 tunnel mode ESP

  34. 6. Key Management • 안전한 통신을 위한 통신 당사자간에 사용될 암호 알고리즘, 키 등에 대한 합의 • IPSec에서 키교환을 위한 2가지 방법 • Manual • SA를 설정하는데 필요한 키나 그 밖의 사항들을 전화, 직접 전달 등 물리적인 방법에 의해 합의 • Automated • 정의된 키 교환 프로토콜을 사용하여 SA를 설정하는 것

  35. 6. Key Management • Oakley Key Determination Protocol • key exchange protocol based on the Diffie-Hellman algorithm • 키 교환 메커니즘 • ISAKMP(Internet Security Association and Key Management Protocol) • SA 설정, 협상, 변경, 삭제 등 SA 관리와 키 교환 정의 • 키 교환 메커니즘 자체에 대한 언급 없음. • IKE(Internet Key Exchange) • 키 교환 및 SA 협상을 위하여 Oakley와 ISAKMP를 결합한 프로토콜

  36. Internet Key Exchange • IKE (Internet Key Exchange) • 인터넷 프로토콜 협상과 키 교환에 대한 IETF IPSec 그룹 솔루션 • 혼합형 프로토콜 : ISAKMP(Internet Security Association and Key Management Protocol) + Oakley 프로토콜 • IKE가 제공하는 서비스 • 협상 서비스 : 프로토콜, 알고리즘, 키들을 합의 • 인증 서비스 : 통신 상대방의 인증 • 키 관리 : 합의한 키들을 관리 • 키를 안전하게 생성하기 위한 요소를 교환하는 방법 • IKE는 자동(automatic) 키 교환 메커니즘을 제공(필요시 수동 키 교환도 가능)

  37. Internet Key Exchange • IKE의 두 가지 Phase • Phase 1(최초 설정) : 두 peer가 추후의 안전한 통신(IPsec)을 위한 SA와 사용될 키를 합의 • Phase 2(변경 요구시) : 두 peer가 설정된 SA의 변경, 삭제, 키 변경 • IKE의 세 가지 운용 Mode • Main mode : 안전한 경로 수립을 위한 가장 일반적인 Phase 1의 IKE 교환 • Aggressive mode : Phase 1의 IKE 교환을 수행하는 또 다른 방법으로 main mode보다 조금 더 단순하고 빠른 교환 • Quick mode : Phase 2의 IKE 교환

  38. Algorithms • Confidentiality • 3DES • RC5 • IDEA • CAST • Blowfish • MIC (Message Integrity Check) • HMAC-MD5-96 • HMAC-SHA-1-96

  39. IPSec Services ESP(e. only) ESP (e. + a.) AH Access Control Connectionless Integrity Data origin authentication Rejection of replayed packets Confidentiality Limited Traffic flow confidentiality X X X X X X X X X X X X X X

  40. Applications of IPSec • Secure branch office connectivity over the Internet : VPN • Secure remote access over the Internet via ISP • Establishing extranet and intranet connectivity with partners :+SSL • Enhancing electronic commerce security : SET

More Related