Firewalls, IDS and IPS: MIS5214 Midterm Study Support Materials
Firewalls, IDS and IPS: MIS5214 Midterm Study Support Materials
MIS5214
Midterm Study Support Materials
Agenda
• Firewalls
• Intrusion Detection Systems
• Intrusion Prevention Systems
Firewalls are used to Implement Network Security
Policy
• Firewalls support and enforce an organization’s network security policy
• High-level directives on acceptable an unacceptable actions to protect
critical assets
• Firewall security policy:
• What services can be accessed
• What IP addresses and ranges are restricted
• What ports can be accessed
Firewalls are security architecture “choke points” in
an IT network
• All communication should flow through and be inspected and
restricted by firewalls
• Are used to restrict access to one network from another
• Restrict access from the internet to access corporate networks
• Restrict access between internal network segments
• Restrict access
• Between origin and destination
• Based on determination of acceptable traffic type(s)
Firewalls are used to Implement Network Security
Policy
• Firewalls support and enforce an organization’s network security policy
• High-level directives on acceptable and unacceptable actions to protect
critical assets
• Firewall security policy identifies:
• What services can be accessed
• What IP addresses and ranges are restricted
• What ports can be accessed
Firewall Technology
• May be implemented as a
• Software product running on a server
• Specialized hardware appliance
• Monitors data packets coming into and out of the network it is protecting
• Packets are filtered by:
• Source and destination addresses and ports
• Header information
• Protocol type
• Packet type
• Service
• Data content – i.e. application and file data content
Demilitarized Zone (DMZ)
1. Packet filtering
2. Dynamic packet filtering
3. Stateful inspection
4. Proxy Firewall
5. Kernal Proxy
Packet-filtering firewalls
• “First-generation” firewall technology – most basic and primitive
• Capabilities built into most firewalls and routers
• Configured with access control lists (ACLs) which dictate the
type of traffic permitted into and out of the network
• Filters compare protocol header information from network and
transport layers with ACLs
Packet-filtering Firewalls
Compares ACLS with network protocol header values to determine permit/deny network access based on:
1. Source and destination IP addresses 3. Protocol types
2. Source and destination port numbers 4. Inbound and outbound traffic direction
Network Layer 3
• Block all ICMP (Internet Control Message Protocol) i.e. router error messages and
operational information traffic from entering through a certain interface:
deny icmp any any
• Allow standard web traffic ( to a web server listening on port 80) from system 1.1.1.1 to
system 5.5.5.5:
permit tcp host 1.1.1.1 host 5.5.5.5 eq www
Packet-filtering firewalls
Packet filtering firewalls: monitor traffic and provide “stateless inspection” of header attribute
values (i.e. delivery information) of individual packets
and after the decision to permit or deny access to the network is made the firewall forgets about
the packets
• Strengths: Useful at the edge of a network to quickly and efficiently strip out obvious “junk”
traffic
• High performance and highly scalable because they do not carry out extensive processing on the packets and
are not application dependent
• First line of defense to block all network traffic that is obviously malicious or unintended for a specific
network
• Typically complemented with more sophisticated firewalls able to identify non-obvious security risks
Dynamic Packet-Filtering Firewalls
When an internal system needs to communicate with a
computer outside its trusted network it needs to choose an
identify its source port so the receiving system knows
how/where to reply
• Ports up to 1023 are reserved for specific server-side
services and are known as “well-known ports”
• Sending system must choose a randomly identified port
higher than 1023 to use to setup a connection with
another computer
• The dynamic packet-filtering firewall creates an ACL that allows the external entity to
communicate with the internal system via this high-numbered port
• The ACLs are dynamic in nature – once the connection is finished the ACL is removed
• The dynamic packet-filtering firewall offers the benefit of allowing any type of traffic
outbound and permitting only response traffic inbound
Stateful Inspection Firewall
• Remembers and keeps track of what computers say to each other
• Tracks where packets went until each particular connection between computers is
closed
• Uses a “state table” which it updates to track the contents of packets each
computer sent to each other
• Makes sure the sequential process of packet message interchange involved in
connection-oriented protocols (e.g. TCP – transmission control protocol) are properly
synchronized and formatted
• If not an attack is detected and blocked
Stateful Inspection
example
Determine if all TCP Flags set to 1
• Attackers send packets with all C E U A P R S F
TCP flags set to 1 with hope that
the firewall will not understand
or check these values and
forward them to the server
• Under no circumstances during
legitimate TCP connections are
all values turned to 1
• If detected connection is blocked
Stateful Inspection example
Stateful inspection firewall assures that TCP (connection-oriented protocol) proceeds through
a series of states:
Stateful firewall keeps track of
each of these states for each
packet passing through, along
with corresponding
acknowledgement and
sequence numbers
“Two-tiered configuration”
Characteristics of Firewall Architecture
• Dual-homed
• A single computer with separate NICs connected to internal and external network
• Used to divide an external untrusted network from an internal trusted network
• Must harden and disable computer’s forwarding and routing functionality so the two
networks communicate through the computer’s firewall software and are truly segregated
• Screened host
• A router filters and screens traffic applying its ACL to drop ‘junk’ traffic before it is passed to
the firewall
• Screened subnet
• An external router filters/screens traffic before it enters the subnet, sending remaining
traffic through two firewalls before making its way to the internal network
Good firewall behavior…
• The Firewall’s default action is to deny any packets explicitly not allowed
• If no rule in the ACL explicitly says the packet can come in, it is dropped
• Any packet coming in from the Internet containing the source address of an internal host should be dropped
• Spoofing or masquerading attack reflected in a modified packet header having the source address of a host inside the
target network
• No packet should be permitted to leave that does not contain a source address of an internal host – this is
how DDoS zombies work
• Many companies deny packets with source routing information in the headers which may circumnavigate
internal routers and firewalls
• Firewalls not effective “out of the box”
• Need to understand internal default rules which may negate user provided rules
• Can create bottlenecks
• Need to effectively distribute them throughout the network to control network access points and provide
appropriate “defense in depth”
• Do not protect against malware, complex attack types, sniffers, rogue access points
Common firewall rules:
Stealth rule
Disallow unauthorized systems from accessing to firewall software
Silent rule
Identify and drop “noisy” traffic without logging it to reduce log sizes by not
responding to unimportant packets
Cleanup rule
Last rule in the rule base drops and logs remaining traffic that does not meet preceding
rules
Negate rule
Create tighter rules by specifying what system can be accessed and how (whitelisting),
and do not use broad and permissive rules that default to any traffic (e.g. blacklisting)
Agenda
• Firewalls
• Intrusion Detection Systems
• Intrusion Prevention Systems
Intrusion Detection Systems (IDSs)
• While firewalls and antivirus are preventive
controls, IDSs are access control monitoring
devices designed to
1. Detect a security breach
2. Aid in mitigating damage caused by hackers
breaking into sensitive computer and network
systems
• IDS’ components
1. Sensors
• Collect and send traffic and user activity data to analyzers
2. Analyzers
• Look for suspicious activity and if found sends alert to
administrator’s interface
3. Administrative interfaces
Intrusion Detection Systems (IDSs)
Two main types of IDS
1. Host-based for analyzing activity within a particular computer system
2. Network-based for monitoring network communications
IDS can be configured to:
• Watch for attacks
• Parse audit logs
• Terminate a connection
• Alert administrator as attacks happen
• Expose a hacker and her/his techniques
• Illustrate which vulnerabilities need to be addressed
Intrusion Detection Systems (IDSs)
Host-based IDS (HIDS)
• Can be installed to look at the data packets within the higher levels of the OSI
stack for anomalous or inappropriate activity on individual servers and/or
workstations
• Usually installed on critical servers (too much administrative overhead to put
them everywhere)
• Make sure users do not put the system at risk by activities such as deleting
system files or reconfiguring important settings
• Does deeper inspection of the packets
• Does not understand network traffic
Intrusion Detection Systems (IDSs)
Network-based IDS (NIDS)
• Uses sensors which can be either host computers with specialized software
installed or dedicated appliances
• Each have a NIC (network interface card)
• NIC is configured in promiscuous mode to capture all traffic (rather than packets addressed to
the host computer
• Copies packets – sending one copy up the TCP stack (for normal processing or possible
analysis with a HIDS), and another copy to analyzer looking for specific patterns in the
network traffic
• Monitors network traffic, cannot see the activity happening within the higher
levels of the OSI stack (HIDS is used for this)
Basic
architecture of
a Network IDS
Possible responses to a
triggered event:
• Disconnect
communications and block
transmission of traffic
• Block a user from
accessing a resource
• Send alerts of an event
trigger to other hosts, IDS
monitors and
administrators
Agenda
Firewalls
Intrusion Detection Systems
Intrusion Prevention Systems