Lecture 4 Firewalls Iv3
Lecture 4 Firewalls Iv3
Firewall Fundamentals
Types of Firewall Implementation
Perimeter Security
Why Firewalls?
• Mitigate Risks
– Mitigate threats to assets from known vulnerabilities
– Reduce services open to Internet
– Mitigate trust attacks
Fundamentals
• Segregation/Privacy
– Segregate organisational traffic from Internet
– Hide organisations assets, systems/services from attackers
• Harder to perform reconnaissance
• Apply Organisation’s Security Policy
– Create choke points that traffic has to pass through –
perimeter and internal – apply filtering
Firewalls
• Monitoring
– Logging traffic passing through for analysing attacks
• F/W term comes from buildings
• Network Firewalls
• Gateways between 2
networks
• Allow Good traffic to pass
• Reject Bad traffic
• Walls funnel people to the gate
• Guard on the gate - decides who passes
through
• Choke point – all traffic should pass here
- Firewall built into most OS - Routers with firewalling S/w running
- Proxy/Application Firewalls – firewalling
specific applications
- Hardware firewalling
- Custom OS/Hardware
Q. Where is the perimeter f/w(s) implemented?
Trusted & Untrusted Network – Perimeter Between
AT&T AT&T
Stateful Stateful
Firewall Firewall
Network Perimeters
• Perimeter could be the Webserver for HTTP traffic
• Depending on firewall capabilities
• Important to know where perimeters are for all traffic
• Traffic should be forced to cross perimeter through a
choke point
• Where security policy can be applied/logging done
• Reduce paths into Network!
• Fox in the Hen house
• Typically default is only Higher trust zone to lower allowed to initiate connection
• Stateful also allows return traffic
• Lower to higher trust zone not allowed to initiate connection – packets dropped
• Windows Firewall – lab problems – Ping from GNS3 Router to local host
• Allows ICMP out + return traffic
• Drops ICMP by default incoming
• Default Rules the same:
• Higher trust zone to lower allowed to initiate connection + allows
return traffic
• Lower to higher trust zone not allowed to initiate connection
• Firewall Rules Out -> DMZ have been added to allow
access to web server
http://www.ranum.com/index.html
• Basic Firewalls operate at the lower levels, 3 & 4
• Advanced Firewalls can filter at all the layers
• As firewalls evolved filtering on more layers
Packet Filtering
Stateless Packet Filtering
• Oldest/most basic filtering firewalls
– Easily deployed on existing routers – Cisco in lab
– Cheap
• Very fast
– Only examine lower network layer headers IP/TCP
Overview
–
– Negotiated and passed in data payload of packet
– Would have to open up large range of ports – security hole
Policy allows Bob to browse the web
- Firewall Rule to allow traffic out ok
- Return rule - Only server port known in advance
Firewall Filtering Ruleset Ordering
• Firewall Rules
– Permit 192.168.10.0/24 HTTP outgoing to Internet
– Permit 192.168.20.0/24 HTTP outgoing to Internet
– Permit 192.168.30.0/24 HTTP outgoing to Internet
– Permit 192.168.40.1-30 HTTP outgoing to Internet
Overview
192.168.20.0/24
192.168.20.4
Threats
Packet Filtering Uses
• Fast basic filtering
• Help take load off more complex filtering firewalls/security devices
• Ingress Filtering
– Filter source IP = private addresses from Internet
• RFC 1918 filtering – block entire address space
– Filter source IP = internal addresses from Internet
Overview
SrcIP=WebServer, DestIP=AlicePC,
SrcPort=80, DestPort=1777
Crafted ACK Packet
Alice# nmap -sA –p1-65000 Bob_IPAddress
SrcIP=EvePC, DestIP=BobPC,
SrcPort=80, DestPort=666
Stateful Firewalls
Removing Connections from Cache
• Standard connection teardown handshake
– RST packet received
– FIN/ACK packets exchanged correctly
• Timeouts
Stateful
– Typically configurable
– Balancing act between availability and removing valid sessions
– Seconds to days depending on Vendor/Firewall
– Various Timeouts: Connection setup timer/Idle connection timer
• UDP
Firewalls
Moodle
Stateful Limitations
• Similar to static packet filtering
- No evaluation of application layer data
- No payload evaluation - Attacks/Unwanted traffic could be hidden in Payload
- No service validation
- Assumes port 80 is HTTP traffic – could be other service or tunnelled traffic
Firewalls
– Fragmented packets
– Signature based – can be bypassed by altering commands
slightly – add a space, or encode characters
Application Inspection Firewalls
• Stateful packet filtering + inspection of Application
payload
• More Secure than Standard Packet Filtering
– Validation of application protocols
– Some content filtering
Stateful
• Fast
– Not as fast as Static Packet Filtering
– Faster than a Proxy
• Up to Gb range depending on vendor
• Can be used as main perimeter connection on large pipe to Internet
Firewalls
application
• Validation of HTTP protocol
– e.g. drop HTTP POST commands
• Can mitigate XSS, SQL injection, session hijacking, and in some
cases zero-day threats, as only valid HTTP allowed – closed
Firewalls
security stance
• Commonly used for compliance – PCI-DSS
Common Proxy – Outbound Web Proxy
• Content filtering - Black/white list URL
filtering of Web traffic, web script filtering
• Cache Web pages
• User Authentication
Tiered Proxy Servers
• Web caching/user authentication
• Web content filtering/URL Black/White listing
Hybrid Firewalls
Hybrid Firewalls
Hybrid/Unified Threat Management (UTM)
• Move from firewalling to all inclusive security devices
• Combine multiple defenses into one box
• Powerful devices possibly including Stateful Inspection
Firewalling, Proxy Firewalling, Intrusion Prevention
Proxy