Chapter 9 Firewalls. The Need for Firewalls Putting a Web server on the Internet without a firewall is dangerous –Remember in CNIT 123 how a firewall.

Slides:



Advertisements
Similar presentations
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Advertisements

 Dynamic policies o Change as system security state/load changes o GAA architecture  Extended access control lists  Pre-, mid- and post-conditions,
ITIS 1210 Introduction to Web-Based Information Systems Chapter 44 How Firewalls Work How Firewalls Work.
IUT– Network Security Course 1 Network Security Firewalls.
FIREWALLS Chapter 11.
1 Reading Log Files. 2 Segment Format
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning Last updated
Hacking Exposed 7 Network Security Secrets & Solutions Chapter 2 Scanning 1.
FIREWALLS. What is a Firewall? A firewall is hardware or software (or a combination of hardware and software) that monitors the transmission of packets.
System Security Scanning and Discovery Chapter 14.
How do Networks work – Really The purposes of set of slides is to show networks really work. Most people (including technical people) don’t know Many people.
Firewalls and Intrusion Detection Systems
K. Salah 1 Chapter 31 Security in the Internet. K. Salah 2 Figure 31.5 Position of TLS Transport Layer Security (TLS) was designed to provide security.
Intruder Trends Tom Longstaff CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by.
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
ICMP: Ping and Trace CCNA 1 version 3.0 Rick Graziani Spring 2005.
COEN 252: Computer Forensics Router Investigation.
1 Lecture 20: Firewalls motivation ingredients –packet filters –application gateways –bastion hosts and DMZ example firewall design using firewalls – virtual.
Firewalls Marin Stamov. Introduction Technological barrier designed to prevent unauthorized or unwanted communications between computer networks or hosts.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
1 Advanced Application and Web Filtering. 2 Common security attacks Finding a way into the network Exploiting software bugs, buffer overflows Denial of.
Port Scanning.
1 Chapter 6 Network Security Threats. 2 Objectives In this chapter, you will: Learn how to defend against packet sniffers Understand the TCP, UDP, and.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
1 Figure 5-4: Drivers of Performance Requirements: Traffic Volume and Complexity of Filtering Performance Requirements Traffic Volume (Packets per Second)
1Federal Network Systems, LLC CIS Network Security Instructor Professor Mort Anvair Notice: Use and Disclosure of Data. Limited Data Rights. This proposal.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
FIREWALL Mạng máy tính nâng cao-V1.
January 2009Prof. Reuven Aviv: Firewalls1 Firewalls.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
Chapter 6: Packet Filtering
1 Chapter 6: Proxy Server in Internet and Intranet Designs Designs That Include Proxy Server Essential Proxy Server Design Concepts Data Protection in.
OV Copyright © 2013 Logical Operations, Inc. All rights reserved. Network Security  Network Perimeter Security  Intrusion Detection and Prevention.
Defense Techniques Sepehr Sadra Tehran Co. Ltd. Ali Shayan November 2008.
OV Copyright © 2011 Element K Content LLC. All rights reserved. Network Security  Network Perimeter Security  Intrusion Detection and Prevention.
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
Packet Filtering Chapter 4. Learning Objectives Understand packets and packet filtering Understand approaches to packet filtering Set specific filtering.
Linux Networking and Security
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco IOS Threat Defense Features.
Chapter 2 Scanning Last modified Determining If The System Is Alive.
Scanning & Enumeration Lab 3 Once attacker knows who to attack, and knows some of what is there (e.g. DNS servers, mail servers, etc.) the next step is.
CIS 450 – Network Security Chapter 4 - Spoofing. Definition - To fool. In networking, the term is used to describe a variety of ways in which hardware.
Network Security Chapter 11 powered by DJ 1. Chapter Objectives  Describe today's increasing network security threats and explain the need to implement.
1 Firewalls Types of Firewalls Inspection Methods  Static Packet Inspection  Stateful Packet Inspection  NAT  Application Firewalls Firewall Architecture.
© Mike D. Schiffman. Synopsis  Introduction  Overview  Impetus  Internals  Implementation  Risk Mitigation  Futures.
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
Firewall – Survey  Purpose of a Firewall  To allow ‘proper’ traffic and discard all other traffic  Characteristic of a firewall  All traffic must go.
DoS/DDoS attack and defense
Hands-On Ethical Hacking and Network Defense
SEMINAR ON IP SPOOFING. IP spoofing is the creation of IP packets using forged (spoofed) source IP address. In the April 1989, AT & T Bell a lab was among.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
Enumeration. Definition Scanning identifies live hosts and running services Enumeration probes the identified services more fully for known weaknesses.
Scanning.
Footprinting/Scanning/ Enumeration Lesson 9. Footprinting External attack: Enables attackers to create a profile of an organization’s security posture.
Network Devices and Firewalls Lesson 14. It applies to our class…
Chapter 8.  Upon completion of this chapter, you should be able to:  Understand the purpose of a firewall  Name two types of firewalls  Identify common.
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Common System Exploits Tom Chothia Computer Security, Lecture 17.
The Linux Operating System
Hping2.
Port Scanning (based on nmap tool)
Firewall – Survey Purpose of a Firewall Characteristic of a firewall
6.6 Firewalls Packet Filter (=filtering router)
Firewalls Jiang Long Spring 2002.
دیواره ی آتش.
Lecture 3: Secure Network Architecture
Session 20 INST 346 Technologies, Infrastructure and Architecture
Presentation transcript:

Chapter 9 Firewalls

The Need for Firewalls Putting a Web server on the Internet without a firewall is dangerous –Remember in CNIT 123 how a firewall protected your Web server from a DoS attack created with nmap But a misconfigured firewall is not much use

Firewall Landscape Two types of firewalls dominate the market today –Application proxies More secure but slower –Packet-filtering gateways Including Stateful packet-filtering gateways

How Safe is a Firewall? A well-designed, -configured, and - maintained firewall is nearly impenetrable Attackers will have to work around it by –Exploiting trust relationships –Finding weakest-link security vulnerabilities –Attacking through a VPN or dial-up account

Firewall Identification

Why Identify a Firewall? An attacker wants to determine the type, version, and rules of every firewall on the network To understand their weaknesses and exploit them

Firewall Identification Techniques Port scanning Firewalking Banner grabbing,

Direct Scanning: The Noisy Technique Some firewalls have obvious signatures –Check Point's FireWall-1 listens on TCP ports 256, 257, 258, and 259 –Check Point NG listens on TCP ports 18210, 18211, 18186, 18190, 18191, and as well –Microsoft's Proxy Server usually listens on TCP ports 1080 and 1745

Ways to Conceal a Scan Randomize target ports Randomize target addresses Randomize source ports Distributed source scans –Using multiple computers on the Internet, each taking a small portion of the scanning targets These techniques will fool most IDS systems with default rules

Direct Scanning Countermeasures Block unneeded ICMP packets at your border router Use an Intrusion Detection System, such as Snort IPPL is a Linux daemon that detects port scans (link Ch 901) Cisco routers have ACL rules to block scans

Route Tracing In the traceroute below, hop 14 is probably a firewall –Because it's the point of NAT to the target network –The –I switch sends ICMP Packets, not Linux's default of UDP

When ICMP is blocked Hop 13 is obviously the firewall, or at least the first router that blocks ICMP

Route Tracing Countermeasure Block ICMP TTL Expired packets

Banner Grabbing Just find an open port and connect to it with netcat

Banner-Grabbing Countermeasures Eliminate the open port on your firewall – A management port should not be open externally anyway If you must leave the ports open on the external interface of your firewall –Change the banner to display a legal warning reminding the offender that all attempts to connect will be logged

Advanced Firewall Discovery If a firewall can't be identified by port scanning, traceroute, or banner grabbing Firewalls and their ACL rules can be deduced by probing targets and noticing the paths taken (or not taken) to get there

Simple Deduction with nmap When nmap flags a port as "filtered", one of these conditions is true –No SYN/ACK packet was received –No RST/ACK packet was received –An ICMP type 3 message (Destination Unreachable) with code 13 (Communication Administratively Prohibited - [RFC 1812]) was received Those ICMP messages reveal your firewall rules

Ports 23 and 111 are filtered

Simple Deduction with nmap Countermeasures Block nmap scans with an Intrusion Prevention System Disable IP Unreachable messages on your firewall –This prevents it from sending the ICMP type 3, code 13 (Admin Prohibited Filter) packets

Port Identification Some firewalls display a series of numbers when you connect to them For example, Check Point will display a series of numbers when you connect to its SNMP management port, TCP 257.

Port Identification Countermeasure Prevent connections to management ports by blocking them at your upstream routers

Scanning Through Firewalls

Raw Packet Tranismissions hping2 can send ICMP, TCP, or UDP packets to a target and reports on what returns That lets you interpret the results yourself, rather than relying on nmap's programmed analysis

Demo: Scan with nmap

Demo: Scan with hping2 From a Ubuntu VM (andLinux doesn't work) sudo apt-get install hping2 –S switch sends a SYN packet -c 1 sends only one packet -p 21 specifies port 21 Open port returns flags=SA (SYN/ACK)

Demo: Scan with hping2 Closed port returns flags=RA (RST/ACK) Filtered port returns nothing

ICMP Type 13 Some firewalls return ICMP Type 3 with code 13 packets, which inform you that the firewall blocked the connection It's a good idea to block those ICMP Type 3 with code 13 packets

Firewalk

Firewalk Looks Through a Firewall The target is Router3 We want to know which ports Router3 blocks, and which ports it allows through

Firewalk Phase 1: Hopcount Ramping First Firewalk sends out a series of packets towards the destination with TTL=1, 2, 3, … When the target (Router3) is reached, that determines the TTL for the next phase

Firewalk Phase 1: Hopcount Ramping In this example, the Target is at TTL=3, so all future packets will use TTL=4

Firewalk Phase 2: Firewalking TCP or UDP paclets are sent from the scanning host to the Destination They all have TTL=4

Firewalk Phase 2: Firewalking If a packet reaches the Destination, it will send an "ICMP TTL expired in transit" message If Router3 blocks the packet, there is no response

Demo: Firewalking

No Firewall All ports are open (not blocked by a firewall)

Firewall Blocking TCP Ports Those ports give no response

Firewalk Countermeasures You can block "ICMP TTL expired" packets at the gateway But this may negatively affect its performance Because legitimate clients connecting will never know what happened to their connection

Source Port Scanning

Destination Ports This is normal traffic into a company's DNS Server

Destination Port Filtering So a simple stateless firewall could be set up this way to protect that network

Destination Port Filtering Company workers can't use DNS!

Source Port Filtering Now users are happy, because they can use DNS and FTP servers

Spoofing Source Ports The –g option in nmap can spoof any desired source port This will scan right through stateless firewalls that use source port filtering

Source Port Scanning This is how normal FTP works

The Attack

Fpipe Allows any traffic to be redirected to any chosen port So an attack could go through port 20, looking like FTP to the firewall –Loni Ch 904

Source Port Scanning Countermeasures Switch to a stateful or application-based proxy firewall that keeps better control of incoming and outgoing connections, or Disable any communications that require more than one port combination (such as traditional FTP) And employ firewall-friendly applications such as Passive FTP that do not violate the firewall rules

Packet Filtering

Packet-Filtering Firewalls These firewalls depend on access control lists (ACLs), even if they are stateful –Check Point's FireWall-1 –Cisco's PIX –Cisco's IOS

Liberal ACLs Poorly written ACLs allow unwanted traffic If you want to allow your ISP to perform zone transfers –"Allow all activity from the TCP source port of 53" Too liberal –"Allow activity from the ISP's DNS server with a TCP source port of 53 and a destination port of 53."

Check Point Trickery Check Point 3.0 and 4.0 provide ports open by default –DNS lookups (UDP 53) –DNS zone transfers (TCP 53) –RIP (UDP 520) Are all allowed from any host to any host and are not logged

Control Via Port 53 A compromised system can be controlled over port 53, right through the firewall

Check Point Trickery Countermeasures Disable unnecessary traffic that was allowed by default

ICMP and UDP Tunneling Wrapping real data in an ICMP header This creates a covert channel Many routers and firewalls that allow ICMP ECHO, ICMP ECHO REPLY, and UDP packets through will be vulnerable to this attack Loki is a tool that does this (link Ch 2m)

ICMP and UDP Tunneling Countermeasure Block ICMP packets at the firewall –You may break ICMP heartbeats

Application Proxy Vulnerabilities

Application Proxy Also called an Application Gateway An application program that runs on a firewall between two networks No direct connections between the networks are allowed –Both sides must connect only to the proxy –The proxy makes all packet-forwarding decisions

Application Proxy Application proxies are very secure, but require more memory and processor resources than to other firewall technologies, such as stateful inspection –Link Ch 906

Hostname: localhost Some older UNIX proxies allowed a user to log directly into the proxy server itself with the user name "localhost" The ideal countermeasure is to not allow localhost logins

Unauthenticated External Proxy Access The firewall may restrict internal connections, but not access from the outside This allows attacks like –Using your proxy to attack other systems –Gaining access to your intranet from the Web

Unauthenticated External Proxy Access Countermeasures Disallow proxy access from the external interface of the firewall Restrict incoming proxy traffic at your border routers

WinGate Vulnerabilities WinGate is a proxy server and firewall Very common in the 1990s for Internet connection sharing Versions prior to 2.1d (1997) were notoriously insecure by default –Links Ch 907, Ch 908

Unauthenticated Browsing WinGate proxies allowed outsiders to browse the Internet completely anonymously Attackers could hack with little risk of getting caught The unauthenticated SOCKS proxy (TCP 1080 is also vulnerable

Unauthenticated Browsing Countermeasure Restrict the bindings of specific services –Only allow the internal interface to access the SOCKS and WWW services

Unauthenticated Telnet WinGate servers also forwarded Telnet traffic anonymously The cure is to bind Telnet to the local interfaces

File Browsing Default WinGate 3.0 installations allow anyone to view files on the system through their management port (8010) –With a URL like this – Countermeasure: upgrade to a newer version of Wingate

–Last modified