FIREWALLS
FIREWALLS Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others
FIREWALLS: WHY Prevent denial of service attacks: SYN flooding: attacker establishes many bogus TCP connections, no resources left for real connections Prevent illegal modification/access of internal data e.g., attacker replaces CIA s homepage with something else Allow only authorized access to inside network set of authenticated users/hosts
TYPES Three types of firewalls: 1. stateless packet filters 2. stateful packet filters 3. application gateways
STATELESS PACKET FILTERING
STATELESS PACKET FILTERING internal network connected to Internet via router firewall router filters packet-by-packet, decision to forward/drop packet based on: source IP address, destination IP address TCP/UDP source and destination port numbers ICMP message type TCP SYN and ACK bits
EXAMPLE 1 Block incoming and outgoing datagrams with IP protocol field = 17 and with either source or dest port = 23 result: all incoming, outgoing UDP flows and telnet connections are blocked
EXAMPLE 2 block inbound TCP segments with ACK=0. result: prevents external clients from making TCP connections with internal clients, but allows internal clients to connect to outside.
MORE EXAMPLES Policy Firewall Setting No outside Web access. Drop all outgoing packets to any IP address, port 80 No incoming TCP connections, except those for institution s public Web server only. Drop all incoming TCP SYN packets to any IP except 130.207.244.203, port 80 Prevent Web-radios from eating up the available bandwidth. Drop all incoming UDP packets - except DNS and router broadcasts.
MORE EXAMPLES Policy Firewall Setting Prevent your network from being used for a smurf DoS attack. Drop all ICMP packets going to a broadcast address (e.g. 130.207.255.255). Prevent your network from being tracerouted Drop all outgoing ICMP TTL expired traffic
ACCESS CONTROL LISTS ACL: Table of rules, applied top to bottom to incoming packets: (action, condition) pairs
ACCESS CONTROL LISTS (1) action source address dest address protocol source port dest port flag bit allow 222.22/16 outside 222.22/16 TCP > 1023 80 any allow outside 222.22/16 222.22/16 TCP 80 > 1023 ACK allow 222.22/16 outside 222.22/16 UDP > 1023 80 -
ACCESS CONTROL LISTS (2) action source address dest address protocol source port dest port flag bit allow outside 222.22/16 222.22/16 UDP 80 > 1023 - deny all all all all all all
STATEFUL PACKET FILTERING Stateless packet filter: heavy handed tool Admits packets that "make no sense," e.g., dest port = 80, ACK bit set, even though no TCP connection established: action source address dest address protocol source port dest port flag bit allow outside 222.22/16 222.22/16 TCP 80 > 1023 ACK
STATEFUL PACKET FILTERING Track status of every TCP connection track connection setup (SYN), teardown (FIN): determine whether incoming, outgoing packets "makes sense" timeout inactive connections at firewall: No longer admit packets
ACL ACL augmented to indicate need to check connection state table before admitting packet
ACL (1) action source address dest address ptcl source port dest port flag bit check conxion allow 222.22/16 outside 222.22/16 TCP > 1023 80 any allow outside 222.22/16 222.22/16 TCP 80 > 1023 ACK X allow 222.22/16 outside 222.22/16 UDP > 1023 80 -
ACL (2) action source address dest address ptcl source port dest port flag bit check conxion allow outside 222.22/16 222.22/16 UDP 80 > 1023 - X deny all all all all all all
APPLICATION GATEWAYS Filters packets on application data as well as on IP/TCP/UDP fields.
EXAMPLE: TELNET Allow selected internal users to telnet outside. Require all telnet users to telnet through gateway. For authorized users, gateway sets up telnet connection to dest host. Gateway relays data between 2 connections Router filter blocks all telnet connections not originating from gateway.
EXAMPLE: TELNET
EXAMPLE: TELNET
LIMITATIONS OF FIREWALLS, GATEWAYS IP spoofing: router can t know if data really comes from claimed source if multiple app s. need special treatment, each has own app. gateway client software must know how to contact gateway. e.g., must set IP address of proxy in Web browser filters often use all or nothing policy for UDP tradeoff: degree of communication with outside world, level of security many highly protected sites still suffer from attacks
INTRUSION DETECTION SYSTEMS
WHY For packet filtering: operates on TCP/IP headers only no correlation check among sessions
IDS: INTRUSION DETECTION SYSTEM Deep packet inspection: look at packet contents (e.g., check character strings in packet against database of known virus, attack strings) Examine correlation among multiple packets Port scanning Network mapping DoS attack
INTRUSION DETECTION SYSTEMS Multiple IDSs: different types of checking at different locations
INTRUSION PREVENTION SYSTEMS Intrusion detection systems typically raises an alarm by email/sms to the network admin An Intrusion Prevention Systems simply closes the connection in the firewall, if something suspicious is detected.
SIGNATURE-BASED IDS Maintains an extensive database of attack signatures A signature is a set of rules describing an intrusion activity May simply be a list of characteristics of a single packet (src, dest, portnumbers) Can be related to a series of packages Signatures normally made by skilled network security engineers Local system administrators can customize and add own
SIGNATURE-BASED IDS Operations of a signature based IDS Sniffs every packet passing by it Compares packet with each signature in database If it matches generate an alert
SIGNATURE-BASED IDS Limitations Require previous knowledge of attack to generate signature Can generate false positives Large processing load, and may fail in detection of malicious packets
ANOMALY-BASED IDS Creates a profile of standard network traffic As observed in normal operation Then looks for packet streams that are statistically different Example: Exponention growth in portscans or ping sweeps
ANOMALY-BASED IDS Positive Does not require prior knowledge to an attack Limitation Extremely challenging to distinguis between normal an unusual traffic Most systems today are signature based
EXAMPLE IDS: SNORT https://www.snort.org/ Multi platform Open source # a l e r t t c p $ H O M E _ N E T 6 6 6 - > $ E X T E R N A L _ N E T a n y ( m s g : " M A L W A R E - B A C K D O O R S a t a n s B a c k d o o r. 2. 0. B e t a " ; f l o w : t o _ c l i e n t, e s t a b l i s h e d ; c o n t e n t : " R e m o t e 3 A " ; d e p t h : 1 1 ; n o c a s e ; c o n t e n t : " Y o u a r e c o n n e c t e d t o m e. 0 D 0 A R e m o t e 3 A R e a d y f o r c o m m a n d s " ; d i s t a n c e : 0 ; n o c a s e ; m e t a d a t a : r u l e s e t c o m m u n i t y ; r e f e r e n c e : u r l, w w w. m e g a s e c u r i t y. o r g / t r o j a n s / s / s a t a n z b a c k d o o r / S B D 2. 0 b. h t m l ; r e f e r e n c e : u r l, w w w 3. c a. c o m / s e c u r i t y a d v i s o r / p e s t / p e s t. a s p x? i d = 5 2 6 0 ; c l a s s t y p e : t r o j a n - a c t i v i t y ; s i d : 1 1 8 ; r e v : 1 2 ; )
QUESTIONS?