• No results found

Introduction to Computer Security

N/A
N/A
Protected

Academic year: 2021

Share "Introduction to Computer Security"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction to Computer Security

Network Security

Pavel Laskov

(2)

Circuit switching vs. packet switching

A B A A B B B A A B A A A A A B B B A

(3)
(4)
(5)

TCP connection synchronization

Initial handshake

Host A Host B

Send SYN seq=x

Receive SYN

Send SYN seq=y, ACK x+1

Receive SYN + ACK

Send ACK y+1

Receive ACK .. . data transmission

Termination

Host A Host B

Send FIN seq=x

Receive FIN Send ACK x+1 Receive ACK

Send FIN seq=y, ACK x+1 Receive FIN + ACK

Send ACK y+1

(6)

What can go wrong: TCP session hijacking

Seq: x PSH/ACK: y (60) Seq: y PSH/ACK: x+60 (20) Seq: x+60 PSH/ACK: y+20 (30) Seq: y+20 PSH/ACK: x+90 (20) Seq: x+90 PSH/ACK: y+40 (30) Seq: y+40 PSH/ACK: x+120 (20)

A

A

A

A

C(A)

A

B

B

B

B

B

B

(7)

Example: SYN flood

(8)

Placement of security instruments

(9)

IP layer security: IPsec

Objectives:

secure connectivity of branch offices

secure remote access

Advantages:

bypass resistance

transparency to end users and applications

Disadvantages:

infrastructure support needed

performance degradation

(10)

IPsec services and protocols

AH:

Authentication Header

ESP:

Encapsulating Security Payload

Services / Protocols

AH

ESP

ESP + auth.

Access control

X

X

X

Connectionless integrity

X

X

Data origin authentication

X

X

Replay protection

X

X

X

Confidentiality

X

X

(11)

IPsec modes

Transport mode

Protection of

packet payload

Used for end-to-end communication

Small performance overhead

Tunnel mode

Protection of

entire packet

(payload and headers)

Communication between gateways

Invisible to intermediate routers

Considerable performance overhead

(12)

Transport mode vs. tunnel mode

8.3 / ENCAPSULATING SECURITY PAYLOAD 285

Transport and Tunnel Modes

Figure 8.7 shows two ways in which the IPsec ESP service can be used. In the upper part of the figure, encryption (and optionally authentication) is provided directly between two hosts. Figure 8.7b shows how tunnel mode operation can be used to set up a virtual private network. In this example, an organization has four private networks interconnected across the Internet. Hosts on the internal networks use the Internet for transport of data but do not interact with other Internet-based hosts. By terminating the tunnels at the security gateway to each internal network, the configu-ration allows the hosts to avoid implementing the security capability. The former technique is supported by a transport mode SA, while the latter technique uses a tunnel mode SA.

In this section, we look at the scope of ESP for the two modes. The consid-erations are somewhat different for IPv4 and IPv6. We use the packet formats of Figure 8.8a as a starting point.

TRANSPORTMODEESPTransport mode ESP is used to encrypt and optionally authenticate the data carried by IP (e.g., a TCP segment), as shown in Figure 8.8b.

(a) Transport-level security

(b) A virtual private network via tunnel mode Internal network External network Encrypted TCP session Internet Corporate

network Corporatenetwork

Corporate network Corporate network Encrypted tunnels carrying IP traffic

(13)

AH service

Transport mode

orig IP

hdr routing, fragment AHhop-by-hop, dest, dest TCP Data IPv6

authenticated except for mutable fields orig IP

hdr AH TCP Data

IPv4

authenticated except for mutable fields

orig IP hdr New IP

hdr AH TCP Data

IPv4

authenticated except for mutable fields in the new IP header (b) Transport Mode

orig IP

hdr extension headers(if present) TCP Data IPv6

orig IP

hdr TCP Data

IPv4

(a) Before Applying AH

new IP

hdr headersext AH orig IPhdr headersext TCP Data IPv6

authenticated except for mutable fields in new IP header and its extension headers

(c) Tunnel Mode

Figure 6.6 Scope of AH Authentication

Tunnel mode

orig IP

hdr routing, fragment AHhop-by-hop, dest, dest TCP Data IPv6

authenticated except for mutable fields orig IP

hdr AH TCP Data

IPv4

authenticated except for mutable fields

orig IP hdr New IP

hdr AH TCP Data

IPv4

authenticated except for mutable fields in the new IP header (b) Transport Mode

orig IP

hdr extension headers(if present) TCP Data IPv6

orig IP

hdr TCP Data

IPv4

(a) Before Applying AH

new IP

hdr headersext AH orig IPhdr headersext TCP Data IPv6

authenticated except for mutable fields in new IP header and its extension headers

(c) Tunnel Mode

(14)

ESP service

Transport mode

orig IP

hdr routing, fragmenthop-by-hop, dest, IPv6 orig IP hdr IPv4 New IP hdr IPv4

(a) Transport Mode

new IP hdr headersext IPv6 authenticated encrypted authenticated encrypted authenticated encrypted authenticated encrypted (b) Tunnel Mode

Figure 6.9 Scope of ESP Encryption and Authentication

orig IP

hdr headersext TCP Data ESPtrlrauthESP ESP hdr ESP auth orig IP hdr TCP Data ESPtrlr ESP auth ESP hdr dest TCP Data TCP Data ESP trlr ESP auth ESP trlr ESP hdr ESP hdr

Tunnel mode

orig IP

hdr routing, fragmenthop-by-hop, dest, IPv6 orig IP hdr IPv4 New IP hdr IPv4

(a) Transport Mode

new IP hdr headersext IPv6 authenticated encrypted authenticated encrypted authenticated encrypted authenticated encrypted (b) Tunnel Mode

Figure 6.9 Scope of ESP Encryption and Authentication

orig IP

hdr headersext TCP Data ESPtrlrauthESP ESP hdr ESP auth orig IP hdr TCP Data ESPtrlr ESP auth ESP hdr dest TCP Data TCP Data ESP trlr ESP auth ESP trlr ESP hdr ESP hdr

(15)

Transport layer security: SSL/TLS

Objectives:

secure information transmission in Internet applications

mutual authentication in Internet applications

Advantages:

secure end-to-end communication over TCP (not limited to

HTTP)

Disadvantages:

PKI support needed

(16)

SSL architecture

SSL connection

corresponds to

TCP connections.

SSL sessions

represent an

association between a client and

a server. Sessions define

parameters that can be share

between connections.

(17)

SSL Record Protocol

Carries out information transfer

(18)

SSL handshake protocol

Client Server Random number Crypto info Random number Crypto info Server certificate

Request client auth.

Extract server public key

Client certificate

Hash over prev. messages

Extract client public key

Random pre-master secret

Calculate master secret Calculate master secret

Switch to master secret End handshake

Switch to master secret End handshake

(19)

Application layer security: SSH

Applications

secure remote login

secure services (e.g. FTP, copy) over an insecure network

secure port forwarding

Advantages

various authentication methods

a neat way to circumvent firewalls

Disadvantages

point-to-point only

(20)

SSH architecture

known-hosts session key User Account U U H H H Client user key host keys H H host key Server session key U user key User Account SSH Connection interactive session secure copy port forwarding ...

(21)

SSH functionality

Remote Login

Username / password

Public key

Remote command execution

Remote copying (rcp)

Secure ftp service (sftp)

Remote synchronization (rsync)

Port forwarding and tunneling

Secure file system mounting (sshfs)

(22)

SSH port forwarding

Syntax:

Local forwarding:

ssh -L <lport>:<rhost>:<rport> username@host

Remote forwarding:

ssh -R <port>:<lhost>:<lport> username@host

(23)

SSH port forwarding: examples

IMAP requiests for an intermal IMAP server:

ssh -L 8143:exchange.first.fraunhofer.de:993

[email protected]

Sending mail over an internal server:

ssh -L 8025:smtpserv.uni-tuebingen.de:25

[email protected]

Browsing with an external IP address:

ssh -L 8081:proxy0.first.fraunhofer.de:3128 -L

8080:proxy0.first.fraunhofer.de:3128

[email protected]

External SSH access bypassing a firewall:

ssh -R 22:montreal.cs.uni-tuebingen.de:22

[email protected]

(24)

Summary

Network security technologies can be deployed at all layers

of network protocols.

IP layer security provides a transparent security service;

needs, however, infrastructure support.

Trasport layer security provides a reliable end-to-end

security services.

Application layer security mechanisms can be tailored to

specific application needs.

References

Related documents

A VPN can be defined as a means for using the public network infrastructure, such as the Internet, to provide private, secure access to applications and corporate network

Drop Reset Internet Service Provider DMZ Network: Corporate Headquarters Internal Network: May Contain Private Information and.. Critical Services

Using an instrumental apparatus that enables simultaneous recording of both time- integrated 共spectra兲 and time-resolved fluorescence, this study intends to 共1兲 determine

A virtual private network when adequately provisioned with appropriate security controls, is considered an internal network (i.e., NSU establishes a network connection

(b) a Wide Area Network connecting all branches of an organization (c) a corporate computer network. (d) a network connecting all computers of an organization and using the

Virtual Private Network (VPN) technology are used to attend to the security over the external network to make sure that the Customer can communicate with Telenors mobile network in

Because medically underserved communities heavily depend on the use of health care teams that include a full range of health care professionals (a practice encouraged under

Health IT Around The Globe HK Corporate 1.5% (5%) &gt; Central In-House No Advanced Most No No No USA Local 4% (14%) &gt; Central Packages Yes Advanced Few Yes Yes Yes UK Local