firewalls and network defence - university of warwick · pdf file7 firewalls what is a...

23
1 Harjinder Singh Lallie (September 12) 1 Firewalls and Network Defence Learn about traditional perimeter protection Understand the way in which firewalls are used to protect networks Understand the functions and limitations of the three different types of firewall (Packet Inspection, Stateful and Application/Proxy) Consider the use of security zones and topologies to implement network-based security Understand the concept of layered approaches to security Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall Assumptions: Students know about anti-virus software and how it is used on clients and servers Harjinder Singh Lallie (September 12) 2 Lecture Goals

Upload: vokhanh

Post on 06-Feb-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

1

Harjinder Singh Lallie (September 12) 1

Firewalls and Network Defence

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks • Understand the functions and limitations of the three different types of

firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Assumptions:

• Students know about anti-virus software and how it is used on clients and servers

Harjinder Singh Lallie (September 12) 2

Lecture Goals

Page 2: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

2

• Learn about traditional perimeter protection • Understand the way in which firewalls are used to protect

networks

• Understand the functions and limitations of the three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 3

Lecture Goals

Let’s draw some analogies from physical (traditional) security Systems

What do you notice here?

Harjinder Singh Lallie (September 12) 4

Page 3: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

3

Harjinder Singh Lallie (September 12) 5

Harjinder Singh Lallie (September 12) 6

Page 4: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

4

Harjinder Singh Lallie (September 12) 7

Harjinder Singh Lallie (September 12) 8

Page 5: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

5

Harjinder Singh Lallie (September 12) 9

Where do you think the pass (are you in the right place) is checked?

Harjinder Singh Lallie (September 12) 10

Where do you think Malware (bombs) are detected?

Page 6: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

6

Harjinder Singh Lallie (September 12) 11

Do you think any ‘logging’ takes place anywhere?

Layered Security

• Consider the security of a bank

• A layered approach ensures that there is no single point of failure

Harjinder Singh Lallie (September 12) 12

The top most layer looks at ALL the traffic and could never interrogate each packet in intricate detail as that would degrade the performance

A layered approach ensures that there is no single point of failure

Page 7: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

7

Firewalls What is a firewall?

“a network device—hardware, software, or a combination—whose purpose is to enforce a security policy across its connections”

• e.g. A web server connected to the Internet may be configured only to allow traffic on port 80 for HTTP, and have all other ports blocked. An e-mail server may have only necessary ports for e-mail open, with others blocked.

• Apply “principle of least access”

• Firewalls can make one of three decisions: – Accept (allow packet through)

– Drop (discard the packet without informing the sender)

– Reject (inform the source that the packet is rejected)

Harjinder Singh Lallie (September 12) 13

Typical Firewall rules If packet is from inside the network TCP destination port = 80 or TCP destination port = 443,

then allow connection [pass all http traffic to any web server] If packet is from outside TCP destination port = 25 and IP destination address = 60.47.3.35,

then allow connection [pass all SMTP traffic to a specific host (mail server)] If packet is from outside IP Protocol = 51 and IP destination address = 60.47.3.77, then

allow connection *pass all encrypted ESP (encapsulating security payload) traffic to the firm’s IPsec gateway] Deny ALL [deny all other externally initiated connections; this is the default behaviour]

Harjinder Singh Lallie (September 12) 14

In the first example, the rule allows connection to any web server, in the second example, the rule allows a connection to a specific mail server, the second rule is therefore safer

Page 8: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

8

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks • Understand the functions and limitations of the

three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 15

Lecture Goals

Packet Filtering Firewalls

Harjinder Singh Lallie (September 12) 16

Page 9: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

9

The Problem with Packet Filtering Firewalls

Harjinder Singh Lallie (September 12) 17

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks • Understand the functions and limitations of the

three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 18

Lecture Goals

Page 10: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

10

Stateful Firewalls

• Keeps track of the state of network connections (TCP/UDP) and distinguishes legitimate packets in the context of each connection, illegitimate packets are rejected

• Vista and Windows 7 use ‘TCP window scaling’ for non http based connections, this is incompatible with some firewalls that use Stateful Packet Inspection (SPI) such as Checkpoint NG R55, Cisco PIX earlier than v6.3.1, Netgear WGR614

• TCP connections operate in a ‘stateful’ manner wherein a connection opens by connecting to a particular port, the port is then switched over to another port

Harjinder Singh Lallie (September 12) 19

Stateful Firewalls

• A packet can be part of two states – either a packet involved in a new connection (connection opening) or a packet that is part of an ongoing communication

• The former is a more expensive packet to deal with as an SPI firewall has to create entries in the state table, the latter is much cheaper to deal with – in fact most packets tend to belong to the latter – therefore making an SPI firewall cost effective

Harjinder Singh Lallie (September 12) 20

Page 11: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

11

SPI States

Harjinder Singh Lallie (September 12) 21

Stateful Packet Inspection (SPI) New connections

Harjinder Singh Lallie (September 12) 22

Page 12: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

12

Stateful Packet Inspection (SPI) Handling Existing Connections

Harjinder Singh Lallie (September 12) 23

Response from: 60.55.33.12:4400 To:123.80.5.34:80

Harjinder Singh Lallie (September 12) 24

SPI, dealing with attacks

Page 13: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

13

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks • Understand the functions and limitations of the

three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 25

Lecture Goals

Application/Proxy Firewall

Harjinder Singh Lallie (September 12) 26

Page 14: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

14

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks

• Understand the functions and limitations of the three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 27

Lecture Goals

Security Topologies – Security Zones

• Similar in analogy to a castle, a castle has a moat, an outside wall, an inside wall, and even a keep

• Outermost layer in a network provides basic protection and the innermost layers providing the highest level of protection.

• Accessibility tends to be inversely related to level of protection

• The outermost zone is the Internet, a free area, beyond any specific controls and an area where machines are considered at risk, often referred to as the demilitarized zone (DMZ)

Harjinder Singh Lallie (September 12) 28

Page 15: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

15

DMZ

• Typically contains devices accessible to internet traffic (FTP, web, email servers – Forces user to make at least one hop in the DMZ before

accessing information inside the trusted network • Firewall can be used on each side of the DMZ. The area

between these firewalls is accessible from either the inner, secure, network or the Internet. – Firewalls specifically designed to prevent access across

the DMZ directly, from the Internet to the inner, secure, network.

• Special attention should be paid to the security settings of network devices placed in the DMZ, always assumed to be compromised to unauthorized use

• Certain servers should NOT be accessible from the outside – e.g: Domain name servers, database servers, application servers, file servers, print servers etc

Harjinder Singh Lallie (September 12) 29

Demilitarised Zones

Harjinder Singh Lallie (September 12) 30

Page 16: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

16

A Dual Homed Firewall

Harjinder Singh Lallie (September 12) 31

Two legged firewall with fully exposed DMZ

Harjinder Singh Lallie (September 12) 32

Page 17: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

17

Three legged firewall

Harjinder Singh Lallie (September 12) 33

How a DMZ works

Harjinder Singh Lallie (September 12) 34

Page 18: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

18

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks • Understand the functions and limitations of the three different

types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 35

Lecture Goals

A VPN attack with just one firewall

Harjinder Singh Lallie (September 12) 36

Page 19: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

19

A VPN attack with two firewalls (the layered approach)

Harjinder Singh Lallie (September 12) 37

An example of how a layered approach works

As an example, consider the steps an intruder might have to take to access critical data held within a company’s back-end database. The intruder will first need to penetrate the firewall and use packets and methods that will not be identified and detected by the intrusion detection system. The attacker will then have to circumvent an internal router performing packet filtering and possibly penetrate another firewall that is used to separate one internal network from another. From here, the intruder must break the access controls that are on the database, which means having to do a dictionary or brute-force attack to be able to authenticate to the database software. Once the intruder has gotten this far, the data still needs to be located within the database. This may in turn be complicated by the use of access control lists outlining who can actually view or modify the data. That is a lot of work.

Harjinder Singh Lallie (September 12) 38

Page 20: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

20

Diversity of Defence • Having added a number of layers, if each of the layers is

the ‘same’, then it achieves nothing as perpetrating one layer perpetrates all of them

• E.g. two firewalls which filter for different types of traffic and provide different types of restriction. – Firewall 1: no FTP, SNMP or Telnet – Firewall 2: no SSL or SSH

• E.g. Use products from different vendors – Checkpoint firewall is first line of defence (see above) – CISCO PX is second line of defence

Harjinder Singh Lallie (September 12) 39

Downside is the amount of extra training/administrational time required to service this (upgrades, patches KNOW THE IMPLICATIONS)

What this configuration achieves

• Separates user from the request for data on a secure network

• This layered approach allows significant security levels to be enforced as this filtering process can put controls in place.

• Scalability is more easily realized. The multiple-server solution can be made to be very scalable to literally millions of users, without slowing down any particular layer.

Harjinder Singh Lallie (September 12) 40

Page 21: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

21

• Learn about traditional perimeter protection

• Understand the way in which firewalls are used to protect networks

• Understand the functions and limitations of the three different types of firewall (Packet Inspection, Stateful and Application/Proxy)

• Consider the use of security zones and topologies to implement network-based security

• Understand the concept of layered approaches to security

• Understand some of the considerations that need to be deployed in the purchase/deployment of a firewall

Harjinder Singh Lallie (September 12) 41

Lecture Goals

Compliance

For a firewall to be deployed by a data centre that processes credit card numbers, it must

comply with the PCI DSS requirements pertaining to the installation and maintenance

of a firewall configuration to protect cardholder data. These requirements are built into the

Firewall tests conducted by ICSA Labs.

Harjinder Singh Lallie (September 12) 42

Page 22: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

22

Considerations to be made when deploying network defence equipment

• Data throughput – the size of data the firewall can handle ‘in theory’

• Concurrent connections

• Connections per second

Harjinder Singh Lallie (September 12) 43

Throughput vs concurrent connections

• Data throughput is rated in Gbps, e.g. 1 Gbps or 4 Gbps - however, the amount of data that can be ‘throughput’ is not the full story.

• During a distributed denial-of-service (DDoS) attack, it’s not just bulk throughput that matters; it’s how the device can handle concurrent connections and connections per second. – A typical £32,000 conventional firewall may have a throughput of 10 Gbps, it can

probably handle between 1 and 2 million concurrent connections

– The WikiLeaks attackers of 2010 generated more than 2 million concurrent connections using a single botnet

– The next level of firewall (between £64,000 and £96,000) can handle around 4 to 10 million connections per second

Harjinder Singh Lallie (September 12) 44

Page 23: Firewalls and Network Defence - University of Warwick · PDF file7 Firewalls What is a firewall? “a network device—hardware, software, or a combination—whose purpose is to enforce

23

… vs Connections per second

• The “£32,000 firewall” can typically handle 50,000 to 100,000 new connections per second

• When a firewall performs stateful inspection, there is a performance penalty for each TCP session set up (the time it takes to process the packet, memory requirements etc). This has an adverse affect on the number of new connections per second it can process – exaggerated especially when the attack is very widely distributed (‘very’ DDoS).

Harjinder Singh Lallie (September 12) 45