• Nenhum resultado encontrado

Protect IP traffic

N/A
N/A
Protected

Academic year: 2023

Share "Protect IP traffic"

Copied!
12
0
0

Texto

(1)

© André Zúquete Advanced Network Security 1

IPSec (IP Security, RFC 4301):

Goals

Protect IP traffic

Datagram confidentiality Datagram integrity control

Two operational modes:

Transport mode

Uses original (cleartext) IP headers

Tunnel mode

Encapsulates (possibly encrypting) original IP header

(2)

Operational scenarios

© André Zúquete Advanced Network Security 3

Transport mode

Tunnel mode

VPN gateway

VPN gateway VPN gateway

Tunnel mode

IPSec:

Mechanisms

Security Associations (SA, RFC 4301)

Security policies, mechanisms and crypto parameters used to secure the communication between a pair of hosts

Security Parameter Index (SPI)

SA identifier

Indexes the SA that should be used to validate an IPSec datagram

Extra optional fields for the IP header

Authentication Header (AH, RFC 4302)

Has an SPI

Keyed hash (MAC) of the whole IP datagram Encapsulating Security Payload (ESP, RFC 4303)

Has an SPI

Authenticated cryptogram of the IP datagram payload

(3)

AH and ESP mechanisms

AH goals

Connectionless integrity Data origin authentication Optional anti-replay service

ESP goals

Confidentiality (encryption) Limited traffic flow confidentiality Optional connectionless integrity Optional data origin authentication Optional anti-replay service

© André Zúquete Advanced Network Security 5

Sequence Number SPI

Payload data + padding

Next Hdr Pad len Next Hdr

Authentication Data

Payload Length

Authentication Data Sequence Number

SPI

IPSec:

Authentication Header (AH)

IP hdr Payload

IP hdr AH hdr Payload authenticated

IP hdr AH hdr Payload

authenticated IP hdr

Transport mode

Tunnel mode

(4)

Encapsulating Security Payload (ESP)

© André Zúquete Advanced Network Security 7

IP hdr Payload

IP hdr ESP hdr Enc. payload ESP trail ESP auth encrypted

IP hdr ESP hdr Payload ESP auth

encrypted authenticated

ESP trail

Enc. IP hdr

Transport mode

Tunnel mode

authenticated

IPSec:

Cryptographic algorithms (RFC 7321)

AH

Must be implemented (mandatory)

HMAC-SHA1-96

Should/may be implemented (optional):

AES-GMAC (AES 128)

AES-XCBC-MAC-96

(5)

Cryptographic algorithms (RFC 7321)

ESP encryption

Must be implemented (mandatory)

NULL

AES-CBC

Should/may be implemented (optional):

AES-CTR

3DES-CBC Must not

DES-CBC

© André Zúquete Advanced Network Security 9

IPSec:

Cryptographic algorithms (RFC 7321)

ESP authentication

Must be implemented (mandatory)

HMAC-SHA1-96

Should/may be implemented (optional):

NULL

AES-GMAC (AES 128)

AES-XCBC-MAC-96

(6)

Cryptographic algorithms (RFC 7321)

ESP authenticated encryption

Must be implemented (mandatory)

AES-GCM (AES 128)

AES-CCM (AES 128)

© André Zúquete Advanced Network Security 11

IPSec:

Operation

If sender has an SA to destination IP:

Use AH and/or ESP according to SA Changes the IP accordingly

Adds AH and/or ESP headers

Replaces plaintext header/payload by an encrypted version

If receiver has an SA with the headers’ SPI:

Validates IPSec headers according with their SA Upon a validation failure the datagram is discarded

Silently

(7)

SA and SPD databases

SA database

Repository of local SAs

An SA is mainly a bilateral peer agreement

A set of common rules to protect ID datagramas

But it only protects traffic in one direction!

SPD database

Security Police Definition

A police states a protection level required

E.g. traffic from X to Y should be protected with mecanisms x, y and z

© André Zúquete Advanced Network Security 13

IPSEC:

ESP não impede IP spoofing

Ataque com repetição e IP spoofing

Para minimizar este problema pode-se usar ESP com cifra e autenticação em modo túnel

Mas não impede o spoofing do cabeçalho IP

exterior

(8)

Setup of SAs

Manual

With line-oriented or graphical tools With libraries

Automatic with protocol

ISAKMP (meta-protocol) (RFC 2408) IKE (RFC 7296)

© André Zúquete Advanced Network Security 15

ISAKMP ( Internet Security Association and Key Management Protocol, RFC 2408 )

Generic meta-protocol (or framework)

App-level protocol

Allows key negotiations and peer authentications

Two-phase protocol

1 – Setup of an ISAKMP SA

2 – Setup of an SA for other protocols (e.g. IPSec)

No specific techniques

5 exchange types

Base Exchange

Identity Protection Exchange

Authentication Only Exchange

Aggressive Exchange

Informational Exchange

(9)

Integration

© André Zúquete Advanced Network Security 17

Session/presentation Transport (UDP, TCP)

Network (IP) Link

ISAKMP

IPSec TLS

DOI definition Key Exchange Definition

UDP 500

IKEv2 (Internet Key Exchange, RFC 7296)

The only mandatory for IPSec ISAKMP compliant

Operation mode

Phase 1: setup of a bidirectional IKE SA Phase 2: setup of unidirectional IPSEC SAs

• Protected by IKE SA

• Many IPsec SAs can reuse the same IKE SA

IKE SA setup

Setup of many IPSEC SAs

(10)

Peer authentication

Host (IP authentication)

Digital signatures and X.509 certificates

Distributed inline

Pre-distributed public keys of asymmetric key pairs Pre-shared secret key

aka KEK (Key Encryption Key)

© André Zúquete Advanced Network Security 19

IKE:

Negotiation modes

Main (Phase 1)

Setup of a bidirectional IKE SA Identities are encrypted 6 messages

Parameters agreement

Diffie-Hellman

Authentication

Aggressive (Phase 1)

Equal to “main mode” without encrypted identities

3 messages

Quick (Phase 2)

Setup of two IPSec SAs

Ingress traffic

Egress traffic

Protected by an IKE SA New key material

with DH

with key derivation 3-4 messages

From https://supportforums.cisco.com/.../2157-ws22.gif

(11)

Negotiation example

© André Zúquete Advanced Network Security 21

IPSec:

Issues with NAT (RFC 3715)

NAT interferes with the IP end-to-end paradigm

Its a “survival” hack

NAT impact is twofold

Network (changes src or dst IP) Transport (changes src or dst port)

Impact in IPSec

Doesn’t work with transport mode

AH prevents IP header changes,

ESP prevents transport header changes

SPI-based multiplexing can fail for multiple reasons

ISAKMP/IKE doesn’t work

(12)

Another hack

With several weaknesses NAT-T support announcement

RFC 3947 MD5 hash within Vendor ID of first Phase 1 messages Detection of NAT

NAT-D payload w/ hashes of addresses and ports Adoption of a different ISAKMP port (4500)

To minimize ambiguities caused by different NAT behaviors Keepalives to maintain NAT mappings stable

Negotiation of NAT-T encapsulation Tunnel / transport

NAT-OA payload with original IP addresses

To transport UDP-encapsulation (required to update TCP checksums)

© André Zúquete Advanced Network Security 23

Referências

Documentos relacionados

Otto Wagner Magalhães, brasileiro, casado(a), portador da cédula de identidade nº 22.106-10, emitida pela SSP/RJ, inscrito no CPF sob o n° 252.842.587-20, com endereço na Rua Sete

•O uso de acessórios não recomendados para uso com este aparelho poderá causar acidentes.. •Não deixar o cordão elétrico ficar pendura- do na beirada de mesas, balcões ou outras

These transfers have a cost of 10€ each and they are available during the registration process, or after it, getting into the Athlete Area on the registration personal account...

De um modo geral, os problemas de interesse neste trabalho envolvem problemas de Otimização Combinatória conhecidos como NP-Difíceis, que são aqueles para os quais não se conhece

Figura 3.6: Restri¸c˜ ao de posicionamento em segmento de reta: (a) modelo de cˆ amera n˜ ao atendendo ` a restri¸c˜ ao; (b) transforma¸c˜ ao do estado inv´ alido para o estado

dados de temperatura e umidade relativa do ar ambiente, de temperatura do ar insuflado e de temperatura do ponto de orvalho, pelo programa para determinar propriedades

Com os resultados parciais podemos observar que quanto maior o grau de disfunção erétil, maior o grau de depressão no paciente, e isso mostra que o estudo está no caminho certo

Dado o envolvimento do GABA na modulação da actividade dos neurónios talâmicos, neste estudo pretendeu-se averiguar, em animais monoartríticos, possíveis alterações da expressão