CH12NetSec6e_accessiblePPT.pptx

Network Security Essentials: Applications and Standards

Sixth Edition

Chapter 12

Firewalls

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

If this PowerPoint presentation contains mathematical equations, you may need to check that your computer has the following installed:

1) MathType Plugin

2) Math Player (free versions available)

3) NVDA Reader (free versions available)

There are application-specific security mechanisms for a number of application

areas, including electronic mail (S/MIME, PGP), client/server (Kerberos), Web access

(Secure Sockets Layer), and others. However, users have security concerns that

cut across protocol layers. For example, an enterprise can run a secure, private IP

network by disallowing links to untrusted sites, encrypting packets that leave the

premises, and authenticating packets that enter the premises. By implementing security

at the IP level, an organization can ensure secure networking not only for

applications that have security mechanisms but also for the many security-ignorant

applications.

IP-level security encompasses three functional areas: authentication, confidentiality,

and key management. The authentication mechanism assures that a received

packet was, in fact, transmitted by the party identified as the source in the packet

header. In addition, this mechanism assures that the packet has not been altered in

transit. The confidentiality facility enables communicating nodes to encrypt messages

to prevent eavesdropping by third parties. The key management facility is concerned

with the secure exchange of keys.

We begin this chapter with an overview of IP security (IPsec) and an introduction

to the IPsec architecture. We then look at each of the three functional areas in

detail. Appendix D reviews Internet protocols.

The Need for firewalls (1 of 2)

Internet connectivity is no longer optional for organizations

Individual users within the organization want and need Internet access

While Internet access provides benefits to the organization, it enables the outside world to reach and interact with local network assets

This creates a threat to the organization

While it is possible to equip each workstation and server on the premises network with strong security features, this may not be sufficient and in some cases is not cost-effective

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Information systems in corporations, government agencies, and other organizations

have undergone a steady evolution. The following are notable developments:

• Centralized data processing system, with a central mainframe supporting a

number of directly connected terminals

• Local area networks (LANs) interconnecting PCs and terminals to each other

and the mainframe

• Premises network, consisting of a number of LANs, interconnecting PCs,

servers, and perhaps a mainframe or two

• Enterprise-wide network, consisting of multiple, geographically distributed

premises networks interconnected by a private wide area network (WAN)

• Internet connectivity, in which the various premises networks all hook into the

Internet and may or may not also be connected by a private WAN

Internet connectivity is no longer optional for organizations. The information

and services available are essential to the organization. Moreover, individual users

within the organization want and need Internet access, and if this is not provided via

their LAN, they will use dial-up capability from their PC to an Internet service provider

(ISP). However, while Internet access provides benefits to the organization, it

enables the outside world to reach and interact with local network assets. This creates

a threat to the organization. While it is possible to equip each workstation and

server on the premises network with strong security features, such as intrusion protection,

this may not be sufficient and in some cases is not cost-effective. Consider

a network with hundreds or even thousands of systems, running various operating

systems, such as different versions of UNIX and Windows. When a security flaw

is discovered, each potentially affected system must be upgraded to fix that flaw.

This requires scaleable configuration management and aggressive patching to function

effectively. While difficult, this is possible and is necessary if only host-based

security is used. A widely accepted alternative or at least complement to host-based

security services is the firewall. The firewall is inserted between the premises network

and the Internet to establish a controlled link and to erect an outer security

wall or perimeter. The aim of this perimeter is to protect the premises network from

Internet-based attacks and to provide a single choke point where security and auditing

can be imposed. The firewall may be a single computer system or a set of two or

more systems that cooperate to perform the firewall function.

The firewall, then, provides an additional layer of defense, insulating the

internal systems from external networks. This follows the classic military doctrine of

“defense in depth,” which is just as applicable to IT security.

2

The Need for firewalls (2 of 2)

Firewall

An alternative, or at least complement, to host-based security services

Is inserted between the premises network and the Internet to establish a controlled link and to erect an outer security wall or perimeter

The aim of this perimeter is to protect the premises network from Internet-based attacks and to provide a single choke point where security and auditing can be imposed

May be a single computer system or a set of two or more systems that cooperate to perform the firewall function

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Information systems in corporations, government agencies, and other organizations

have undergone a steady evolution. The following are notable developments:

• Centralized data processing system, with a central mainframe supporting a

number of directly connected terminals

• Local area networks (LANs) interconnecting PCs and terminals to each other

and the mainframe

• Premises network, consisting of a number of LANs, interconnecting PCs,

servers, and perhaps a mainframe or two

• Enterprise-wide network, consisting of multiple, geographically distributed

premises networks interconnected by a private wide area network (WAN)

• Internet connectivity, in which the various premises networks all hook into the

Internet and may or may not also be connected by a private WAN

Internet connectivity is no longer optional for organizations. The information

and services available are essential to the organization. Moreover, individual users

within the organization want and need Internet access, and if this is not provided via

their LAN, they will use dial-up capability from their PC to an Internet service provider

(ISP). However, while Internet access provides benefits to the organization, it

enables the outside world to reach and interact with local network assets. This creates

a threat to the organization. While it is possible to equip each workstation and

server on the premises network with strong security features, such as intrusion protection,

this may not be sufficient and in some cases is not cost-effective. Consider

a network with hundreds or even thousands of systems, running various operating

systems, such as different versions of UNIX and Windows. When a security flaw

is discovered, each potentially affected system must be upgraded to fix that flaw.

This requires scaleable configuration management and aggressive patching to function

effectively. While difficult, this is possible and is necessary if only host-based

security is used. A widely accepted alternative or at least complement to host-based

security services is the firewall. The firewall is inserted between the premises network

and the Internet to establish a controlled link and to erect an outer security

wall or perimeter. The aim of this perimeter is to protect the premises network from

Internet-based attacks and to provide a single choke point where security and auditing

can be imposed. The firewall may be a single computer system or a set of two or

more systems that cooperate to perform the firewall function.

The firewall, then, provides an additional layer of defense, insulating the

internal systems from external networks. This follows the classic military doctrine of

“defense in depth,” which is just as applicable to IT security.

3

Firewall characteristics (1 of 2)

Design goals for a firewall:

All traffic from inside to outside, and vice versa, must pass through the firewall

Only authorized traffic, as defined by the local security policy, will be allowed to pass

The firewall itself is immune to penetration

Characteristics that a firewall access policy could use to filter traffic:

I P Address and Protocol Values

Controls access based on the source or destination addresses and port numbers, direction of flow being inbound or outbound, and other network and transport layer characteristics

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

[BELL94] lists the following design goals for a firewall:

1. All traffic from inside to outside, and vice versa, must pass through the firewall.

This is achieved by physically blocking all access to the local network

except via the firewall. Various configurations are possible, as explained later

in this chapter.

2. Only authorized traffic, as defined by the local security policy, will be allowed

to pass. Various types of firewalls are used, which implement various types of

security policies, as explained later in this chapter.

3. The firewall itself is immune to penetration. This implies the use of a hardened

system with a secured operating system. Trusted computer systems are

suitable for hosting a firewall and often required in government applications.

A critical component in the planning and implementation of a firewall is

specifying a suitable access policy. This lists the types of traffic authorized to pass

through the firewall, including address ranges, protocols, applications, and content

types. This policy should be developed from the organization’s information security

risk assessment and policy. This policy should be developed from a broad specification

of which traffic types the organization needs to support. It is then refined to

detail the filter elements we discuss next, which can then be implemented within an

appropriate firewall topology.

SP 800-41-1 (Guidelines on Firewalls and Firewall Policy , September 2009)

lists a range of characteristics that a firewall access policy could use to filter traffic,

including:

■ IP Address and Protocol Values: Controls access based on the source or

destination addresses and port numbers, direction of flow being inbound or

outbound, and other network and transport layer characteristics. This type of

filtering is used by packet filter and stateful inspection firewalls. It is typically

used to limit access to specific services.

■ Application Protocol: Controls access on the basis of authorized application

protocol data. This type of filtering is used by an application-level gateway

that relays and monitors the exchange of information for specific application

protocols, for example, checking SMTP e-mail for spam, or HTPP Web

requests to authorized sites only.

■ User Identity: Controls access based on the users identity, typically for inside

users who identify themselves using some form of secure authentication technology,

such as IPSec (Chapter 9).

■ Network Activity: Controls access based on considerations such as the time

or request, for example, only in business hours; rate of requests, for example,

to detect scanning attempts; or other activity patterns.

4

Firewall characteristics (2 of 2)

Application Protocol

Controls access on the basis of authorized application protocol data

User Identity

Controls access based on the user’s identity, typically for inside users who identify themselves using some form of secure authentication technology, such as I P Sec

Network Activity

Controls access based on considerations such as the time or request

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

[BELL94] lists the following design goals for a firewall:

1. All traffic from inside to outside, and vice versa, must pass through the firewall.

This is achieved by physically blocking all access to the local network

except via the firewall. Various configurations are possible, as explained later

in this chapter.

2. Only authorized traffic, as defined by the local security policy, will be allowed

to pass. Various types of firewalls are used, which implement various types of

security policies, as explained later in this chapter.

3. The firewall itself is immune to penetration. This implies the use of a hardened

system with a secured operating system. Trusted computer systems are

suitable for hosting a firewall and often required in government applications.

A critical component in the planning and implementation of a firewall is

specifying a suitable access policy. This lists the types of traffic authorized to pass

through the firewall, including address ranges, protocols, applications, and content

types. This policy should be developed from the organization’s information security

risk assessment and policy. This policy should be developed from a broad specification

of which traffic types the organization needs to support. It is then refined to

detail the filter elements we discuss next, which can then be implemented within an

appropriate firewall topology.

SP 800-41-1 (Guidelines on Firewalls and Firewall Policy , September 2009)

lists a range of characteristics that a firewall access policy could use to filter traffic,

including:

■ IP Address and Protocol Values: Controls access based on the source or

destination addresses and port numbers, direction of flow being inbound or

outbound, and other network and transport layer characteristics. This type of

filtering is used by packet filter and stateful inspection firewalls. It is typically

used to limit access to specific services.

■ Application Protocol: Controls access on the basis of authorized application

protocol data. This type of filtering is used by an application-level gateway

that relays and monitors the exchange of information for specific application

protocols, for example, checking SMTP e-mail for spam, or HTPP Web

requests to authorized sites only.

■ User Identity: Controls access based on the users identity, typically for inside

users who identify themselves using some form of secure authentication technology,

such as IPSec (Chapter 9).

■ Network Activity: Controls access based on considerations such as the time

or request, for example, only in business hours; rate of requests, for example,

to detect scanning attempts; or other activity patterns.

5

Firewall expectations

A firewall

Defines a single choke point that keeps unauthorized users out of the protected network, prohibits potentially vulnerable services from entering or leaving the network, and provides protection from various kinds of I P spoofing and routing attacks

Provides a location for monitoring security-related events

Is a convenient platform for several Internet functions that are not security related

Can serve as the platform for I P sec

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Before proceeding to the details of firewall types and configurations, it is best

to summarize what one can expect from a firewall. The following capabilities are

within the scope of a firewall:

1. A firewall defines a single choke point that keeps unauthorized users out of

the protected network, prohibits potentially vulnerable services from entering

or leaving the network, and provides protection from various kinds of IP

spoofing and routing attacks. The use of a single choke point simplifies security

management because security capabilities are consolidated on a single

system or set of systems.

2. A firewall provides a location for monitoring security-related events. Audits

and alarms can be implemented on the firewall system.

3. A firewall is a convenient platform for several Internet functions that are not

security related. These include a network address translator, which maps local

addresses to Internet addresses, and a network management function that

audits or logs Internet usage.

4. A firewall can serve as the platform for IPsec. Using the tunnel mode capability

described in Chapter 9, the firewall can be used to implement virtual

private networks.

6

Firewall limitations

A Firewall

Cannot protect against attacks that bypass the firewall

May not protect fully against internal threats, such as a disgruntled employee or an employee who unwittingly cooperates with an external attacker

Cannot guard against wireless communications between local systems on different sides of the internal firewall

A laptop, P D A, or portable storage device may be used and infected outside the corporate network, and then attached and used internally

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Firewalls have their limitations, including the following:

1. The firewall cannot protect against attacks that bypass the firewall. Internal

systems may have dial-out capability to connect to an ISP. An internal LAN

may support a modem pool that provides dial-in capability for traveling

employees and telecommuters.

2. The firewall may not protect fully against internal threats, such as a disgruntled

employee or an employee who unwittingly cooperates with an external

attacker.

3. An improperly secured wireless LAN may be accessed from outside the

organization. An internal firewall that separates portions of an enterprise

network cannot guard against wireless communications between local

systems on different sides of the internal firewall.

4. A laptop, PDA, or portable storage device may be used and infected outside

the corporate network, and then attached and used internally.

7

Figure 12.1 Types of Firewalls

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

8

A packet filtering firewall applies a set of rules to each incoming and outgoing

IP packet and then forwards or discards the packet (Figure 12.1b). The firewall

is typically configured to filter packets going in both directions (from and to

the internal network). Filtering rules are based on information contained in a

network packet:

• Source IP address: The IP address of the system that originated the IP packet

(e.g., 192.178.1.1)

• Destination IP address: The IP address of the system the IP packet is trying to

reach (e.g., 192.168.1.2)

• Source and destination transport-level address: The transport-level (e.g., TCP

or UDP) port number, which defines applications such as SNMP or TELNET

• IP protocol field: Defines the transport protocol

• Interface: For a firewall with three or more ports, which interface of the

firewall the packet came from or which interface of the firewall the packet is

destined for

The packet filter is typically set up as a list of rules based on matches to fields

in the IP or TCP header. If there is a match to one of the rules, that rule is invoked

to determine whether to forward or discard the packet. If there is no match to any

rule, then a default action is taken. Two default policies are possible:

• Default discard: That which is not expressly permitted is prohibited.

• Default forward: That which is not expressly prohibited is permitted.

The default discard policy is more conservative. Initially, everything is

blocked, and services must be added on a case-by-case basis. This policy is more

visible to users, who are more likely to see the firewall as a hindrance. However,

this is the policy likely to be preferred by businesses and government organizations.

Further, visibility to users diminishes as rules are created. The default forward

policy increases ease of use for end users but provides reduced security; the

security administrator must, in essence, react to each new security threat as it

becomes known. This policy may be used by generally more open organizations,

such as universities.

Table 12.1 Packet-Filtering Example

Rule Direction Src address Dest address Protocol Dest port Action
A In External Internal T C P 25 Permit
B Out Internal External T C P >1023 Permit
C Out Internal External T C P 25 Permit
D In External Internal T C P >1023 Permit
E Either Any Any Any Any Deny

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Table 12.1 is a simplified example of a ruleset for SMTP traffic. The goal is to

allow inbound and outbound e-mail traffic but to block all other traffic. The rules

are applied top to bottom to each packet.

A. Inbound mail from an external source is allowed (port 25 is for SMTP

incoming).

B. This rule is intended to allow a response to an inbound SMTP connection.

C. Outbound mail to an external source is allowed.

D. This rule is intended to allow a response to an inbound SMTP connection.

E. This is an explicit statement of the default policy. All rulesets include this rule

implicitly as the last rule.

9

Packet Filtering firewalls (1 of 2)

Weaknesses

Because packet filter firewalls do not examine upper-layer data, they cannot prevent attacks that employ application-specific vulnerabilities or functions

Because of the limited information available to the firewall, the logging functionality present in packet filter firewalls is limited

Most packet filter firewalls do not support advanced user authentication schemes

Packet filter firewalls are generally vulnerable to attacks and exploits that take advantage of problems within the T C P/I P specification and protocol stack

Due to the small number of variables used in access control decisions, packet filter firewalls are susceptible to security breaches caused by improper configurations

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

One advantage of a packet filtering firewall is its simplicity. Also, packet

filters typically are transparent to users and are very fast. [SCAR09b] lists the

following weaknesses of packet filter firewalls:

• Because packet filter firewalls do not examine upper-layer data, they cannot

prevent attacks that employ application-specific vulnerabilities or functions.

For example, a packet filter firewall cannot block specific application

commands; if a packet filter firewall allows a given application, all functions

available within that application will be permitted.

• Because of the limited information available to the firewall, the logging functionality

present in packet filter firewalls is limited. Packet filter logs normally

contain the same information used to make access control decisions (source

address, destination address, and traffic type).

• Most packet filter firewalls do not support advanced user authentication

schemes. Once again, this limitation is mostly due to the lack of upper-layer

functionality by the firewall.

• Packet filter firewalls are generally vulnerable to attacks and exploits that take

advantage of problems within the TCP/IP specification and protocol stack,

such as network layer address spoofing . Many packet filter firewalls cannot

detect a network packet in which the OSI Layer 3 addressing information has

been altered. Spoofing attacks are generally employed by intruders to bypass

the security controls implemented in a firewall platform.

• Finally, due to the small number of variables used in access control decisions,

packet filter firewalls are susceptible to security breaches caused by improper

configurations. In other words, it is easy to accidentally configure a packet

filter firewall to allow traffic types, sources, and destinations that should be

denied based on an organization’s information security policy.

10

Packet Filtering firewalls (2 of 2)

Strengths

Its simplicity

Transparent to users and are very fast

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

One advantage of a packet filtering firewall is its simplicity. Also, packet

filters typically are transparent to users and are very fast. [SCAR09b] lists the

following weaknesses of packet filter firewalls:

• Because packet filter firewalls do not examine upper-layer data, they cannot

prevent attacks that employ application-specific vulnerabilities or functions.

For example, a packet filter firewall cannot block specific application

commands; if a packet filter firewall allows a given application, all functions

available within that application will be permitted.

• Because of the limited information available to the firewall, the logging functionality

present in packet filter firewalls is limited. Packet filter logs normally

contain the same information used to make access control decisions (source

address, destination address, and traffic type).

• Most packet filter firewalls do not support advanced user authentication

schemes. Once again, this limitation is mostly due to the lack of upper-layer

functionality by the firewall.

• Packet filter firewalls are generally vulnerable to attacks and exploits that take

advantage of problems within the TCP/IP specification and protocol stack,

such as network layer address spoofing . Many packet filter firewalls cannot

detect a network packet in which the OSI Layer 3 addressing information has

been altered. Spoofing attacks are generally employed by intruders to bypass

the security controls implemented in a firewall platform.

• Finally, due to the small number of variables used in access control decisions,

packet filter firewalls are susceptible to security breaches caused by improper

configurations. In other words, it is easy to accidentally configure a packet

filter firewall to allow traffic types, sources, and destinations that should be

denied based on an organization’s information security policy.

11

Attacks and countermeasures (1 of 2)

I P address spoofing

The intruder transmits packets from the outside with a source I P address field containing an address of an internal host

Countermeasure is to discard packets with an inside source address if the packet arrives on an external interface

Source routing attacks

The source station specifies the route that a packet should take as it crosses the internet, in the hopes that this will bypass security measures that do not analyze the source routing information

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Some of the attacks that can be made on packet filtering firewalls and the appropriate

countermeasures are the following:

• IP address spoofing: The intruder transmits packets from the outside with a

source IP address field containing an address of an internal host. The attacker

hopes that the use of a spoofed address will allow penetration of systems that

employ simple source address security, in which packets from specific trusted

internal hosts are accepted. The countermeasure is to discard packets with an

inside source address if the packet arrives on an external interface. In fact, this

countermeasure is often implemented at the router external to the firewall.

• Source routing attacks: The source station specifies the route that a packet

should take as it crosses the Internet, in the hopes that this will bypass security

measures that do not analyze the source routing information. The countermeasure

is to discard all packets that use this option.

• Tiny fragment attacks: The intruder uses the IP fragmentation option to create

extremely small fragments and force the TCP header information into a

separate packet fragment. This attack is designed to circumvent filtering rules

that depend on TCP header information. Typically, a packet filter will make a

filtering decision on the first fragment of a packet. All subsequent fragments

of that packet are filtered out solely on the basis that they are part of the

packet whose first fragment was rejected. The attacker hopes that the filtering

firewall examines only the first fragment and that the remaining fragments

are passed through. A tiny fragment attack can be defeated by enforcing a

rule that the first fragment of a packet must contain a predefined minimum

amount of the transport header. If the first fragment is rejected, the filter can

remember the packet and discard all subsequent fragments.

12

Attacks and countermeasures (2 of 2)

Countermeasure is to discard all packets that use this option

Tiny fragment attacks

The intruder uses the I P fragmentation option to create extremely small fragments and force the T C P header information into a separate packet fragment

Countermeasure is to enforce a rule that the first fragment of a packet must contain a predefined minimum amount of the transport header

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Some of the attacks that can be made on packet filtering firewalls and the appropriate

countermeasures are the following:

• IP address spoofing: The intruder transmits packets from the outside with a

source IP address field containing an address of an internal host. The attacker

hopes that the use of a spoofed address will allow penetration of systems that

employ simple source address security, in which packets from specific trusted

internal hosts are accepted. The countermeasure is to discard packets with an

inside source address if the packet arrives on an external interface. In fact, this

countermeasure is often implemented at the router external to the firewall.

• Source routing attacks: The source station specifies the route that a packet

should take as it crosses the Internet, in the hopes that this will bypass security

measures that do not analyze the source routing information. The countermeasure

is to discard all packets that use this option.

• Tiny fragment attacks: The intruder uses the IP fragmentation option to create

extremely small fragments and force the TCP header information into a

separate packet fragment. This attack is designed to circumvent filtering rules

that depend on TCP header information. Typically, a packet filter will make a

filtering decision on the first fragment of a packet. All subsequent fragments

of that packet are filtered out solely on the basis that they are part of the

packet whose first fragment was rejected. The attacker hopes that the filtering

firewall examines only the first fragment and that the remaining fragments

are passed through. A tiny fragment attack can be defeated by enforcing a

rule that the first fragment of a packet must contain a predefined minimum

amount of the transport header. If the first fragment is rejected, the filter can

remember the packet and discard all subsequent fragments.

13

Table 12.2 Example Stateful Firewall Connection State Table [S C A R 09b]

Source Address Source Port Destination Address Destination Port Connection State
192.168.1.100 1030 210.22.88.29 80 Established
192.168.1.102 1031 216.32.42.123 80 Established
192.168.1.101 1033 173.66.32.122 25 Established
192.168.1.106 1035 177.231.32.12 79 Established
223.43.21.231 1990 192.168.1.6 80 Established
2122.22.123.32 2112 192.168.1.6 80 Established
210.922.212.18 3321 192.168.1.6 80 Established
24.102.32.23 1025 192.168.1.6 80 Established
223.21.22.12 1046 192.168.1.6 80 Established

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

14

A stateful inspection packet firewall tightens up the rules for TCP traffic by

creating a directory of outbound TCP connections, as shown in Table 12.2. There is

an entry for each currently established connection. The packet filter will now allow

incoming traffic to high-numbered ports only for those packets that fit the profile of

one of the entries in this directory.

A stateful packet inspection firewall reviews the same packet information

as a packet filtering firewall, but also records information about TCP connections

(Figure 12.1c). Some stateful firewalls also keep track of TCP sequence numbers

to prevent attacks that depend on the sequence number, such as session hijacking.

Some even inspect limited amounts of application data for some well-known

protocols like FTP, IM and SIPS commands, in order to identify and track related

connections.

Application Level Gateway

Also called an application proxy

Acts as a relay of application-level traffic

If the gateway does not implement the proxy code for a specific application, the service is not supported and cannot be forwarded across the firewall

The gateway can be configured to support only specific features of an application that the network administrator considers acceptable while denying all other features

Tend to be more secure than packet filters

Disadvantage:

The additional processing overhead on each connection

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

15

An application-level gateway, also called an application proxy , acts as a relay of

application-level traffic (Figure 12.1d). The user contacts the gateway using a TCP/

IP application, such as Telnet or FTP, and the gateway asks the user for the name

of the remote host to be accessed. When the user responds and provides a valid

user ID and authentication information, the gateway contacts the application on

the remote host and relays TCP segments containing the application data between

the two endpoints. If the gateway does not implement the proxy code for a specific

application, the service is not supported and cannot be forwarded across the firewall.

Further, the gateway can be configured to support only specific features of an

application that the network administrator considers acceptable while denying all

other features.

Application-level gateways tend to be more secure than packet filters. Rather

than trying to deal with the numerous possible combinations that are to be allowed

and forbidden at the TCP and IP level, the application-level gateway need only

scrutinize a few allowable applications. In addition, it is easy to log and audit all

incoming traffic at the application level.

A prime disadvantage of this type of gateway is the additional processing

overhead on each connection. In effect, there are two spliced connections between

the end users, with the gateway at the splice point, and the gateway must examine

and forward all traffic in both directions.

Circuit-Level Gateway

Also called circuit-level proxy

Can be a stand-alone system or it can be a specialized function performed by an application-level gateway for certain applications

Does not permit an end-to-end T C P connection

The security function consists of determining which connections will be allowed

Typical use is a situation in which the system administrator trusts the internal users

Can be configured to support application-level or proxy service on inbound connections and circuit-level functions for outbound connections

Example of implementation is the S O C K S package

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

16

A fourth type of firewall is the circuit-level gateway or circuit-level proxy

(Figure 12.1e). This can be a stand-alone system or it can be a specialized function

performed by an application-level gateway for certain applications. As with

an application gateway, a circuit-level gateway does not permit an end-to-end TCP

connection; rather, the gateway sets up two TCP connections, one between itself

and a TCP user on an inner host and one between itself and a TCP user on an outside

host. Once the two connections are established, the gateway typically relays

TCP segments from one connection to the other without examining the contents.

The security function consists of determining which connections will be allowed.

A typical use of circuit-level gateways is a situation in which the system administrator

trusts the internal users. The gateway can be configured to support

application-level or proxy service on inbound connections and circuit-level functions

for outbound connections. In this configuration, the gateway can incur the processing

overhead of examining incoming application data for forbidden functions

but does not incur that overhead on outgoing data.

An example of a circuit-level gateway implementation is the SOCKS package

[KOBL92]; version 5 of SOCKS is specified in RFC 1928. The RFC defines SOCKS

in the following fashion:

The protocol described here is designed to provide a framework for

client-server applications in both the TCP and UDP domains to conveniently

and securely use the services of a network firewall. The

protocol is conceptually a “shim-layer” between the application layer

and the transport layer, and as such does not provide network-

layer gateway services, such as forwarding of ICMP messages.

SOCKS consists of the following components:

• The SOCKS server, which often runs on a UNIX-based firewall. SOCKS is

also implemented on Windows systems.

• The SOCKS client library, which runs on internal hosts protected by the firewall.

• SOCKS-ified versions of several standard client programs such as FTP and

TELNET. The implementation of the SOCKS protocol typically involves

either the recompilation or relinking of TCP-based client applications or the

use of alternate dynamically loaded libraries, to use the appropriate encapsulation

routines in the SOCKS library.

When a TCP-based client wishes to establish a connection to an object that is

reachable only via a firewall (such determination is left up to the implementation),

it must open a TCP connection to the appropriate SOCKS port on the SOCKS

server system. The SOCKS service is located on TCP port 1080. If the connection

request succeeds, the client enters a negotiation for the authentication method to

be used, authenticates with the chosen method, and then sends a relay request. The

SOCKS server evaluates the request and either establishes the appropriate connection

or denies it. UDP exchanges are handled in a similar fashion. In essence, a TCP

connection is opened to authenticate a user to send and receive UDP segments, and

the UDP segments are forwarded as long as the TCP connection is open.

Bastion Host (1 of 2)

A system identified by the firewall administrator as a critical strong point in the network’s security

Typically serves as a platform for an application-level or circuit-level gateway

Common characteristics:

Executes a secure version of its operating system, making it a hardened system

Only the services that the network administrator considers essential are installed

May require additional authentication before a user is allowed access to the proxy services

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

17

A bastion host is a system identified by the firewall administrator as a critical strong

point in the network’s security. Typically, the bastion host serves as a platform for

an application-level or circuit-level gateway. Common characteristics of a bastion

host are as follows:

• The bastion host hardware platform executes a secure version of its operating

system, making it a hardened system.

• Only the services that the network administrator considers essential are

installed on the bastion host. These could include proxy applications for DNS,

FTP, HTTP, and SMTP.

• The bastion host may require additional authentication before a user is

allowed access to the proxy services. In addition, each proxy service may

require its own authentication before granting user access.

• Each proxy is configured to support only a subset of the standard application’s

command set.

• Each proxy is configured to allow access only to specific host systems. This

means that the limited command/feature set may be applied only to a subset

of systems on the protected network.

• Each proxy maintains detailed audit information by logging all traffic, each

connection, and the duration of each connection. The audit log is an essential

tool for discovering and terminating intruder attacks.

• Each proxy module is a very small software package specifically designed for

network security. Because of its relative simplicity, it is easier to check such

modules for security flaws. For example, a typical UNIX mail application may

contain over 20,000 lines of code, while a mail proxy may contain fewer than 1000.

• Each proxy is independent of other proxies on the bastion host. If there is a

problem with the operation of any proxy, or if a future vulnerability is discovered,

it can be uninstalled without affecting the operation of the other proxy

applications. Also, if the user population requires support for a new service, the

network administrator can easily install the required proxy on the bastion host.

• A proxy generally performs no disk access other than to read its initial configuration

file. Hence, the portions of the file system containing executable code

can be made read only. This makes it difficult for an intruder to install Trojan

horse sniffers or other dangerous files on the bastion host.

• Each proxy runs as a nonprivileged user in a private and secured directory on

the bastion host.

Bastion Host (2 of 2)

Each proxy is configured to support only a subset of the standard application’s command set

Each proxy is configured to allow access only to specific host systems

Each proxy maintains detailed audit information by logging all traffic, each connection, and the duration of each connection

Each proxy module is a very small software package specifically designed for network security

Each proxy is independent of other proxies on the bastion host

A proxy generally performs no disk access other than to read its initial configuration file

Each proxy runs as a nonprivileged user in a private and secured directory on the bastion host

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

A bastion host is a system identified by the firewall administrator as a critical strong

point in the network’s security. Typically, the bastion host serves as a platform for

an application-level or circuit-level gateway. Common characteristics of a bastion

host are as follows:

• The bastion host hardware platform executes a secure version of its operating

system, making it a hardened system.

• Only the services that the network administrator considers essential are

installed on the bastion host. These could include proxy applications for DNS,

FTP, HTTP, and SMTP.

• The bastion host may require additional authentication before a user is

allowed access to the proxy services. In addition, each proxy service may

require its own authentication before granting user access.

• Each proxy is configured to support only a subset of the standard application’s

command set.

• Each proxy is configured to allow access only to specific host systems. This

means that the limited command/feature set may be applied only to a subset

of systems on the protected network.

• Each proxy maintains detailed audit information by logging all traffic, each

connection, and the duration of each connection. The audit log is an essential

tool for discovering and terminating intruder attacks.

• Each proxy module is a very small software package specifically designed for

network security. Because of its relative simplicity, it is easier to check such

modules for security flaws. For example, a typical UNIX mail application may

contain over 20,000 lines of code, while a mail proxy may contain fewer than 1000.

• Each proxy is independent of other proxies on the bastion host. If there is a

problem with the operation of any proxy, or if a future vulnerability is discovered,

it can be uninstalled without affecting the operation of the other proxy

applications. Also, if the user population requires support for a new service, the

network administrator can easily install the required proxy on the bastion host.

• A proxy generally performs no disk access other than to read its initial configuration

file. Hence, the portions of the file system containing executable code

can be made read only. This makes it difficult for an intruder to install Trojan

horse sniffers or other dangerous files on the bastion host.

• Each proxy runs as a nonprivileged user in a private and secured directory on

the bastion host.

18

Host-Based Firewall

A software module used to secure an individual host

Is available in many operating systems or can be provided as an add-on package

Filters and restricts the flow of packets

Common location is a server

Advantages:

Filtering rules can be tailored to the host environment

Protection is provided independent of topology

Used in conjunction with stand-alone firewalls, provides an additional layer of protection

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

A host-based firewall is a software module used to secure an individual host. Such

modules are available in many operating systems or can be provided as an add-on

package. Like conventional stand-alone firewalls, host-resident firewalls filter and

restrict the flow of packets. A common location for such firewalls is a server. There

are several advantages to the use of a server-based or workstation-based firewall:

• Filtering rules can be tailored to the host environment. Specific corporate security

policies for servers can be implemented, with different filters for servers

used for different application.

• Protection is provided independent of topology. Thus both internal and external

attacks must pass through the firewall.

• Used in conjunction with stand-alone firewalls, the host-based firewall provides

an additional layer of protection. A new type of server can be added to

the network, with its own firewall, without the necessity of altering the network

firewall configuration.

19

Personal Firewall

Controls the traffic between a personal computer or workstation on one side and the Internet or enterprise network on the other side

Can be used in the home environment and on corporate intranets

Typically is a software module on the personal computer

Can also be housed in a router that connects all of the home computers to a D S L, cable modem, or other Internet interface

Primary role is to deny unauthorized remote access to the computer

Can also monitor outgoing activity in an attempt to detect and block worms and other malware

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

A personal firewall controls the traffic between a personal computer or workstation

on one side and the Internet or enterprise network on the other side. Personal firewall

functionality can be used in the home environment and on corporate intranets.

Typically, the personal firewall is a software module on the personal computer. In

a home environment with multiple computers connected to the Internet, firewall

functionality can also be housed in a router that connects all of the home computers

to a DSL, cable modem, or other Internet interface.

Personal firewalls are typically much less complex than either server-based

firewalls or stand-alone firewalls. The primary role of the personal firewall is to

deny unauthorized remote access to the computer. The firewall can also monitor

outgoing activity in an attempt to detect and block worms and other malware.

20

Figure 12.2 Example Firewall Configuration

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

Figure 12.2 suggests the most common distinction, that between an internal and an

external firewall. An external firewall is placed at the edge of a local or enterprise

network, just inside the boundary router that connects to the Internet or some wide

area network (WAN). One or more internal firewalls protect the bulk of the enterprise

network. Between these two types of firewalls are one or more networked

devices in a region referred to as a DMZ (demilitarized zone) network. Systems

that are externally accessible but need some protections are usually located on

DMZ networks. Typically, the systems in the DMZ require or foster external connectivity,

such as a corporate Web site, an e-mail server, or a DNS (domain name

system) server.

The external firewall provides a measure of access control and protection for

the DMZ systems consistent with their need for external connectivity. The external

firewall also provides a basic level of protection for the remainder of the enterprise

network. In this type of configuration, internal firewalls serve three purposes:

1. The internal firewall adds more stringent filtering capability, compared to the

external firewall, in order to protect enterprise servers and workstations from

external attack.

2. The internal firewall provides two-way protection with respect to the DMZ.

First, the internal firewall protects the remainder of the network from attacks

launched from DMZ systems. Such attacks might originate from worms, rootkits,

bots, or other malware lodged in a DMZ system. Second, an internal firewall

can protect the DMZ systems from attack from the internal protected

network.

3. Multiple internal firewalls can be used to protect portions of the internal network

from each other. For example, firewalls can be configured so that internal

servers are protected from internal workstations and vice versa. A common

practice is to place the DMZ on a different network interface on the external

firewall from that used to access the internal networks.

21

Figure 12.3 A V P N Security Scenario

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

In today’s distributed computing environment, the virtual private network (VPN)

offers an attractive solution to network managers. In essence, a VPN consists of

a set of computers that interconnect by means of a relatively unsecure network

and that make use of encryption and special protocols to provide security. At each

corporate site, workstations, servers, and databases are linked by one or more local

area networks (LANs). The Internet or some other public network can be used to

interconnect sites, providing a cost savings over the use of a private network and

offloading the wide area network management task to the public network provider.

That same public network provides an access path for telecommuters and other

mobile employees to log on to corporate systems from remote sites.

But the manager faces a fundamental requirement: security. Use of a public

network exposes corporate traffic to eavesdropping and provides an entry point for

unauthorized users. To counter this problem, a VPN is needed. In essence, a VPN

uses encryption and authentication in the lower protocol layers to provide a secure

connection through an otherwise insecure network, typically the Internet. VPNs are

generally cheaper than real private networks using private lines but rely on having

the same encryption and authentication system at both ends. The encryption may

be performed by firewall software or possibly by routers. The most common protocol

mechanism used for this purpose is at the IP level and is known as IPsec.

Figure 12.3 (Compare Figure 9.1) is a typical scenario of IPSec usage. An

organization maintains LANs at dispersed locations. Nonsecure IP traffic is conducted

on each LAN. For traffic off site, through some sort of private or public

WAN, IPSec protocols are used. These protocols operate in networking devices,

such as a router or firewall, that connect each LAN to the outside world. The IPSec

networking device will typically encrypt and compress all traffic going into the

WAN and decrypt and uncompress traffic coming from the WAN; authentication

may also be provided. These operations are transparent to workstations and servers

on the LAN. Secure transmission is also possible with individual users who dial into

the WAN. Such user workstations must implement the IPSec protocols to provide

security. They must also implement high levels of host security, as they are directly

connected to the wider Internet. This makes them an attractive target for attackers

attempting to access the corporate network.

A logical means of implementing an IPSec is in a firewall, as shown in

Figure 12.3. If IPSec is implemented in a separate box behind (internal to) the firewall,

then VPN traffic passing through the firewall in both directions is encrypted.

In this case, the firewall is unable to perform its filtering function or other security

functions, such as access control, logging, or scanning for viruses. IPSec could be

implemented in the boundary router, outside the firewall. However, this device is

likely to be less secure than the firewall and thus less desirable as an IPSec platform.

22

Figure 12.4 Example Distributed Firewall Configuration

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

A distributed firewall configuration involves stand-alone firewall devices plus

host-based firewalls working together under a central administrative control.

Figure 12.4 suggests a distributed firewall configuration. Administrators can configure

host-resident firewalls on hundreds of servers and workstations as well as

configure personal firewalls on local and remote user systems. Tools let the network

administrator set policies and monitor security across the entire network. These

firewalls protect against internal attacks and provide protection tailored to specific

machines and applications. Stand-alone firewalls provide global protection, including

internal firewalls and an external firewall, as discussed previously.

With distributed firewalls, it may make sense to establish both an internal

and an external DMZ. Web servers that need less protection because they have

less critical information on them could be placed in an external DMZ, outside the

external firewall. What protection is needed is provided by host-based firewalls on

these servers.

An important aspect of a distributed firewall configuration is security

monitoring. Such monitoring typically includes log aggregation and analysis, firewall

statistics, and fine-grained remote monitoring of individual hosts if needed.

23

Summary of Firewall Locations and Topologies

Host-resident firewall

This category includes personal firewall software and firewall software on servers

Can be used alone or as part of an in-depth firewall deployment

Screening router

A single router between internal and external networks with stateless or full packet filtering

This arrangement is typical for small office/home office (S O H O) applications

Single bastion inline

A single firewall device between an internal and external router

This is the typical firewall

appliance configuration for small-to-medium sized organizations

Single bastion T

Similar to single bastion inline but has a third network interface on bastion to a D M Z where externally visible servers are placed

Double bastion inline

D M Z is sandwiched between bastion firewalls

Double bastion T

D M Z is on a separate network interface on the bastion firewall

Distributed firewall configuration

Used by some large businesses and government organizations

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

We can now summarize the discussion from Sections 12.4 and 12.5 to define a spectrum

of firewall locations and topologies. The following alternatives can be identified:

• Host-resident firewall: This category includes personal firewall software and

firewall software on servers. Such firewalls can be used alone or as part of an

in-depth firewall deployment.

• Screening router: A single router between internal and external networks with

stateless or full packet filtering. This arrangement is typical for small office/

home office (SOHO) applications.

• Single bastion inline: A single firewall device between an internal and external

router (e.g., Figure 12.1a). The firewall may implement stateful filters and/

or application proxies. This is the typical firewall appliance configuration for

small- to medium-sized organizations.

• Single bastion T: Similar to single bastion inline but has a third network interface

on bastion to a DMZ where externally visible servers are placed. Again,

this is a common appliance configuration for medium to large organizations.

• Double bastion inline: Figure 12.2 illustrates this configuration, where the

DMZ is sandwiched between bastion firewalls. This configuration is common

for large businesses and government organizations.

• Double bastion T: The DMZ is on a separate network interface on the bastion

firewall. This configuration is also common for large businesses and government

organizations and may be required. For example, this configuration is

required for Australian government use (Australian Government Information

Technology Security Manual—ACSI33).

• Distributed firewall configuration: Illustrated in Figure 12.4. This configuration

is used by some large businesses and government organizations.

24

Summary

The need for firewalls

Firewall characteristics and access policy

Types of firewalls

Packet filtering firewall

Stateful inspection firewalls

Application level gateway

Circuit level gateway

Firewall basing

Bastion host

Host based firewalls

Personal firewall

Firewall locations and configurations

D M Z networks

Virtual private networks

Distributed firewalls

Firewall location and topologies summary

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

25

Chapter 12 summary.

Copyright

Copyright © 2017 Pearson Education, Inc. All Rights Reserved

26