A Stateful Inspection of FireWall-1



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

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

Firewalls. Chapter 3

Stateful Firewalls. Hank and Foo

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

Firewalls, Tunnels, and Network Intrusion Detection

Firewalls. configuring a sophisticated GNU/Linux firewall involves understanding

Port Scanning and Vulnerability Assessment. ECE4893 Internetwork Security Georgia Institute of Technology

Firewalls, Tunnels, and Network Intrusion Detection. Firewalls

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

Linux Network Security

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

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

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

21.4 Network Address Translation (NAT) NAT concept

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

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

Firewalls (IPTABLES)

Firewalls. Ahmad Almulhem March 10, 2012

Learn Ethical Hacking, Become a Pentester

How To Understand A Firewall

12. Firewalls Content

Solution of Exercise Sheet 5

My FreeScan Vulnerabilities Report

Firewall Implementation

Network Address Translation (NAT) Virtual Private Networks (VPN)

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Protecting and controlling Virtual LANs by Linux router-firewall

Chapter 4 Firewall Protection and Content Filtering

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

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

Firewalls. Network Security. Firewalls Defined. Firewalls

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Chapter 4 Firewall Protection and Content Filtering

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

Network Security Fundamentals

Security Technology: Firewalls and VPNs

Firewalls. Chien-Chung Shen

Firewall Defaults and Some Basic Rules

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Overview. Firewall Security. Perimeter Security Devices. Routers

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

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

+ iptables. packet filtering && firewall

Network Address Translation (NAT)

Introduction to Firewalls

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Firewall

Denial of Service. Tom Chen SMU

About Firewall Protection

Network Security CS 192

Configuring IPSec VPN Tunnel between NetScreen Remote Client and RN300

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

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

Internet Security Firewalls

REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB

Security vulnerabilities in the Internet and possible solutions

Reverse Shells Enable Attackers To Operate From Your Network. Richard Hammer August 2006

Network Defense Tools

Linux Routers and Community Networks

Chapter 20 Firewalls. Cryptography and Network Security Chapter 22. What is a Firewall? Introduction 4/19/2010

Firewalls Netasq. Security Management by NETASQ

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

ICSA Labs Network Protection Devices Test Specification Version 1.3

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

ReadyNAS Remote White Paper. NETGEAR May 2010

Firewalls. Pehr Söderman KTH-CSC

NETASQ MIGRATING FROM V8 TO V9

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

Check Point FireWall-1 White Paper

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

OS/390 Firewall Technology Overview

Chapter 11. User Datagram Protocol (UDP)

IP Firewalls. an overview of the principles

Firewalls, IDS and IPS

Firewall Audit Techniques. K.S.Narayanan HCL Technologies Limited

Network Security Topologies. Chapter 11

INTRUSION DETECTION SYSTEMS and Network Security

Chapter 8 Phase3: Gaining Access Using Network Attacks

CSCI 4250/6250 Fall 2015 Computer and Networks Security

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

Internet infrastructure. Prof. dr. ir. André Mariën

Cisco Configuring Commonly Used IP ACLs

Raptor Firewall Products

Firewalls & Intrusion Detection

Компјутерски Мрежи NAT & ICMP

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

Introduction to Computer Security

Firewalls and Intrusion Detection

CMPT 471 Networking II

Proxy Server, Network Address Translator, Firewall. Proxy Server

Computer and Network Security Exercise no. 4

The Cisco IOS Firewall feature set is supported on the following platforms: Cisco 2600 series Cisco 3600 series

Introduction to Computer Security

Transcription:

A Stateful Inspection of FireWall-1 Thomas Lopatic, John McDonald TÜV data protect GmbH data protect tl@dataprotect.com, jm@dataprotect.com Dug Song CITI at the University of Michigan dugsong@umich.edu T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 1

Overview Architecture of FireWall-1 Attacking the firewall s state I FWZ encapsulation Attacking the firewall s state II Attacking authentication between firewall modules Hardening FireWall-1 The big picture T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 2

Topology Windows NT 194.221.6.149 194.221.6.159 Hub Solaris 172.16.0.2 172.16.0.1 Nokia IP-440 192.168.0.1 OpenBSD 192.168.0.3 Linux 192.168.0.2 Victim network Hostile network T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 3

Problems in Inspection Unreliable / unauthenticated input Layering restrictions on inspection Layering violations in inspection Ambiguous end-to-end semantics T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 4

Example: Airport Security Unreliable / unauthenticated input Examining baggage tags Layering restrictions on inspection Examining shape, size, weight Layering violations in inspection Parallelizing bag content inspection Ambiguous end-to-end semantics Checking for known contraband T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 5

Classification of the Attacks Unreliable / unauthenticated input TCP fastmode Layering restrictions on inspection FWZ VPN encapsulation Layering violations in inspection FTP data connection handling unidirectional TCP data flow RSH error connection handling Ambiguous end-to-end semantics Parsing of FTP PORT commands T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 6

FireWall-1 Modules GUI Port 258/TCP Management module Port 256/TCP Security policy, status, logs Authentication methods S/Key, FWN1, FWA1 Filter module Filter module Filter module T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 7

Inter-Module Protocol Version Version Command IP addresses IP addresses Management module Required authentication Authentication Arguments, Result Filter module T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 8

S/Key Authentication Hash n (x) = Hash(Hash(... Hash(x))) = Hash(Hash n-1 (x)) n times Seed x (password hash) Index = 99 Hash 99 (x)... Index = 1 Hash 1 (x) Calculate seed y, Hash 100 (y) Hash 100 (x) y = MakeSeed(time(NULL)) Attack: brute force T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 9

FWN1 Authentication Random number R 1 S 1 = Hash(R 1 + K) Random number R 2 S 2 = Hash(R 2 + K) Shared key K ( fw putkey ) Attack: choose R 2 = R 1, so that S 2 = S 1 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 10

FWA1 Authentication Random number R 1 S 1 = Hash(R 1 + K) Random number R 2 S 2 = Hash((R 1 ^ R 2 ) + K) Shared key K ( fw putkey ) Attack: choose R 2 = 0, so that R 1 ^ R 2 = R 1 and S 2 = Hash((R 1 ^ R 2 ) + K) = Hash(R 1 + K) = S 1 To be solved: encryption T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 11

Stateful Inspection I virtual defrag chain of fragments ACCEPT pre-inspection connections virtual machine connections pending ACCEPT REJECT T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 12

Stateful Inspection II C accepted UDP packet S internal client C UDP replies accepted any external server UDP connections from a client, port C to a server, port S + wildcard port <s-address, s-port, d-address, d-port, protocol> T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 13

Stateful Inspection III FTP server 172.16.0.2 FTP server 172.16.0.2 PORT 192,168,0,2,4,36 21 > 1023 20 1060 data connection PASV 21 > 1023 227... (172,16,0,2,4,36) 1060 > 1023 data connection FTP client 192.168.0.2 FTP client 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 14

Fastmode Services 172.16.0.x non-syns non-syns Internet non-syn packets accepted Source port = fastmode service Destination port = fastmode service Stealth scanning (FINs,...) T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 15

FTP PORT Parsing 172.16.0.2 PORT 172,16,0,258,p1,p2 172.16.1.2 data connection Application: bounce attack PORT 172,16,1349632,2,p1,p2 1349632 = 65536 * (192-172) + 256 * (168-16) 172.16.0.2 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 16

FTP PASV Handling XXXXXXXXXXXXXX227 (172,16,0,2,128,7) 172.16.0.2 500 Invalid command giv en: XXXXXXXXXXXXXX 227 (172,16,0,2,128,7) 192.168.0.2 Advertise small Maximal Segment Size Server replies split T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 17

One-way Connections I TCP header + payload DROP Intranet ACCEPT TCP header TCP payload established one-way connection T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 18

One-way Connections II open one-way connection datagram A datagram B open one-way connection 172.16.0.2 192.168.0.2 retransmission of B [...] T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 19

FWZ Encapsulation I 2. d-address = firewall, protocol = 94 1. original d-address, original protocol + modified IP header IP payload encapsulation info (obfuscated) VPN tunneling protocol Decapsulation without decryption or authentication Cannot be disabled T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 20

FWZ Encapsulation II s-addr = 10.0.0.1 d-addr = 194.221.6.19 d-addr = 131.159.1.1 IP header encapsulation info 10.x.x.x 194.221.6.19 131.159.1.1 Key to spoofing attacks T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 21

Fake PORT Commands s-addr = 172.16.0.2 d-addr = 192.168.0.1 PORT 172,16,0,2,128,7 d-addr = 192.168.0.2 IP header TCP header + payload encapsulation info fake PORT packet FTP client 172.16.0.2 192.168.0.1 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 22

RSH Error Connections I 1024 error port is 1025 514 RSH client 172.16.0.2 1025 error connection < 1024 RSH server 192.168.0.2 <172.16.0.2, 1024, 192.168.0.2, 514, 6> in connections <172.16.0.2, 1025, 192.168.0.2, magic, 6> in pending Reversed matching T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 23

RSH Error Connections II SYN packet #2 (port info) s-addr:s-port d-addr:magic seq + 1 172.16.0.2:1024 192.168.0.2:magic 250001 s-addr:error-port d-addr:magic protocol 172.16.0.2:1025 192.168.0.2:magic 6 (TCP) s-addr:s-port d-addr:magic seq + 1 seq = 5 172.16.0.2:32775 192.168.0.2:magic 6 = seq + 1 = TCP T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 24

Fake UDP Requests s-addr = 172.16.0.2 d-addr = 192.168.0.1 s-port = 161 d-port = 53 d-addr = 192.168.0.2 IP header UDP header encapsulation info fake DNS request DNS client 172.16.0.2 192.168.0.1 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 25

FWZ Encapsulation III s-addr = 131.159.1.1 d-addr = 194.221.6.19 d-addr = 10.0.0.1 IP header encapsulation info 10.x.x.x 194.221.6.19 131.159.1.1 Key to non-routable addresses T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 26

Anti-Spoofing Protection I 1. s-addr = 192.168.0.1 d-addr = 192.168.0.1 2. s-addr = 192.168.0.2 d-addr = 192.168.0.1 s-port = 161 d-port = 53 s-port = any d-port = 161 d-addr = 192.168.0.2 1. fake DNS request 2. tunnel to firewall 192.168.0.1 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 27

Anti-Spoofing Protection II 1. s-addr = 224.0.0.1 d-addr = 192.168.0.1 2. s-addr = 192.168.0.2 d-addr = 192.168.0.1 s-port = 161 d-port = 53 s-port = 53 d-port = 161 d-addr = 192.168.0.2 d-addr = 224.0.0.1 1. fake DNS request 2. tunnel to firewall 192.168.0.1 192.168.0.2 T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 28

Hardening I Disable implicit rules DNS control connections ICMP Restrictive access rules no any sources or destinations deny broadcast / multicast addresses minimal privilege Properly configure anti-spoofing mechanism Filter protocol 94 (e.g. IP Filter) T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 29

Hardening II Different (virtual) IP addresses for public services Restrict control connections FWA1 authentication VPN technology never use 127.0.0.1: */none More than one line of defense! T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 30

Fixes by Check Point Solutions by Check Point available today at http://www.checkpoint.com/techsupport T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 31

Thanks. Thomas Lopatic tl@dataprotect.com John McDonald jm@dataprotect.com Dug Song dugsong@umich.edu T. Lopatic, J. McDonald, D. Song, "A Stateful Inspection of FireWall-1", Black Hat Briefings 2000 32