network security professor dr. adeel akram. firewalls, ssl, vpn and ipsec

54
Network Network Security Security Professor Professor Dr. Adeel Dr. Adeel Akram Akram

Upload: river-arvey

Post on 15-Dec-2015

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Network Network SecuritySecurity

ProfessorProfessorDr. Adeel AkramDr. Adeel Akram

Page 2: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Firewalls, SSL, VPN and IPSecFirewalls, SSL, VPN and IPSec

Page 3: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

OutlineOutline►Types of firewalls Types of firewalls

Static Packet FilterStatic Packet Filter Dynamic (Stateful) Packet FiltersDynamic (Stateful) Packet Filters Circuit Level GatewayCircuit Level Gateway Application Level GatewayApplication Level Gateway

►Transport Layer Security / SSLTransport Layer Security / SSL►VPNVPN► IPSecIPSec

Page 5: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Static Packet FilterStatic Packet Filter► The decision to accept or deny a The decision to accept or deny a

packet is based upon an packet is based upon an examination of specific fields within examination of specific fields within the packet's IP and protocol the packet's IP and protocol headers.headers.

source addresssource address

destination addressdestination address

application or protocolapplication or protocol

source port numbersource port number

destination port numberdestination port number

► This decision is made on packet by This decision is made on packet by packet basispacket basis

► Rules are encoded to filter packets.Rules are encoded to filter packets.

Page 6: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Static Packet FilterStatic Packet Filter

►A packet filter only examines data in A packet filter only examines data in the IP header and TCP header; it the IP header and TCP header; it cannot know the difference between a cannot know the difference between a real and a forged address. real and a forged address.

► If an address meets the packet filter If an address meets the packet filter rules along with the other rule criteria, rules along with the other rule criteria, the packet will be allowed to pass.the packet will be allowed to pass.

Page 7: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Address SpoofingIP Address Spoofing

►Suppose all packets from unknown IP Suppose all packets from unknown IP addresses are filtered out.addresses are filtered out.

► If a Hacker can find the IP address of If a Hacker can find the IP address of one trusted client then the hacker can one trusted client then the hacker can change the source address on the change the source address on the malicious IP packet and use the malicious IP packet and use the address of the trusted client.address of the trusted client.

Page 8: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Static Packet Filter Static Packet Filter ConsiderationsConsiderations

ProsPros ConsCons

Low impact on Low impact on network performance. network performance.

Operates only at network layer Operates only at network layer therefore it only examines IP and therefore it only examines IP and TCP headers.TCP headers.

Low cost – now Low cost – now included with many included with many OSsOSs

Unaware of packet payload – Unaware of packet payload – offers low level of security.offers low level of security.

Lacks state awareness – may Lacks state awareness – may require numerous ports be left require numerous ports be left open to facilitate services which open to facilitate services which use dynamically allocated ports.use dynamically allocated ports.

Susceptible to IP spoofingSusceptible to IP spoofing

Difficult to create rulesDifficult to create rules

Only provides a low level of Only provides a low level of protectionprotection

Page 9: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Packet Filtering Firewall: Packet Filtering Firewall: TerminologyTerminology

►Static (Stateless) Firewall: The firewall Static (Stateless) Firewall: The firewall makes a decision on a packet by makes a decision on a packet by packet basis. packet basis.

►Dynamic (Stateful) Firewall : The Dynamic (Stateful) Firewall : The firewall keeps state information about firewall keeps state information about transactions (connections).transactions (connections).

Page 10: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Dynamic (Stateful) Packet Dynamic (Stateful) Packet Filter Filter

► A typical dynamic packet filter is "aware" of the A typical dynamic packet filter is "aware" of the difference between a new and an established difference between a new and an established connection. connection.

► Once a connection is established, it is entered Once a connection is established, it is entered into a table that typically resides in RAM. into a table that typically resides in RAM.

► Subsequent packets are compared to this table in Subsequent packets are compared to this table in RAM, most often by software running at the RAM, most often by software running at the operating system (OS) kernel level.operating system (OS) kernel level.

► When the packet is found to be an existing When the packet is found to be an existing connection, it is allowed to pass without any connection, it is allowed to pass without any further inspection.further inspection.

Page 11: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Dynamic (Stateful) Packet Dynamic (Stateful) Packet Filter Filter

► By avoiding having to parse the packet filter By avoiding having to parse the packet filter rule base for each and every packet that rule base for each and every packet that enters the firewall enters the firewall

► and by performing this already established and by performing this already established connection table test at the kernel level in connection table test at the kernel level in RAM, RAM,

► the dynamic packet filter enables a the dynamic packet filter enables a measurable performance increase over a measurable performance increase over a static packet filter.static packet filter.

Page 12: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Dynamic (Stateful) Packet Dynamic (Stateful) Packet FilterFilter

►State creation must follow the State creation must follow the handshake needed for connection handshake needed for connection creation.creation.

Page 13: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Dynamic Packet Filter Dynamic Packet Filter ConsiderationsConsiderations

ProsPros ConsCons

Low impact on Low impact on network network performance. performance.

Operates only at network layer Operates only at network layer therefore it only examines IP and therefore it only examines IP and TCP headers.TCP headers.

Low cost – now Low cost – now included in some of included in some of the OSsthe OSs

Unaware of packet payload – Unaware of packet payload – offers low level of security.offers low level of security.

State awareness State awareness provides significant provides significant performance benefitperformance benefit

Susceptible to IP spoofingSusceptible to IP spoofing

Difficult to create rulesDifficult to create rules

Important to follow the connection Important to follow the connection creation steps.creation steps.

Only provides a low level of Only provides a low level of protectionprotection

Page 14: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Circuit Level GatewayCircuit Level Gateway► The decision to accept or deny The decision to accept or deny

a packet is based upon an a packet is based upon an examination of specific fields examination of specific fields within the packet's IP and within the packet's IP and protocol headers.protocol headers. source addresssource address

destination addressdestination address

application or protocolapplication or protocol

source port numbersource port number

destination port numberdestination port number

Handshaking and Handshaking and Sequence Sequence numbernumber

Page 16: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Circuit Level Gateway Circuit Level Gateway ConsiderationsConsiderations

ProsPros ConsCons

Low to moderate Low to moderate impact on network impact on network performance. performance.

Shares many of the same Shares many of the same negatives issues associated negatives issues associated with packet filters.with packet filters.

Breaks direct Breaks direct connection to server connection to server behind the firewallbehind the firewall

Allows any data to pass through Allows any data to pass through the firewall.the firewall.

State awareness State awareness provides significant provides significant performance benefitperformance benefit

Only provides a low to Only provides a low to moderate level of protectionmoderate level of protection

Page 17: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Application Level ProxyApplication Level Proxy

► An application level gateway intercepts the An application level gateway intercepts the incoming and outgoing packets incoming and outgoing packets

► Run proxies that prevent direct connection Run proxies that prevent direct connection between a trusted server or client and an between a trusted server or client and an untrusted host.untrusted host.

► Proxies examine the entire packet and can Proxies examine the entire packet and can filter packets at the application layer.filter packets at the application layer.

► Proxies are application specific.Proxies are application specific.

Page 18: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Application Level GatewayApplication Level Gateway► Current technology application level gateways are often Current technology application level gateways are often

referred to as referred to as strong application proxiesstrong application proxies. . ► A strong application proxy extends the level of security A strong application proxy extends the level of security

afforded by the application level gateway. afforded by the application level gateway. ► Instead of copying the entire datagram on behalf of the user, Instead of copying the entire datagram on behalf of the user,

a strong application proxy actually creates a brand new a strong application proxy actually creates a brand new empty datagram inside the firewall. empty datagram inside the firewall.

► Only those commands and data found acceptable to the Only those commands and data found acceptable to the strong application proxy are copied from the original strong application proxy are copied from the original datagram outside the firewall to the new datagram inside the datagram outside the firewall to the new datagram inside the firewall. firewall.

► By employing this methodology the strong application proxy By employing this methodology the strong application proxy can mitigate the risk of an entire class of can mitigate the risk of an entire class of covert channel attacks.attacks.

Page 20: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Covert Channel AttacksCovert Channel Attacks► ICMP_ECHO traffic can be used to construct covert ICMP_ECHO traffic can be used to construct covert

communications channels through networks. communications channels through networks. ► The normal "ping" protocol states that one site (the The normal "ping" protocol states that one site (the

pinger) sends an ICMP_ECHO packet to the target pinger) sends an ICMP_ECHO packet to the target (the pingee). The pingee then sends an (the pingee). The pingee then sends an ICMP_ECHOREPLY back.ICMP_ECHOREPLY back.

► ICMP_ECHO packets have an option to include a ICMP_ECHO packets have an option to include a data section that usually stores timing information data section that usually stores timing information to determine round-trip packet times. to determine round-trip packet times.

Page 21: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Covert Channel AttacksCovert Channel Attacks

► Firewalls and filtering routers do not check the Firewalls and filtering routers do not check the data content, so it is possible to transmit data content, so it is possible to transmit malicious information in this packet. malicious information in this packet.

► This is a This is a covert channelcovert channel. Most network routers . Most network routers pass, drop or return ICMP traffic. Since they pass, drop or return ICMP traffic. Since they don't filter the data content, it is possible to don't filter the data content, it is possible to masquerade Trojan packets as valid masquerade Trojan packets as valid ICMP_ECHO packets. ICMP_ECHO packets.

► One example of this type of attack is described One example of this type of attack is described in Phrack Magazine and is called in Phrack Magazine and is called Project Loki. .

Page 22: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Transport Layer SecurityTransport Layer Security

Page 23: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Transport Layer SecurityTransport Layer Security

►Lecture prepared using information fromLecture prepared using information from►Chapter 7 of Network Security Essentials Applications and Standards Chapter 7 of Network Security Essentials Applications and Standards by Stallingsby Stallings►Section 8.3.3 of Computer Networks by Peterson and DavieSection 8.3.3 of Computer Networks by Peterson and Davie►Introduction to SSL.htmIntroduction to SSL.htm►Analysis of SSL 3.0 Protocol by Wagner and SchneierAnalysis of SSL 3.0 Protocol by Wagner and Schneier

Page 24: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSLSSL

►The Transport Layer Security protocols The Transport Layer Security protocols started with the Secure Socket Layer started with the Secure Socket Layer (SSL) protocol(SSL) protocol

Page 25: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

So, what is it?So, what is it? Secure Sockets Layer (version 3.0)Secure Sockets Layer (version 3.0)

According to the specification…According to the specification…

““The primary goal of the SSL Protocol is to provide The primary goal of the SSL Protocol is to provide privacy and reliability between two communicating privacy and reliability between two communicating applications. The protocol allows client/server applications. The protocol allows client/server applications to communicate in a way that is applications to communicate in a way that is designed to prevent eavesdropping, tampering, or designed to prevent eavesdropping, tampering, or message forgery.message forgery. ” ”

SSLSSL

Page 26: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Designed with four basic goalsDesigned with four basic goals Cryptographic securityCryptographic security InteroperabilityInteroperability ExtensibilityExtensibility Relative efficiencyRelative efficiency

SSLSSL

Page 27: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSL has three basic properties:SSL has three basic properties: The connection is private. Encryption is used after an The connection is private. Encryption is used after an

initial handshake to define a secret key. Symmetric initial handshake to define a secret key. Symmetric cryptography is used for data encryption (e.g., DES, cryptography is used for data encryption (e.g., DES, RC4, etc.)RC4, etc.)

The peer's identity can be authenticated using The peer's identity can be authenticated using asymmetric, or public key, cryptography (e.g., RSA, asymmetric, or public key, cryptography (e.g., RSA, DSS, etc.).DSS, etc.).

The connection is reliable. Message transport The connection is reliable. Message transport includes a message integrity check using a keyed includes a message integrity check using a keyed MAC. Secure hash functions (e.g., SHA, MD5, etc.) MAC. Secure hash functions (e.g., SHA, MD5, etc.) are used for MAC computations.are used for MAC computations.

SSLSSL

Page 28: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSL/TLSSSL/TLS Well then, what is TLS?Well then, what is TLS?

Transport Layer Security (version 1.0)Transport Layer Security (version 1.0) SSL was developed by Netscape. The SSL was developed by Netscape. The

standards community wanted their own standards community wanted their own version free from any patents/restrictionsversion free from any patents/restrictions

Thus was born TLSThus was born TLS IETF changed the name to avoid showing biasIETF changed the name to avoid showing bias We’ll use the two terms interchangeablyWe’ll use the two terms interchangeably

Page 29: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Users want to connect to Users want to connect to servers without the connection servers without the connection being listened to (securely)being listened to (securely) E.g. Electronic commerceE.g. Electronic commerce

Every server has a certificateEvery server has a certificate Basically a public keyBasically a public key Signed by a trusted third partySigned by a trusted third party

SSL/TLSSSL/TLS

Page 30: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSL ServicesSSL Services

►SSL server authenticationSSL server authentication allows a allows a user to confirm a server’s identity (SSL user to confirm a server’s identity (SSL Certificates). Certificates).

►SSL client authenticationSSL client authentication allows a allows a server to confirm a client’s identity server to confirm a client’s identity

►An encrypted SSL connectionAn encrypted SSL connection allows confidential information allows confidential information exchange.exchange.

Page 32: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

►SSL consists of two protocol layersSSL consists of two protocol layers►The Record Layer encapsulates all The Record Layer encapsulates all

messagesmessages The Handshake protocol negotiates all options The Handshake protocol negotiates all options

of the sessionof the session The Alert protocol indicates errors or other The Alert protocol indicates errors or other

caution conditions have occurred in the caution conditions have occurred in the connectionconnection

The ChangeCipherSpec protocol indicates the The ChangeCipherSpec protocol indicates the channel is ready for secure communicationschannel is ready for secure communications

SSL/TLSSSL/TLS

Page 34: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSL/TLSSSL/TLS

►The SSL Record Layer ProvidesThe SSL Record Layer Provides ConfidentialityConfidentiality AuthenticityAuthenticity Replay ProtectionReplay Protection

►Over a connection oriented reliable Over a connection oriented reliable transport protocol like TCPtransport protocol like TCP

Page 37: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

► The SSL protocol uses a combination of public-key The SSL protocol uses a combination of public-key and symmetric key encryption. and symmetric key encryption.

► An SSL session always begins with an exchange An SSL session always begins with an exchange of messages called the of messages called the SSL handshake. SSL handshake.

► The handshake allows The handshake allows the server to authenticate itself to the client using the server to authenticate itself to the client using

public-key techniques, public-key techniques, the client to authenticate itself to the server optionallythe client to authenticate itself to the server optionally the client and the server to cooperate in the creation of the client and the server to cooperate in the creation of

symmetric keys used for rapid encryption, decryption, symmetric keys used for rapid encryption, decryption, and tamper detection during the session that follows. and tamper detection during the session that follows.

Page 38: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

ClientHelloClientHello

ClientKeyExchanClientKeyExchangege

ChangeCipherSpChangeCipherSpecec

FinishFinish

ServerHelloServerHello

CertificateCertificate

ServerHelloDonServerHelloDonee

ChangeCipherSChangeCipherSpecpec

FinishFinish

SSL Session Negotiation: Server SSL Session Negotiation: Server AuthenticationAuthentication

Client Server

Page 39: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

SSL Session Negotiation: Client and SSL Session Negotiation: Client and Server AuthenticationServer Authentication

ClientServer

ClientHelloClientHello

CertificateCertificate

ClientKeyExchangeClientKeyExchange

CertificateVerifyCertificateVerify

ChangeCipherSpecChangeCipherSpec

FinishFinish

ServerHelloServerHello

CertificateCertificate

Certificate RequestCertificate Request

ServerHelloDoneServerHelloDone

ChangeCipherSpecChangeCipherSpec

FinishFinish

Page 41: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

Virtual Private Networks Virtual Private Networks (VPN)(VPN)

What is a VPN?What is a VPN? “…“…a group of two or more computer a group of two or more computer

systems, typically connected to a private systems, typically connected to a private network with limited public-network access, network with limited public-network access, that communicates ‘securely’ over a public that communicates ‘securely’ over a public network.”network.”

““A combination of tunneling, encryption, A combination of tunneling, encryption, authentication and access control authentication and access control technologies and services used to carry technologies and services used to carry trusted traffic over an Untrusted IP network”trusted traffic over an Untrusted IP network”

UntrustedNetwork

Trusted User Trusted ServerFirewall

Encrypted Tunnel

Page 42: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

What makes a VPN secure?What makes a VPN secure? EncryptionEncryption Strong authentication of remote Strong authentication of remote

users and hosts. users and hosts. Mechanisms for hiding or masking Mechanisms for hiding or masking

information about the private information about the private network topology from potential network topology from potential attackersattackers

Virtual Private Networks Virtual Private Networks (VPN)(VPN)

Page 43: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

VPNVPN► If we are going to create a VPN using Internet it If we are going to create a VPN using Internet it

is tempting to make all IP traffic secure.is tempting to make all IP traffic secure.► A VPN may support many different applicationsA VPN may support many different applications

Distributed computing resourcesDistributed computing resources VoIPVoIP SNMP SNMP FTPFTP

► These applications have very different These applications have very different requirements.requirements.

Page 45: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

OutlineOutline

► IP Security OverviewIP Security Overview► IP Security ArchitectureIP Security Architecture►Authentication HeaderAuthentication Header►Encapsulating Security PayloadEncapsulating Security Payload►Combinations of Security Combinations of Security

AssociationsAssociations►Key ManagementKey Management

Page 46: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IPSEC in a few wordsIPSEC in a few words► IPSec is an IETF standard for real-time IPSec is an IETF standard for real-time

communication security.communication security.► In such a protocol, Alice initiates In such a protocol, Alice initiates

communication with a target, Bob. communication with a target, Bob. ► Each side authenticates itself to the other Each side authenticates itself to the other

based on some key that the other side based on some key that the other side associates with it. associates with it.

► Then they establish secret session keys (4 Then they establish secret session keys (4 keys, one for integrity protection, and one keys, one for integrity protection, and one for encryption, for each direction).for encryption, for each direction).

Page 47: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security OverviewIP Security Overview► IPSEC is a framework for security that IPSEC is a framework for security that

operates at the Network Layer by extending operates at the Network Layer by extending the IP Packet Headerthe IP Packet Header

► This gives the ability to encrypt any higher This gives the ability to encrypt any higher layer protocol, including arbitrary TCP and layer protocol, including arbitrary TCP and UDP sessions.UDP sessions.

► This flexibility comes with complexity.This flexibility comes with complexity.► IPSEC’s complexity has be criticized quite IPSEC’s complexity has be criticized quite

severely in the literatureseverely in the literature..

Page 49: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security OverviewIP Security Overview► IPSEC is highly modular. It allows users to select IPSEC is highly modular. It allows users to select

from from a variety of encryption algorithmsa variety of encryption algorithms And specialized security protocolsAnd specialized security protocols

► IPSEC allows users to select from a large menu IPSEC allows users to select from a large menu of security services includingof security services including Access controlAccess control AuthenticationAuthentication ConfidentialityConfidentiality Protection against replay attacksProtection against replay attacks

Page 50: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security ArchitectureIP Security Architecture

► IPSEC has two major components.IPSEC has two major components. The first component is a pair of protocols The first component is a pair of protocols

that implements that implements security servicessecurity services provided by IPSECprovided by IPSEC

The second component provides support The second component provides support for for key managementkey management

Page 51: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security Architecture – Security IP Security Architecture – Security ServicesServices

► In IPSEC security services are provided by a pair In IPSEC security services are provided by a pair of protocolsof protocols The The Authentication HeaderAuthentication Header (AH) protocol provides (AH) protocol provides

► Access controlAccess control► Connectionless message integrityConnectionless message integrity► Authentication Authentication ► Anti-replay protectionAnti-replay protection

The The Encapsulating Security PayloadEncapsulating Security Payload (ESP) protocol (ESP) protocol providesprovides

► All the services provided by AHAll the services provided by AH► ConfidentialityConfidentiality

Page 52: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security Architecture – Key IP Security Architecture – Key ManagementManagement

►Key management is done by a protocol Key management is done by a protocol known as known as Internet Security Association Internet Security Association and Key Management Protocoland Key Management Protocol (ISAKMP) (ISAKMP)

Page 53: Network Security Professor Dr. Adeel Akram. Firewalls, SSL, VPN and IPSec

IP Security ArchitectureIP Security Architecture

► IPSec documents:IPSec documents: RFC 2401: An overview of security RFC 2401: An overview of security

architecturearchitecture RFC 2402: Description of a packet RFC 2402: Description of a packet

encryption extension to IPv4 and IPv6encryption extension to IPv4 and IPv6 RFC 2406: Description of a packet RFC 2406: Description of a packet

encryption extension to IPv4 and IPv6encryption extension to IPv4 and IPv6 RFC 2408: Specification of key RFC 2408: Specification of key

managament capabilitiesmanagament capabilities