Cryptography and Network Security Chapter 20 Firewalls

Slides:



Advertisements
Similar presentations
Network Security Essentials Chapter 11
Advertisements

Lecture slides for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 9 “Firewalls and Intrusion Prevention.
Firewalls By Tahaei Fall What is a firewall? a choke point of control and monitoring interconnects networks with differing trust imposes restrictions.
Computer Security: Principles and Practice Chapter 9 – Firewalls and Intrusion Prevention Systems.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 9 – Firewalls and.
Firewalls Uyanga Tserengombo
IUT– Network Security Course 1 Network Security Firewalls.
FIREWALLS Chapter 11.
Firewalls Dr.P.V.Lakshmi Information Technology GIT,GITAM University
FIREWALLS. What is a Firewall? A firewall is hardware or software (or a combination of hardware and software) that monitors the transmission of packets.
FIREWALLS The function of a strong position is to make the forces holding it practically unassailable —On War, Carl Von Clausewitz On the day that you.
Winter CMPE 155 Week 7. Winter Assignment 6: Firewalls What is a firewall? –Security at the network level. Wide-area network access makes.
CSCI 530 Lab Firewalls. Overview Firewalls Capabilities Limitations What are we limiting with a firewall? General Network Security Strategies Packet Filtering.
Lecture 14 Firewalls modified from slides of Lawrie Brown.
Security Firewall Firewall design principle. Firewall Characteristics.
—On War, Carl Von Clausewitz
Chapter 11 Firewalls.
Principles of Information Security, 2nd Edition1 Firewalls and VPNs.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 7 Network Perimeter Security.
Chapter 10 Firewalls. Introduction seen evolution of information systems now everyone want to be on the Internet and to interconnect networks has persistent.
1 Pertemuan 05 Firewall Matakuliah: H0451/Praktikum Jaringan Komputer Tahun: 2006 Versi: 1/0.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Firewalls1 Firewalls Mert Özarar Bilkent University, Turkey
Cryptography and Network Security Chapter 20 Fourth Edition by William Stallings.
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
1 Lecture 20: Firewalls motivation ingredients –packet filters –application gateways –bastion hosts and DMZ example firewall design using firewalls – virtual.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
A Brief Taxonomy of Firewalls
BY- NIKHIL TRIPATHI 12MCMB10.  What is a FIREWALL?  Can & Can’t in Firewall perspective  Development of Firewalls  Firewall Architectures  Some Generalization.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
Chapter 20 Firewalls.
Why do we need Firewalls? Internet connectivity is a must for most people and organizations  especially for me But a convenient Internet connectivity.
Intranet, Extranet, Firewall. Intranet and Extranet.
Network Security Essentials Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 6: Packet Filtering
CSCE 815 Network Security Lecture 23 Jails and such April 15, 2003.
1 Internet Firewalls What it is all about Concurrency System Lab, EE, National Taiwan University R355.
FIREWALLS Vivek Srinivasan. Contents Introduction Need for firewalls Different types of firewalls Conclusion.
1 Chapter 20: Firewalls Fourth Edition by William Stallings Lecture slides by Lawrie Brown(modified by Prof. M. Singhal, U of Kentucky)
11 SECURING YOUR NETWORK PERIMETER Chapter 10. Chapter 10: SECURING YOUR NETWORK PERIMETER2 CHAPTER OBJECTIVES  Establish secure topologies.  Secure.
Chapter 20 – Firewalls The function of a strong position is to make the forces holding it practically unassailable —On War, Carl Von Clausewitz.
Data Security and Encryption (CSE348)
Packet Filtering Chapter 4. Learning Objectives Understand packets and packet filtering Understand approaches to packet filtering Set specific filtering.
Karlstad University Firewall Ge Zhang. Karlstad University A typical network topology Threats example –Back door –Port scanning –…–…
Security fundamentals Topic 10 Securing the network perimeter.
Firewall C. Edward Chow CS691 – Chapter 26.3 of Matt Bishop Linux Iptables Tutorial by Oskar Andreasson.
Introduction to Linux Firewall
1 An Introduction to Internet Firewalls Dr. Rocky K. C. Chang 12 April 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Cryptography and Network Security
Computer Security Firewalls and Intrusion Prevention Systems.
LINUX® Netfilter The Linux Firewall Engine. Overview LINUX® Netfilter is a firewall engine built into the Linux kernel Sometimes called “iptables” for.
1 CNLab/University of Ulsan Chapter 19 Firewalls  Packet Filtering Firewall  Application Gateway Firewall  Firewall Architecture.
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Security fundamentals
Why do we need Firewalls?
Firewall.
Computer Data Security & Privacy
G. Pullaiah College of Engineering and Technology
Firewalls.
* Essential Network Security Book Slides.
Firewalls Purpose of a Firewall Characteristic of a firewall
Subject Name: NETWORK SECURITY Subject Code: 10EC832
POOJA Programmer, CSE Department
Chapter 8 Network Perimeter Security
Firewalls By conventional definition, a firewall is a partition made
Firewalls Jiang Long Spring 2002.
Firewalls.
Presentation transcript:

Cryptography and Network Security Chapter 20 Firewalls Fourth Edition by William Stallings Lecture slides by Lawrie Brown extended and adopted by Hans Hedbom Lecture slides by Lawrie Brown for “Cryptography and Network Security”, 4/e, by William Stallings, Chapter 20 – “Firewalls”.

Chapter 20 – Firewalls The function of a strong position is to make the forces holding it practically unassailable —On War, Carl Von Clausewitz Opening quote.

Introduction seen evolution of information systems now everyone want to be on the Internet and to interconnect networks has persistent security concerns can’t easily secure every system in org typically use a Firewall to provide perimeter defence as part of comprehensive security strategy Information systems in corporations,government agencies,and other organizations have undergone a steady evolution from mainframes to LANs. Internet connectivity is no longer optional, with information and services essential to the organization. Moreover, individual users want and need Internet access. However, while Internet access provides benefits, it enables the outside world to reach and interact with local network assets, creating a threat to the organization. While it is possible to equip each workstation and server on the premises network with strong security features, this is not a practical approach in general. Firewalls can be an effective means of protecting a local system or network of systems from network-based security threats while at the same time affording access to the outside world via wide area networks and the Internet. However they need to be part of a wider security strategy including host security.

What is a Firewall? a choke point of control and monitoring interconnects networks with differing trust imposes restrictions on network services only authorized traffic is allowed auditing and controlling access can implement alarms for abnormal behavior provide NAT & usage monitoring implement VPNs using IPSec must be immune to penetration A firewall is inserted between the premises network and the Internet to establish a controlled link and to erect an outer security wall or perimeter, forming a single choke point where security and audit can be imposed. 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. 2. provides a location for monitoring security-related events 3. is a convenient platform for several Internet functions that are not security related, such as NAT and Internet usage audits or logs 4. A firewall can serve as the platform for IPSec to implement virtual private networks. The firewall itself must be immune to penetration, since it will be a target of attack.

Firewall Limitations cannot protect from attacks bypassing it eg sneaker net, utility modems, trusted organisations, trusted services (eg SSL/SSH) cannot protect against internal threats eg disgruntled or colluding employees cannot protect against transfer of all virus infected programs or files because of huge range of O/S & file types Firewalls have their limitations, including that they: cannot protect against attacks that bypass the firewall, eg PCs with dial-out capability to an ISP, or dial-in modem pool use 2. do not protect against internal threats, eg disgruntled employee or one who cooperates with an attacker 3. cannot protect against the transfer of virus-infected programs or files, given wide variety of O/S & applications supported

Firewalls – Packet Filters simplest, fastest firewall component foundation of any firewall system examine each IP packet (no context) and permit or deny according to rules hence restrict access to services (ports) possible default policies that not expressly permitted is prohibited that not expressly prohibited is permitted Have three common types of firewalls: packet filters, application-level gateways, & circuit-level gateways. A packet-filtering router applies a set of rules to each incoming and outgoing IP packet to forward or discard the packet. Filtering rules are based on information contained in a network packet such as src & dest IP addresses, ports, transport protocol & interface. Some advantages are simplicity, transparency & speed. If there is no match to any rule, then one of two default policies are applied: • that which is not expressly permitted is prohibited (default action is discard packet), conservative policy • that which is not expressly prohibited is permitted (default action is forward packet), permissive policy

Firewalls – Packet Filters Stallings Figure 20.1a illustrates the packet filter firewall placement in the border router, on the security perimeter, between the external less-trusted Internet, and the internal more trusted private network.

Screeing policy actions Forward The package is forwarded to the intended recipient Drop The packages is dropped (without notification) Reject The package is rejected (with notification) Log The packages appearance is logged (to be combined) Alarm The packages appearance triggers an alarm (to be combined) 8

Screening policies There should always be some default rules The last rule should be „Drop everything from everyone“ which enforce a defensive strategy Network monitoring and control messages should be considered 9

Firewalls – Packet Filters Stallings Table 20.1 gives some examples of packet-filtering rule sets. In each set, the rules are applied top to bottom. A. Inbound mail is allowed to a gateway host only (port 25 is for SMTP incoming B. explicit statement of the default policy C. tries to specify that any inside host can send mail to the outside, but has problem that an outside machine could be configured to have some other application linked to port 25 D. properly implements mail sending rule, by checking ACK flag of a TCP segment is set E. this rule set is one approach to handling FTP connections

Attacks on Packet Filters IP address spoofing fake source address to be trusted add filters on router to block source routing attacks attacker sets a route other than default block source routed packets tiny fragment attacks split header info over several tiny packets either discard or reassemble before check Some of the attacks that can be made on packet-filtering routers & countermeasures are: • IP address spoofing: where intruder transmits packets from the outside with internal host source IP addr, need to filter & discard such packets • Source routing attacks: where source specifies the route that a packet should take to bypass security measures, should discard all source routed packets • Tiny fragment attacks: intruder uses the IP fragmentation option to create extremely small fragments and force the TCP header information into a separate fragments to circumvent filtering rules needing full header info, can enforce minimum fragment size to include full header.

Firewalls – Stateful Packet Filters traditional packet filters do not examine higher layer context ie matching return packets with outgoing flow stateful packet filters address this need they examine each IP packet in context keep track of client-server sessions check each packet validly belongs to one hence are better able to detect bogus packets out of context A traditional packet filter makes filtering decisions on an individual packet basis and does not take into consideration any higher layer context. A stateful inspection packet filter tightens up the rules for TCP traffic by creating a directory of outbound TCP connections, and will allow incoming traffic to high-numbered ports only for those packets that fit the profile of one of the entries in this directory. Hence they are better able to detect bogus packets sent out of context.

Advantage/Disadvantage + - One screening router can protect a whole network Packet filtering is extremely efficient Packet filtering is widely available Current filtering tools are not perfect Some policies are difficult to enforce Packet filtering generates extra load for the router 13

Firewalls - Application Level Gateway (or Proxy) have application specific gateway / proxy has full access to protocol user requests service from proxy proxy validates request as legal then actions request and returns result to user can log / audit traffic at application level need separate proxies for each service some services naturally support proxying others are more problematic An application-level gateway (or proxy server), acts as a relay of application-level traffic. A user contacts the gateway to access some service, provides details of the service, remote host & authentication details, contacts the application on the remote host and relays all data between the two endpoints. If the gateway does not implement the proxy code for a specific application, then it is not supported and cannot be used. Note that some services naturally support proxying, whilst others are more problematic. Application-level gateways tend to be more secure than packet filters, &can log and audit traffic at application level.

Different modes Proxy-aware application software The application software knows how to connect to the proxy and forward the final destination Proxy-aware operating system software The operating system checks and eventually modify the IP addresses to use the proxy Proxy-aware user procedures The user has to follow some procedures. He tells the client software where to connect and also the proxy the destination address Proxy-aware router The client attempts to make connections as usual and the router intercepts and redirects packages to the proxy 15

Firewalls - Application Level Gateway (or Proxy) Stallings Figure 20.1b illustrates an application-level gateway (or proxy server), emphasizing that it only supports a specific list of application services.

Firewalls - Circuit Level Gateway relays two TCP connections imposes security by limiting which such connections are allowed once created usually relays traffic without examining contents typically used when trust internal users by allowing general outbound connections SOCKS is commonly used A circuit-level gateway relays two TCP connections, one between itself and an inside TCP user, and the other between itself and a TCP user on an outside host. Once the two connections are established, it relays TCP data from one connection to the other without examining its contents. The security function consists of determining which connections will be allowed. It is typically used when internal users are trusted to decide what external services to access. One of the most common circuit-level gateways is SOCKS, defined in RFC 1928. It consists of a SOCKS server on the firewall, and a SOCKS library & SOCKS-aware applications on internal clients.

Firewalls - Circuit Level Gateway Stallings Figure 20.1c illustrates a circuit-level gateway, showing how it relays between 2 TCP connections. Note that it can be implemented in a stand-alone system or can be a specialized function in an application-level gateway for certain applications. Note also that relaying UDP packets is more problematical, because of the lack of connection context, and require a parallel TCP connection to provide these details.

Advantage/Disadvantage + - Proxies can do intelligent filtering Proxies can provide logging and caching Proxies can provide user-level authentication Proxies cause a delay Proxies can require modifications to clients Proxies may require a different server for each service 19

Network Adress Transalation NAT allows to use a set of network addresses internally and a different set externally Do not generate security itself but force connection over one point 20

Modes Static allocation Dynamic allocation of addresses The translation scheme is static Dynamic allocation of addresses The connection addresses are determined on a per session base Dynamic allocation of addresses and ports Both addresses and ports are dynamic 21

Advantage/Disadvantage + - NAT helps to enforce the firewalls control over outbound traffic NAT helps to restrict incoming traffic NAT hides the internal network configuration Embedded IP can become a problem Dynamic allocation may interfere with encryption and authentication Dynamic allocation of port may interfere with package filters 22

Bastion Host highly secure host system runs circuit / application level gateways or provides externally accessible services potentially exposed to "hostile" elements hence is secured to withstand this hardened O/S, essential services, extra auth proxies small, secure, independent, non-privileged may support 2 or more net connections may be trusted to enforce policy of trusted separation between these net connections A bastion host is a critical strong point in the network’s security, serving as a platform for an application-level or circuit-level gateway, or for external services. It is thus potentially exposed to "hostile" elements and must be secured to withstand this. Common characteristics of a bastion host include that it: • executes a secure version of its O/S, making it a trusted system • has only essential services installed on the bastion host • may require additional authentication before a user is allowed access to the proxy services • is configured to support only a subset of the standard application’s command set, with access only to specific hosts • maintains detailed audit information by logging all traffic • has each proxy module a very small software package specifically designed for network security • has each proxy independent of other proxies on the bastion host • have a proxy performs no disk access other than to read its initial configuration file • have each proxy run as a nonprivileged user in a private and secured directory A bastion host may have two or more network interfaces (or ports), and must be trusted to enforce trusted separation between these network connections, relaying traffic only according to policy.

Firewall Configurations In addition to the use of a simple configuration consisting of a single system, more complex configurations are possible and indeed more common. Stallings Figure 20.2 illustrates three common firewall configurations. Figure 20.2a shows the “screened host firewall, single-homed bastion configuration”, where the firewall consists of two systems: a packet-filtering router - allows Internet packets to/from bastion only a bastion host - performs authentication and proxy functions This configuration has greater security, as it implements both packet-level & application-level filtering, forces an intruder to generally penetrate two separate systems to compromise internal security, & also affords flexibility in providing direct Internet access to specific internal servers (eg web) if desired.

Firewall Configurations Stallings Figure 20.2b illustrates the “screened host firewall, dual-homed bastion configuration” which physically separates the external and internal networks, ensuring two systems must be compromised to breach security. The advantages of dual layers of security are also present here. Again, an information server or other hosts can be allowed direct communication with the router if this is in accord with the security policy, but are now separated from the internal network.

Firewall Configurations Stallings Figure 20.2c shows the “screened subnet firewall configuration”, being the most secure shown. It has two packet-filtering routers, one between the bastion host and the Internet and the other between the bastion host and the internal network, creating an isolated subnetwork. This may consist of simply the bastion host but may also include one or more information servers and modems for dial-in capability. Typically, both the Internet and the internal network have access to hosts on the screened subnet, but traffic across the screened subnet is blocked. This configuration offers several advantages: • There are now three levels of defense to thwart intruders • The outside router advertises only the existence of the screened subnet to the Internet; therefore the internal network is invisible to the Internet • Similarly, the inside router advertises only the existence of the screened subnet to the internal network; hence systems on the inside network cannot construct direct routes to the Internet

Mulitple Screened Subnets Split-Screened subnet Multiple networks between the exterior and interior router. The networks are usually connected by dual-homed hosts. Independent Screened Subnets n Screened Subnets 27

Hybrid - Example Structure Internet Supplier Net DMZ DMZ DMZ Application DMZ DMZ Database Back End Employee Lan DMZ 28

Evaluating a Firewall Scalability Reliability and Redundancy Auditability Price (Hardware, Software, Setup, Maintenance) Management and Configuration 29

Firewalls and Malware Should preferably control both ingoing and outgoing traffic Windows XP firewall controls only ingoing traffic Trojans can start up servers on the inside Firewall should preferable inspect packets on the application layer Network layer based packet filters do not provide adequate protection Wax borad, egg, invisible ink... 30

Firewalls and Malware New worms/viruses often tries to kill firewall and anti virus processes “Tunneled Worms” Tunnel IP packet within other IP packet to hide real IP header Tunneling program can be built in in Trojans Wax borad, egg, invisible ink... Tunneled IP packet 31

IP- Tables IP Tables is the standard kernel firewall system for Linux since Kernel 2.4.x Packet Filtering and NAT for linux 32

Rule -t table Nat (PREROUTING, POSTROUTING) iptables [-t table] command [match] [traget/jump] -t table Nat (PREROUTING, POSTROUTING) Mangle (PREROUTING, POSTROUTING) Filter (default) (FORWARD, INPUT, OUTPUT) 33

Rule iptables [-t table] command [match] [traget/jump] Command -P, --policy -A, --append -D, --delete -R, --replace -L, --list ... 34

Rule iptables [-t table] command [match] [traget/jump] Match (generic) -p, --protocoll (TCP, UDP, ICMP) -s, --source (IP Adresse/port) -d, --destination (IP Adresse/port) -i, --in-interface (eth0, eth1, ppp1) -o, --out-interface (eth0, eth1, ppp1) -m, --match (special commands) 35

Rule Target/jump iptables [-t table] command [match] [traget/jump] -j ACCEPT -j DROP -j LOG -j MAQUERADE ... 36

Example Rules iptable –P FORWARD DROP Introduce the general policy to drop all packages Iptable –t nat –P PREROUTING ACCEPT Accept prerouting nat traffic iptable –A FORWARD -i eth1 –p TCP –d 193.10.221.184 -–dport 80 –j ACCEPT Accept all tcp connections to port 80 coming in at my second network interface to my ip iptables –A FORWARD –m limit –-limit 3/minutes –j LOG Log all refused connections but max. 3 per minute 37

Additional Literature Building Internet Firewalls Zwicky, Cooper ISBN 1565928717; O‘Reilly iptables Tutorial 1.1.16 Oskar Andreasson http://iptables-tutorial.frozentux.net/iptables-tutorial.html 38