40
네네네네네네 네네 네네네네네네 네네 IPSec IPSec 중중중중중 중중중중중중 중중중 중중

네트워크계층 보안 IPSec

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: 네트워크계층 보안  IPSec

네트워크계층 보안 네트워크계층 보안 IPSecIPSec

중부대학교 정보보호학과

이병천 교수

Page 2: 네트워크계층 보안  IPSec

CONTENTSCONTENTS……

1. IPSec 개요2. IPSec 의 구조 3. 인증헤더 (Authentication Header)4. 암호화페이로드 (Encapsulating Security

Payload)5. 보안연계 (Security Associations)6. 키관리 (Key Management)

Page 3: 네트워크계층 보안  IPSec

1. IP Security Overview1. 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) 기능 이용

Page 4: 네트워크계층 보안  IPSec

1. IP Security Overview1. 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

트래픽에 대한 정책을 저장하는 데이터베이스

Page 5: 네트워크계층 보안  IPSec

1. IP Security Overview1. IP Security Overview

Internet KeyManagement Protocol

Internet KeyManagement Protocol

SecurityAssociationDatabase

SecurityAssociationDatabase

IP SecurityProtocol

•AH Protocol•ESP Protocol

SecurityAssociation

SecurityPolicyDB

SecurityPolicyDB

IP SecurityProtocol

•AH Protocol•ESP Protocol

AH : Authentication HeaderESP : Encapsulating Security Payload

Party A Party B

Page 6: 네트워크계층 보안  IPSec

1. IP Security Overview1. IP Security Overview AH(Authentication Header)

IP 데이터그램에 무결성과 인증성을 제공 . 선택적인 되풀이 공격 (replay attack) 방지 가능 AH 서비스는 connectionless(per-packet basis 로 제공 ) AH 의 적용 : 전송 모드와 터널 모드에서 적용가능

ESP(Encapsulation Security Payload) IP 데이터그램에 무결성 검증 , 근원 인증 , 암호화를 제공 선택적인 되풀이 공격 방지 가능 IPsec 은 AH 와 ESP 를 함께 사용해야 보다 안전 ESP 의 적용 : 전송 모드와 터널 모드에서 적용가능

Page 7: 네트워크계층 보안  IPSec

1. IP Security Overview1. IP Security Overview

Applications

E-mail

Higher-levelnet protocols

TCP/IP

Data link

Physical

Applications

E-mail

Higher-levelnet protocols

TCP/IP

Data link

Physical

e-commerce protocols

S/MIME, PGP

SSL, TLS, SSH,Kerberos

IPSEC

H/W link encryption

Internet

Easy to deploy

More transparent

Page 8: 네트워크계층 보안  IPSec

1. IP Security Overview1. 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

Page 9: 네트워크계층 보안  IPSec

1. IP Security Overview1. IP Security Overview

Page 10: 네트워크계층 보안  IPSec

2. IP Security Architecture2. 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

Page 11: 네트워크계층 보안  IPSec

2. IP Security Architecture2. 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) : 암호 /인증 알고리즘

식별자 등 여러 도큐먼트에서 공통적으로 사용되는 값

Page 12: 네트워크계층 보안  IPSec

2. IP Security Architecture2. IP Security Architecture

Page 13: 네트워크계층 보안  IPSec

2. IP Security Architecture2. IP Security Architecture

IPSec Services Access control Connectionless integrity Data Origin authentication Rejection of replayed packets Confidentiality

Page 14: 네트워크계층 보안  IPSec

2. IP Security Architecture2. 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 인지를 나타냄 )

Page 15: 네트워크계층 보안  IPSec

2. IP Security Architecture2. 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

Page 16: 네트워크계층 보안  IPSec

2. IP Security Architecture2. IP Security Architecture

SA SelectorsSecurity 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)

Page 17: 네트워크계층 보안  IPSec

2. IP Security Architecture2. IP Security Architecture

Transport and Tunnel ModesTransport mode

IP Payload 부분만을 인증 /암호화 TCP, UDP, ICMP 등과 같은 transport 계층 segment 주로 두개의 호스트간의 communication 에 쓰임 게이트웨이가 호스트로서 동작하는 경우

Tunnel mode IP Header 까지 포함한 전체 IP Packet 을 인증 /암호화 부가적인 IP 헤더의 구성이 필요 통신하는 양쪽 단말중 하나가 게이트웨이일 경우 터널

모드이어야 한다 두개의 호스트가 터널모드로 작동할 수도 있다 .

Page 18: 네트워크계층 보안  IPSec

3. Authentication Header3. Authentication Header

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

Page 19: 네트워크계층 보안  IPSec

3. Authentication Header3. Authentication Header

Page 20: 네트워크계층 보안  IPSec

3. Authentication Header3. 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 을 반드시 기본 인증

알고리즘으로 제공해야 함

Page 21: 네트워크계층 보안  IPSec

3. Authentication Header3. 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 를 협상

Page 22: 네트워크계층 보안  IPSec

3. Authentication Header3. 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 으로 간주하고 계산한다 .

Page 23: 네트워크계층 보안  IPSec

3. Authentication Header3. Authentication Header

Transport and tunnel Modes Transport Modes

TCP, UDP, ICMP 등과 같은 트랜스포트 계층 세그먼트를 인증할 경우

Tunnel Modes 전체 IP 패킷에 대하여 인증할 경우 새로운 IP 헤더의 구성이 필요하다 .

Page 24: 네트워크계층 보안  IPSec

3. Authentication Header3. Authentication Header

Page 25: 네트워크계층 보안  IPSec

3. Authentication Header3. Authentication Header

Page 26: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. Encapsulating Security Payload

ESP provides confidentiality services confidentiality massage contents limited traffic flow confidentiality same authentication services as AH

Page 27: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. 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 생성시 인증서비스를

선택할 경우에 포함

Page 28: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. Encapsulating Security Payload

Security Parameter Index(SPI)

Sequence Number

Payload Data (variable)

Payload Data (variable)

0 16 3124Bit :

Au

then

tica

tio

n Cov

erag

e

Con

fid

enti

alit

y C

over

age

Authentication Data (Variable)

Pad Length Next Header

IPSec ESP Format

Page 29: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. 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 을 지원해야 한다 .

Page 30: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. Encapsulating Security Payload

Padding 은 다음의 목적으로 사용된다 . 어떤 암호화 알고리즘들은 plaintext 가 multiple of

some number of byte 가 되기를 요구한다 . ESP format 은 ciphertext 가 32 비트의

정수배이기를 요구한다 부가적인 padding 은 payload 의 실제 길이를

알리지 않음으로 부분적으로 traffic flow 의 기밀성을 제공할 수 있다 .

Page 31: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. 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 헤더의 구성이 필요

Page 32: 네트워크계층 보안  IPSec

4. Encapsulating Security Payload4. Encapsulating Security Payload

Page 33: 네트워크계층 보안  IPSec

5. Combining Security Associations5. 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

Page 34: 네트워크계층 보안  IPSec

6. Key Management 6. Key Management 안전한 통신을 위한 통신 당사자간에 사용될 암호

알고리즘 , 키 등에 대한 합의 IPSec 에서 키교환을 위한 2 가지 방법

Manual SA 를 설정하는데 필요한 키나 그 밖의 사항들을 전화 , 직접

전달 등 물리적인 방법에 의해 합의 Automated

정의된 키 교환 프로토콜을 사용하여 SA 를 설정하는 것

Page 35: 네트워크계층 보안  IPSec

6. Key Management 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 를 결합한

프로토콜

Page 36: 네트워크계층 보안  IPSec

Internet Key ExchangeInternet Key Exchange IKE (Internet Key Exchange)

인터넷 프로토콜 협상과 키 교환에 대한 IETF IPSec 그룹 솔루션

혼합형 프로토콜 : ISAKMP(Internet Security Association and Key Management Protocol) + Oakley 프로토콜

IKE 가 제공하는 서비스 협상 서비스 : 프로토콜 , 알고리즘 , 키들을 합의 인증 서비스 : 통신 상대방의 인증 키 관리 : 합의한 키들을 관리 키를 안전하게 생성하기 위한 요소를 교환하는 방법

IKE 는 자동 (automatic) 키 교환 메커니즘을 제공 ( 필요시 수동 키 교환도 가능 )

Page 37: 네트워크계층 보안  IPSec

Internet Key ExchangeInternet 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 교환

Page 38: 네트워크계층 보안  IPSec

AlgorithmsAlgorithms

Confidentiality 3DES RC5 IDEA CAST Blowfish

MIC (Message Integrity Check) HMAC-MD5-96 HMAC-SHA-1-96

Page 39: 네트워크계층 보안  IPSec

IPSec ServicesIPSec Services

AH ESP(e. only) ESP (e. + a.)

Access Control

Connectionless Integrity

Data origin authentication

Rejection of replayed packets

Confidentiality

Limited Traffic flowconfidentiality

X

X

X

X

X

X

X

X

X

X

X

X

X

X

Page 40: 네트워크계층 보안  IPSec

Applications of IPSecApplications 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