Firewall and IDS/IPS. What is a firewall?



Similar documents
What is a firewall? Firewall and IDS/IPS

Firewall and IDS/IPS. What is a firewall? Ingress vs. Egress firewall. M.Aime, A.Lioy - Politecnico di Torino ( ) 1

Proxy Server, Network Address Translator, Firewall. Proxy Server

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

Chapter 9 Firewalls and Intrusion Prevention Systems

12. Firewalls Content

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

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

CS 356 Lecture 19 and 20 Firewalls and Intrusion Prevention. Spring 2013

What is a Firewall? Computer Security. Firewalls. What is a Firewall? What is a Firewall?

Security Technology: Firewalls and VPNs

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

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

Firewalls. Ahmad Almulhem March 10, 2012

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

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

CSCE 465 Computer & Network Security

Network Security and Firewall 1

Network Defense Tools

How To Understand A Firewall

Chapter 7. Firewalls

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

Introduction to Firewalls

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

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

Firewalls (IPTABLES)

Chapter 15. Firewalls, IDS and IPS

Cornerstones of Security

Network Security Management

What would you like to protect?

Linux Network Security

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

Firewalls, IDS and IPS

Firewalls CSCI 454/554

Firewalls. Network Security. Firewalls Defined. Firewalls

Computer Security: Principles and Practice

Stateful Inspection Technology

How To Protect Your Network From Attack

CS5008: Internet Computing

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

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

Computer Security DD2395

Networking Basics and Network Security

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

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

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

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

FIREWALLS & CBAC. philip.heimer@hh.se

Firewalls P+S Linux Router & Firewall 2013

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

Overview. Firewall Security. Perimeter Security Devices. Routers

CS2107 Introduction to Information and System Security (Slid. (Slide set 8)

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

Firewalls. Chien-Chung Shen

NETWORK SECURITY (W/LAB) Course Syllabus

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

CIT 480: Securing Computer Systems. Firewalls

CIT 480: Securing Computer Systems. Firewalls

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

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

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

Firewall Configuration. Firewall Configuration. Solution Firewall Principles

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

Dissertation Title: SOCKS5-based Firewall Support For UDP-based Application. Author: Fung, King Pong

Lecture 23: Firewalls

Security threats and network. Software firewall. Hardware firewall. Firewalls

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

7. Firewall - Concept

Network Access Security. Lesson 10

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 22 Firewalls.

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Guideline on Firewall

Firewalls. Chapter 3

21.4 Network Address Translation (NAT) NAT concept

Intranet, Extranet, Firewall

Internet Security Firewalls

Intrusion Detection Systems

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

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

Definition of firewall

Proxies. Chapter 4. Network & Security Gildas Avoine

Cryptography and network security

Types of Firewalls E. Eugene Schultz Payoff

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

Chapter 20. Firewalls

INTRODUCTION TO FIREWALL SECURITY

Internet Protocol: IP packet headers. vendredi 18 octobre 13

CSCI Firewalls and Packet Filtering

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

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

Fig : Packet Filtering

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

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

Transcription:

Firewall and IDS/IPS Antonio Lioy < lioy @ polito.it > Politecnico di Torino Dip. Automatica e Informatica What is a firewall? firewall = wall to protect against fire propagation controlled connection between s at different security levels = boundary protection ( L1 > L2 ) at security level L1 INTERNAL NETWORK at security level L2 EXTERNAL NETWORK M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 1

ingress firewall Ingress vs. Egress firewall incoming connections typically to protect my public services sometimes as part of an application exchange initiated by my users egress firewall outgoing connections typically to check the activity of my personnel (!) easy classification for channel-based services (e.g. TCP applications), but difficult for message-based services (e.g. ICMP, UDP applications) Firewall design You don t buy a firewall, you design it! (you can buy its components) we need to achieve an optimal trade-off...... between security and functionality... with minimum cost M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 2

The security index security 0 20 40 60 80 100 % functionality 100 % 80 60 40 20 0 THE THREE COMMANDMENTS OF FIREWALL I. the FW must be the only contact point of the internal with the external one II. only the authorized traffic can traverse the FW III. the FW must be a highly secure system itself D.Cheswick S.Bellovin M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 3

Authorization policies All that is not explictly permitted, is forbidden higher security more difficult to manage All that is not explictly forbidden, is permitted lower security (open gates) more easy to manage General concepts the bigger an object, the more difficult to verify it if a process has not been activated, its bugs are not relevant big is NOT beatiful = minimal configuration a FW is not a general-purpose machine: minimal sw no users everybody is guilty unless he proves his innocence M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 4

FW: basic components screening router ( choke ) router that filters traffic at IP level bastion host secure system, with auditing application gateway ( proxy ) service that works on behalf of an application, with access control dual-homed gateway system with two cards and routing disabled A which level the controls are made? packet headers TCP stream UDP datagram application data application application gateway transport (TCP / UDP) (IP) circuit gateway packet filter datalink physical M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 5

"Screening router" architecture external "Screening router" architecture exploits the router to filter the traffic both at IP and upper levels no need for dedicated hardware no need for a proxy and hence no need to modify the applications simple, easy, cheap and... insecure! M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 6

"Dual-homed gateway" architecture external GW "Dual-homed gateway" architecture easy to implement small additional hardware requirements the internal can be masqueraded unflexible large work overhead M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 7

"Screened host" architecture external GW router: "Screened-host" architecture blocks the packets from INT to EXT unless they come from the bastion host blocks the packets from EXT to INT unless they go to the bastion host exception: directly enabled protocols bastion host: circuit/application level gateway to selectively enable some services servizi M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 8

"Screened-host" architecture more expensive more flexible complex to manage: two systems rather one possible selectively relax the controls over some services / hosts only the hosts/protocols passing through the bastion can be masqueraded (unless the router offers the NAT functionality) "Screened subnet" architecture external GW DMZ M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 9

"Screened subnet" architecture DMZ (De-Militarized Zone) the DMZ is home not only to the gateway but also to other hosts (tipically the public servers): Web remote access... the routing may be configured so that the internal is unknown expensive "Screened subnet" architecture (version 2) to reduce costs and simplify management often the routers are omitted (and their function incorporated into the gateway) AKA three-legged firewall external GW internal DMZ M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 10

Filters at level (I) address checking (ingress / egress filtering) disable incoming services (with exceptions): e.g. TELNET only towards INET e.g. incoming HTTP only to the DMZ web server problem with FTP (the data transfer channel is always created by the server) ICMP is dangerous (used for denial-of-service) but useful (ping, traceroute) so don t disable it, just rate-limit it closely monitor REDIRECT packets Problem with FTP across a firewall firewall FTP client open (S,TCP,21) put (OK) (OK) FTP server 21 20 (???) open (C,TCP,20) 21 M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 11

Passive FTP firewall FTP client open (S,tcp,21) pasv (OK) (OK) FTP server 21 20 open (S,tcp,1040) file (OK) (OK) (OK) port(1040) 1040 UDP Filters at level (II) is a datagram service, not a virtual circuit (so its checking poses a higher load) RPC uses random ports it is suggested to completely disable it (but DNS) distinguish internal and external interfaces pay attention to the number of filtering rules and their order: this may drastically change performance M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 12

Filtering points firewall incoming packets filter forwarding engine filter filter outgoing packets filter Filters on a router: an example policy: mail for 130.193 managed only by 130.193.2.1 sintax of CISCO router: access-list 100 permit tcp 0.0.0.0 255.255.255.255 130.193.2.1 0.0.0.0 eq 25 access-list 101 deny tcp 0.0.0.0 255.255.255.255 130.193.0.0 0.0.255.255 eq 25 M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 13

Bastion host - configuration should run only the relevant processes must log (securely!) all its activities log onto an internal secure system must have source routing disabled must have IP forwarding disabled should have mouse traps (e.g. fake ls) Firewall technologies different controls at various levels: (static) packet filter stateful (dynamic) packet filter cutoff proxy circuit-level gateway / proxy application-level gateway / proxy stateful inspection differences in terms of: performance protection of the firewall O.S. keeping or breaking the client-server model M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 14

Packet filter historically available on routers packet inspection at level IP header transport header Packet filter: pros and cons independent of applications good scalability approximate controls: easy to fool (e.g. IP spoofing, fragmented packets) good performance low cost (available on routers and in many OS) difficult to support services with dynamically allocated ports (e.g. FTP) complex to configure M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 15

two choices available: Packet filter & FTP leave open all dynamic ports (>1024) close all dynamic ports difficult trade-off between security and support to FTP!! open (S,tcp,21) internal pasv port(1040) FTP client open (S,tcp,1040) FTP server Stateful (dynamic) packet filter similar to packet filter but state-aware state informations from the transport or application level (e.g. FTP PORT command) can distinguish new connections from those already open state tables for open connections packets matching one row in the table are passed without any further control better performance than packet filter SMP support still has many of the static packet filter limitations M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 16

Application-level gateway composed by a set of proxies inspecting the packet payload at application level often requires modifications to the client application may optionally mask / renumber the internal IP addresses when used as part of a firewal, usually performs also peer authentication top security!! (e.g. against buffer overflow of the target application) Application-level gateway (1) rules are more fine-grained and simple than those of a packet filter every application needs a specific proxy delay in supporting new applications heavy on resources (many processes) low performance (user-mode processes) SMP may improve performance completely breaks the client/server model more protection for the server may authenticate the client not transparent to the client M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 17

Application-level gateway (2) the fw OS may be esposed to attacks problems with application-level security techniques (e.g. SSL) variants: transparent proxy less intrusive for the client strong application proxy only some commands/data are forwarded this is the only correct configuration for an application proxy Application-level gateway & FTP total control of the application session application space client FTP control connection data connection FTP proxy kernel space firewall OS control connection data connection server FTP M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 18

Circuit-level gateway (1) a generic proxy (i.e. not application-aware ) creates a transport-level circuit between client and server but it doesn t understand or manipulate in any way the payload data Circuit-level gateway (2) breaks the TCP/UDP-level client/server model during the connection more protection for the server isolated from all attacks related to the TCP handshake isolated from all attacks related to the IP fragmentation may authenticate the client but this requires modification to the application still exhibits many limitations of the packet filter M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 19

SOCKS a transport-level proxy (L4) that implements a circuit-level gateway invented at MIPS, v4 by NEC, v5 by IETF aka AFT (Authenticated Firewall Traversal) requires modified clients: standard: telnet, ftp, finger, whois library to develop own clients commercial support: all the major browsers (e.g. FX and IE) some firewalls (e.g. IBM) SOCKS RFCs RFC-1928 SOCKS protocol V5 RFC-1929 Username/password authentication for SOCKS V5 RFC-1961 GSS-API authentication method for SOCKS V5 RFC-3089 A SOCKS-based IPv6/IPv4 gateway mechanism M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 20

SOCKS: how it works the library replaces the standard socket system calls connect(), bind(), accept(),...... with calls that: open a channel to the SOCKS server send version, IP:port, user the server: checks its ACL opens the required channel (with its own IP address) and relays L4 payloads SOCKS v4: SOCKS: initial problems doesn t distinguish the internal and external nets weak user authentication (based on identd or id stored locally on client) supports only TCP solution = SOCKS v5: supports UDP too better authentication (user+pwd or GSS-API) encryption (between the SOCKS client and server) M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 21

Reverse proxy HTTP server acting just as a front-end for the real server(s) which the requests are passed to benefits: obfuscation (no info about the real server) load balancer SSL accelerator (with unprotected back-end connections ) web accelerator (=cache for static content) compression spoon feeding (gets from the server a whole dynamic page and feeds it to the client according to its speed, so unloading the application server) Reverse proxy: possible configurations external external firewall DMZ internal firewall DMZ internal reverse proxy reverse proxy serv1 serv2 serv1 serv2 VPN M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 22

FW architectures: which is the right one? theoretically, the higher the level and: the higher the CPU cycles needed the higher the protection level the (sad) reality: Firewall customers once had a vote, and voted in favor of transparency, performance and convenience instead of security; nobody should be surprised by the results. (Marcus J. Ranum, the grandfather of firewalls, firewall wizard mailing list, oct 2000) FW architectures: which is the right one? the best choice: not a single product, but a robust fw architecture that supplements the holes and vulnerabilities of the single components!!! for each component choose something available on several architectures: it s better to be able to choose rather than leaving the choice to the vendor!! beware of solutions promising to solve each and every security problem: may be it s just advertisement M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 23

Firewall: commercial products there is plenty of firewall manufacturers/vendors tipically on UNIX, sometimes on Windows (the latter requires changing the TCP/IP stack!) the free Firewall Toolkit (FWTK) TIS (www.tis.com) base application-gateway components the free IPchains / IPfilter / IPtables on Linux packet-filter Linux: netfilter components (image from wikipedia) M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 24

PREROUTING Default netfilter chains all incoming packets, before any routing decision INPUT packets with destination the node itself (the "localdelivery" routing table: "ip route show table local") FORWARD packets to be forwarded, after the routing decision OUTPUT packets generated by the node itself POSTROUTING all outgoing packets, just before sending them Netfilter / iptables: packet flow net card deny / reject net card prerouting conntrack mangle NAT (dst) (qdisc) routing decision forward filter mangle postrouting conntrack mangle NAT (src) (qdisc) input filter conntrack mangle local process output filter conntrack mangle NAT (dst) routing decision deny / reject deny / reject M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 25

Stealth firewall firewall without an IP address, so that it cannot be directly attacked physical packet interception (by setting the interfaces in promiscuous mode) external stealth firewall internal Local / personal firewall firewall directly installed at the node to be protected typically a packet filter w.r.t. a normal firewall, it may limit the programs than are allowed: to open channels towards other nodes (i.e. act as a client) to answer requests (i.e. act as a server) important to limit the diffusion of malware and trojans, or plain configuration mistakes firewall management must be separated from the system management M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 26

Protection offered by a firewall a firewall is 100% effective only for attacks over/against blocked channels the other channels require other protection techniques: VPN semantic firewall / IDS application-level security F W Intrusion Detection System (IDS) definition: system to identify individuals using a computer or a without authorization extendable to identify authorized users violating their privileges hypothesis: the behavioural pattern of non-authorized users differs from that of authorized users M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 27

passive IDS: IDS: functional features cryptographic checksum (e.g. tripwire) pattern matching ( attack signature ) active IDS: learning = statistical analysis of the system behaviour monitoring =active statistical info collection of traffic, data, sequences, actions reaction = comparison against statistical parameters (reaction when a threshold is exceeded) IDS: topological features HIDS (host-based IDS) log analysis (OS, service or application) internal OS monitoring tools NIDS (-based IDS) traffic monitoring tools M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 28

System Integrity Verifier SIV and LFM checks files / filesystems looking for changes e.g. changes to Windows registry, cron configuration, user privileges e.g. tripwire Log File Monitor checks the log files (OS and applications) looks for known patterns of successful attacks or attempts e.g. swatch sensor NIDS components checks traffic and logs looking for suspect patterns generated the relevant security events interacts with the system (ACLs, TCP reset,... ) director coordinates the sensors manages the security database IDS message system secure and reliable communication among the IDS components M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 29

NIDS architecture IDS director (host) sensor(s) DMZ (net) sensor (host) sensor(s) external FW internal (net) sensor(s) IDS/NIDS interoperability much needed because the attacks involve different organizations and/or are detected by different tools attack signature format: no standard, but Snort format is in large use alarm format and protocol for alarm transmission: IDMEF + IDXP + IODEF (IETF) SDEE (Cisco, ISS, SourceFire) M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 30

NIDS data flow data source activity sensor event notification analyzer security policy administrator alert manager operator response IDMEF + IDXP developed by the IETF Intrusion Detection Message Exchange Format indipendent from the protocol (IPv4, IPv6) supports internationalization and localization supports data aggregation and filtering (on the manager) Intrusion Detection exchange Protocol based on BEEP (RFC-3080) profile exchange (for end-to-end security, for ID) base security profile is TLS M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 31

SDEE Secure Device Event Exchange based on the webservice paradigm: messages in XML messages transported over HTTP or HTTPS closed standard (?), managed by the ICSAlabs IODEF Incident Object Description and Exchange Format is a superset of IDMEF used to exchange information between different organizations, keep statistics, evaluate risks,... M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 32

IPS Intrusion Prevention System to speed-up and automate the reaction to intrusions = IDS + distributed dynamic firewall a technology, not a prudoct, with large impact on many elements of the protection system dangerous! may take the wrong decision and block innocent traffic Honey pot external web server DMZ honey pot (external attacks) Decoy DMZ internal trusted host honey pot (internal attacks) M.Aime, A.Lioy - Politecnico di Torino (1995-2009) 33