Introduction to Firewalls



Similar documents
Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Firewalls. Ahmad Almulhem March 10, 2012

Firewalls. Network Security. Firewalls Defined. Firewalls

Chapter 7. Firewalls

Firewalls. Chapter 3

Chapter 5. Figure 5-1: Border Firewall. Firewalls. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall

Security Technology: Firewalls and VPNs

IPv6 Firewalls. ITU/APNIC/MICT IPv6 Security Workshop 23 rd 27 th May 2016 Bangkok. Last updated 17 th May 2016

Firewalls. Pehr Söderman KTH-CSC

Firewalls. Ingress Filtering. Ingress Filtering. Network Security. Firewalls. Access lists Ingress filtering. Egress filtering NAT

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Chapter 4: Security of the architecture, and lower layer security (network security) 1

Firewalls, NAT and Intrusion Detection and Prevention Systems (IDS)

Proxy Server, Network Address Translator, Firewall. Proxy Server

How To Understand A Firewall

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

CSE 4482 Computer Security Management: Assessment and Forensics. Protection Mechanisms: Firewalls

12. Firewalls Content

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

CSC574 - Computer and Network Security Module: Firewalls

CSCE 465 Computer & Network Security

Network Defense Tools

Chapter 8 Security Pt 2

CSE543 - Computer and Network Security Module: Firewalls

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

Definition of firewall

FIREWALLS & CBAC. philip.heimer@hh.se

CIT 480: Securing Computer Systems. Firewalls

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Firewalls P+S Linux Router & Firewall 2013

CSCI Firewalls and Packet Filtering

INTRODUCTION TO FIREWALL SECURITY

Network Security Topologies. Chapter 11

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

CIS 433/533 - Computer and Network Security Firewalls

CIT 480: Securing Computer Systems. Firewalls

Cryptography and network security

Internet Security Firewalls

CS Computer and Network Security: Firewalls

Linux Network Security

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Network Security. Tampere Seminar 23rd October Overview Switch Security Firewalls Conclusion

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

Stateful Firewalls. Hank and Foo

ΕΠΛ 674: Εργαστήριο 5 Firewalls

FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. Chapter 5 Firewall Planning and Design

CS Computer and Network Security: Firewalls

Lecture Objectives. Lecture 6 Mobile Networks: Nomadic Services, DHCP, NAT, and VPNs. Agenda. Nomadic Services. Agenda. Nomadic Services Functions

Chapter 6: Network Access Control

Module: Firewalls. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

Firewalls. Castle and Moat Analogy. Dr.Talal Alkharobi. Dr.Talal Alkharobi

Cisco PIX vs. Checkpoint Firewall

Protecting and controlling Virtual LANs by Linux router-firewall

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

Firewalls. Securing Networks. Chapter 3 Part 1 of 4 CA M S Mehta, FCA

Firewalls N E T W O R K ( A N D D ATA ) S E C U R I T Y / P E D R O B R A N D Ã O M A N U E L E D U A R D O C O R R E I A

Firewall Defaults and Some Basic Rules

8. Firewall Design & Implementation

Solution of Exercise Sheet 5

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

FIREWALL AND NAT Lecture 7a

A S B

Overview. Firewall Security. Perimeter Security Devices. Routers

Network Security. Routing and Firewalls. Radboud University Nijmegen, The Netherlands. Autumn 2014

Chapter 8 Network Security

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

Firewall VPN Router. Quick Installation Guide M73-APO09-380

Firewalls, IDS and IPS

Firewalls. Basic Firewall Concept. Why firewalls? Firewall goals. Two Separable Topics. Firewall Design & Architecture Issues

Firewalls. Chien-Chung Shen

Topics NS HS12 2 CINS/F1-01

Chapter 15. Firewalls, IDS and IPS

What is a Firewall? A choke point of control and monitoring Interconnects networks with differing trust Imposes restrictions on network services

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

Securing Networks with PIX and ASA

Lecture 23: Firewalls

Distributed Systems. Firewalls: Defending the Network. Paul Krzyzanowski

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Firewall Design Principles Firewall Characteristics Types of Firewalls

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

OS/390 Firewall Technology Overview

Security+ Guide to Network Security Fundamentals, Fourth Edition. Chapter 6 Network Security

allow all such packets? While outgoing communications request information from a

NETWORK SECURITY (W/LAB) Course Syllabus

Linux MDS Firewall Supplement

JK0-022 CompTIA Academic/E2C Security+ Certification Exam CompTIA

Security perimeter. Internet. - Access control, monitoring and management. Differentiate between insiders and outsiders - Different types of outsiders

Chapter 9 Firewalls and Intrusion Prevention Systems

How To Protect Your Firewall From Attack From A Malicious Computer Or Network Device

CS5008: Internet Computing

Transcription:

Introduction to Firewalls Today s Topics: Types of firewalls Packet Filtering Firewalls Application Level Firewalls Firewall Hardware/Software IPChains/IPFilter/Cisco Router ACLs Firewall Security Enumeration Identification Attacking/Evading Example Rule sets Bypassing 1

Types of firewalls Packet Filtering firewall Operate on transport and network layers of the TCP/IP stack Internal Network Packet Filtering Firewall External Network Application Gateways/Proxies Operate on the application protocol level Proxy Client Proxy Firewall Actual Server 2

Packet Filtering Firewall Operate on transport and network layers of the TCP/IP stack Decides what to do with a packet depending upon the following criteria: Transport protocol (TCP,UDP,ICMP), Source and destination IP address The source and destination ports ICMP message type/code Various TCP options such as packet size, fragmentation etc. 3

Packet Filtering Firewall: Terminology Stateless Firewall: The firewall makes a decision on a packet by packet basis. Stateful Firewall : The firewall keeps state information about transactions (connections). NAT - Network Address translation Translates public IP address(es) to private IP address(es) on a private LAN. 4

Packet Filtering Firewall: Functions Forward the packet(s) on to the intended destination Reject the packet(s) and notify the sender (ICMP dest unreach/admin prohibited) Drop the packet(s) without notifying the sender. Log accepted and/or denied packet information NAT - Network Address Translation 5

Packet Filtering Firewall: Disadvantages Filters can be difficult to configure. It s not always easy to anticipate traffic patterns and create filtering rules to fit. Filter rules are sometimes difficult to test Packet filtering can degrade router performance Attackers can tunnel malicious traffic through allowed ports on the filter. 6

Application Gateway (Proxy Server) Operate at the application protocol level. (Telnet, FTP, HTTP) Application Gateways Understand the protocol and can be configured to allow or deny specific protocol operations. Typically, proxy servers sit between the client and actual service. Both the client and server talk to the proxy rather than directly with each other. 7

Application Gateway (Proxy Server): Disadvantages Requires modification to client software application Some client software applications don t accommodate the use of a proxy Some protocols aren t supported by proxy servers Some proxy servers may be difficult to configure and may not provide all the protection you need. 8

Firewall Hardware/Software Dedicated hardware/software application such as Cisco PIX Firewall which filters traffic passing through the multiple network interfaces. A Unix or Windows based host with multiple network interfaces, running a firewall software package which filters incoming and outgoing traffic across the interfaces. A Unix or Windows based host with a single network interface, running a firewall software package which filters the incoming and outgoing traffic to the individual interface. 9

Firewall Architecture In the real world, designs are far more complex Core Switch DMZ Core Switch Internal Router Internal Firewall External Firewall Core Switch IDS Web Server Border Router Internal Network External Network Modem 10

Popular Free Packet Filtering Firewall software for Unix IPchains - Linux 2.2.x kernels http://www.linuxfaq.com/ldp/howto/ipchains-howto.html IPTables (NetFilter) - Linux 2.4.x kernels First stateful firewall package for Linux http://netfilter.kernelnotes.org IPFilter - For Solaris, HP-UX, IRIX, *BSD http://coombs.anu.edu.au/ipfilter/ 11

Popular Free Application Layer (Proxy) Firewalls. TIS FWTK - Firewall Toolkit http://www.tis.com/research/software/fwtk_over.html SOCKS - Proxy Server http://www.socks.nec.com Squid - HTTP, SSL, FTP proxy cache 12

Firewall Security We are going to start with network firewall security and then cover proxy firewall security. Enumeration Identification Attacking/Evading Example Rule sets Bypassing 13

Firewall Enumeration First, we have to find the firewall How about a port scan Noisy Won t work in a well configured environment Traceroute Find out which system in the chain does not respond 14

Firewall Identification Identifying the firewall Banner grabbing Various firewalls run services with obvious banners Fingerprinting Firewalls may behave differently, given different stimuli Port identification Firewalls may run services E.g. Old checkpoint FW-1 keeps 257/tcp open for SNMP Stateless vs. Stateful 15

Misconfiguration Liberal ACLs (a.k.a., firewall creep) Problem: Some organizations use a allow all, deny some rule set Solution: Use a deny all, allow some rule set Policy 16

Stateless Packet Filters Source port scanning Attack: The attacker send port scans with a source port of an allowed service E.g. Scan with a source port of 53/tcp (dns) Countermeasure: Use a properly configured stateful firewall 17

Stateless Packet Filters Fragmentation Attacks Attack: Tiny fragmentation IP and TCP headers are broken up across multiple fragmented packets Large TCP packets may exhaust resources Countermeasure: Set a minimum packet size for fragmented packets (potential for DoS) Packet reassembly (Watch out for pathological offsets though) 18

Stateful packet filters Tunneling Attack: Tunneling/Covert channels Encapsulate blocked traffic over allowed protocols (e.g. tunnel ssh over http or ICMP) Countermeasure: Allow these types of traffic only to/from specific hosts Disable ICMP through your firewall Implement multiple layers of security 19

Firewalls Note that Routers, Hosts, Bandwidth Managers and LoadBalancers can and have been used as network Firewalls. Early Firewalls were of either of the two basic types, commercial Firewalls today are often hybrids: 1. Packet Filters originally based on routers Static (E.g. most routers) Dynamic/Stateful/Multi-level (dedicated commercial firewalls and newer routers with firewall feature sets) 2. Proxies originally based on dual-homed hosts Application-aware Application Level Gateways (ALGs) Generic, circuit or plug proxies (SOCKS, RWS, etc.) Kernel proxies Transparent and cut-thru proxies New: Application level content filtering. Igear, Websweeper, MIMEsweeper, etc. 20

Add l Adv. Firewall Functions Virus (malicious software) scanning. E-Mail attachment stripping/renaming. URL or (web) content blocking. Privacy protection (cookie & webbugs blocking) NAT & PAT (Network/Port Address Translation) Virtual Private Networking IDS/IDP inclusion with rule updates. Bandwidth Management, Flood/DoS Control. Load Balancing for scalability, redundancy and failover. Port Forwarding and virtual hosting. 21

Configuration: Router interfaces interface GE-WAN6/5 description ISP1 (vlan 5) bandwidth 1234567 ip address 10.125.51.1 255.255.255.252 ip access-group isp-campus-1-in in no ip proxy-arp ip route-cache flow interface GigabitEthernet3/8 description campus (vlan 4) ip address 10.125.52.1 255.255.255.252 ip access-group campus-external-1-in in ip pim sparse-dense-mode ip route-cache flow ISP1 Isp-campus-1 Campus-external-1 Campus ISP2 22

Ingress Filtering Internal Network Packet Filter (router/firewall) External Network Filter incoming traffic to your network Disallow packets with rfc1918 source addresses (e.g. 10.0.0.0/8, 192.168.0.0/16) Disallow packets with local source addresses Disallow insecure services Windows Networking SNMP? 23

Configuration: Cisco Ingress ACL ip access-list extended isp-campus-1-in deny ip 10.0.0.0 0.255.255.255 any deny ip 127.0.0.0 0.255.255.255 any deny ip 169.254.0.0 0.0.255.255 any deny ip 172.16.0.0 0.15.255.255 any deny ip 192.168.0.0 0.0.255.255 any deny ip host 255.255.255.255 any log deny udp any local mask range 137 139 deny tcp any local mask range 137 139 deny udp any local mask eq 445 deny tcp any local mask eq 445 permit udp any local mask eq 135 log permit tcp any local mask eq 135 log ISP1 Isp-campus-1 Campus-external-1 Campus ISP2 24

Egress Filtering Internal Network Packet Filter (router/firewall) External Network Filter outgoing traffic from your network Disallow packets with rfc1918 source addresses (e.g. 10.0.0.0/8, 192.168.0.0/16) Disallow packets with non-local source addresses This helps prevent IP Spoofing Disallow insecure services Windows Networking SNMP? 25

Configuration: Cisco Egress ACL ip access-list extended campus-external-1-in deny udp local mask any range 137 139 deny tcp local mask any range 137 139 deny udp local mask any eq 135 deny udp local mask any eq 1434 permit tcp local mask any eq 27374 established deny tcp local mask any eq 27374 permit ip local mask any deny ip any any log ISP1 Isp-campus-1 Campus-external-1 ISP2 Campus 26

Microsoft Networking Although a site specific decision, many sites choose to block Microsoft windows networking protocols at their border. NetBIOS/SMB is the windows shares protcol Frequent vector for virus infection Too many non-password protected shares VPN is a very good idea if you need NetBIOS A LAN protcol, why should it traverse your border? access-list XXX deny udp local mask any range 137 139 access-list XXX deny tcp local mask any range 137 139 access-list XXX deny udp local mask any range 445 access-list XXX deny tcp local mask any range 445 27

Microsoft Networking Although a site specific decision, many sites choose to block Microsoft windows networking protocols at their border. Windows Messenger is what generates those University Diploma popup windows And they are becoming decidedly less savory access-list XXX deny udp local mask any eq 135 University of Connecticut Windows Protcols List http://security.uconn.edu/ 28

Example: ipfilter ACL # In rules block in log body from any to any pass in on hme0 proto tcp from any port = 80 to 10.1.1.2 port > 1024 with no ipopts keep state pass in on hme0 proto tcp from any port = 443 to 10.1.1.2 port > 1024 with no ipopts keep state pass in on hme0 proto tcp from 10.1.1.0/24 to 255.255.255.255 pass in on hme0 proto udp from 10.1.1.0/24 to 255.255.255.255 # Out rules block out on hme0 log body from any to any pass out on hme0 log proto icmp from 10.1.1.2 to 10.1.0.0/16 pass out on hme0 proto tcp from 10.1.1.2 port > 1024 to any port > 1024 with no ipopts keep state 29

Example: iptables ACL iptables -A INPUT -p tcp --sport 80 -d 10.1.1.2 --dport 1024: -j ACCEPT iptables -A INPUT -p tcp --sport 443 -d 10.1.1.2 --dport 1024: -j ACCEPT iptables -A INPUT -p tcp -s 10.1.1.0/24 -d 255.255.255.255 -j ACCEPT iptables -A INPUT -p udp -s 10.1.1.0/24 -d 255.255.255.255 -j ACCEPT iptables -A INPUT -j DENY iptables -A OUTPUT -p icmp -s 10.1.1.2 -d 10.1.0.0/16 -j ACCEPT iptables -A OUTPUT -p tcp -s 10.1.1.2 -sport 1024: -dport 1024: 30

Tunneling: VPNs Attack: Using a VPN for Tunneling Encapsulate traffic over a VPN connection This is tough to catch as all the payload is encrypted Countermeasure: Only allow VPN traffic to/from VPN concentrators Implement multiple layers of security 31

Rule Enumeration Firewalking Attack: Send IP packets destined for internal hosts with a small TTL Analogous to traceroute, except using TCP and UDP packets. If the firewall drops the packet, the port is closed If you get a TTL exceeded, the port is open Countermeasure: Drop ICMP TTL exceeded messages at your border Unfortunately, this may cause problems for legitimate users 32

IP Spoofing Attack: Spoof traffic from allowed hosts Send packets with a spoofed source IP/port to bypass filters Countermeasure: Egress filtering. Unfortunately, everyone needs to do this for it to be successful 33

SYN flooding Attack: Overwhelm the firewall s stateful buffer hoping to evade Send packets with a spoofed source IP/port to bypass filters Countermeasure: Egress filtering. Unfortunately, everyone needs to do this for it to be successful 34

Dialup Hacking Why not physically bypass the firewall Attack: Use war-dialing, etc. to find insecure dialup facilites Potentially difficult to detect Now you have an insider attack Countermeasure: Secure all dialup facilities Well, sounds good in theory 35

Insider Attacks Now you have a real problem Problem: Although firewalls filter traffic in both directions, they generally focus on incoming as opposed to outgoing Generally ACLs are more permissive to hosts within the administrative domain Solution: Don t let the attackers get in Properly secure your firewall from the inside as well 36

Firewall Security Summary A well configured firewall is a critical piece of a security infrastructure The key is well configured Done correctly, a firewall will stop many of the most common attacks out there Some organizations don t have them E.g., Most major research institutions Just a piece of the puzzle Layered defense is the real solution 37