FIREWALLS 1
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 ooding: attacker establishes many bogus TCP connections, no resources left for real connections Prevent illegal modi cation/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 2. 1
TYPES Three types of rewalls: 1. stateless packet lters 2. stateful packet lters 3. application gateways 2. 23
STATELESS PACKET FILTERING
STATELESS PACKET FILTERING internal network connected to Internet via router rewall router lters 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 3. 1
EXAMPLE 1 Block incoming and outgoing datagrams with IP protocol eld = 17 and with either source or dest port = 23 result: all incoming, outgoing UDP blocked ows and telnet connections are 3. 23
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. 3. 4
MORE EXAMPLES Policy No outside Web access. No incoming TCP connections, except those for institution s public Web server only. Prevent Web-radios from eating up the available bandwidth. Firewall Setting Drop all outgoing packets to any IP address, port 80 Drop all incoming TCP SYN packets to any IP except 130.207.244.203, port 80 Drop all incoming UDP packets - except DNS and router broadcasts.
MORE EXAMPLES Policy Prevent your network from being used for a smurf DoS attack. Prevent your network from being tracerouted Firewall Setting Drop all ICMP packets going to a broadcast address (e.g. 130.207.255.255). Drop all outgoing ICMP TTL expired traf c 3. 5
ACCESS CONTROL LISTS ACL: Table of rules, applied top to bottom to incoming packets: (action, condition) pairs 3. 67
ACCESS CONTROL LISTS (1) action source address dest address protocol source port dest port ag 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 ag bit allow outside 222.22/16 222.22/16 UDP 80 > 1023 - deny all all all all all all 3. 8
STATEFUL PACKET FILTERING Stateless packet lter: 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 ag bit allow outside 222.22/16 222.22/16 TCP 80 > 1023 ACK 3. 9
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 rewall: No longer admit packets 4. 12
ACL ACL augmented to indicate need to check connection state table before admitting packet 4. 3
ACL (1) action source address dest address ptcl source port dest port ag 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 ag bit check conxion allow outside 222.22/16 222.22/16 UDP 80 > 1023 - X deny all all all all all all 4. 4
APPLICATION GATEWAYS Filters packets on application data as well as on IP/TCP/UDP elds. 45. 51
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 lter blocks all telnet connections not originating from gateway.
EXAMPLE: TELNET 5. 2
EXAMPLE: TELNET 5. 34
LIMITATIONS OF FIREWALLS, GATEWAYS IP spoo ng: 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 lters 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 7. 16
WHY For packet ltering: operates on TCP/IP headers only no correlation check among sessions 7. 2
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 7. 3
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 rewall, if something suspicious is detected. 7. 45
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 8. 12
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 8. 3
ANOMALY-BASED IDS Creates a pro le of standard network traf c As observed in normal operation Then looks for packet streams that are statistically different Example: Exponention growth in portscans or ping sweeps 9. 1
ANOMALY-BASED IDS Positive Does not require prior knowledge to an attack Limitation Extremely challenging to distinguis between normal an unusual traf c Most systems today are signature based
EXAMPLE IDS: SNORT https://www.snort.org/ Multi platform Open source 9 10. 2
EXAMPLE IDS: SNORT # alert tcp $HOME_NET 666 -> $EXTERNAL_NET any (msg:"malware-backdoor SatansBackdoor.2.0.Beta"; flow:to_client,established; content:"remote 3A "; depth:11; nocase; content:"you are connected to me. 0D 0A Remote 3A Ready for commands"; distance:0; nocase; metadata:ruleset community; reference:url,www.megasecurity.org/trojans/s/satanzbackdoor/sbd2.0b.html; reference:url,www3.ca.com/securityadvisor/pest/pest.aspx?id=5260; classtype:trojan-activity; sid:118; rev:12;) 11
QUESTIONS? 12