Firewalls CS 772 Fall 2007
Introduction <ul><li>Any device, software, or arrangement that limits network access. </li></ul><ul><li>Categories: </li><...
Packet Filters <ul><li>Runs at the network level </li></ul><ul><li>Drop/permit packets based on their source or destinatio...
Example <ul><li>Intended policies: </li></ul><ul><ul><li>Limited connections are permitted through thr router between GW a...
Example (cont.) <ul><li>Rule set for external interface at the router (that is filtering packets coming in from the outsid...
Example (cont.) <ul><li>Rule set on the router’s interface to NET 1 </li></ul>
Sample Configurations
Packet-filtering Performance <ul><li>Total degradation due to filtering depends on the number of rules applied at any poin...
Application-level Filtering <ul><li>Deal with the details of the particular service they are checking </li></ul><ul><li>Sp...
Circuit-level Gateways <ul><li>Work at TCP level---TCP connections are relayed through a computer that essentially acts as...
SOCKS – Circuit-level gateway Protocol <ul><li>SOCKS  is an  Internet   protocol  that allows  client-server  applications...
Distributed Firewalls <ul><li>Rather than have a separate box on the edge of the network reject all inbound packets to por...
What Firewalls cannot do <ul><li>They are not a panacea </li></ul><ul><li>Useless against attacks from insiders (legitimat...
Application-Level Filtering <ul><li>More complex than packet filters---look at the details of the particular service they ...
Circuit-level Gateways <ul><li>Work at the TCP level </li></ul>
Firewall Problems (i) Inadvertent problems <ul><li>Example: Suppose a company has a policy to drop all e-mail coming throu...
Firewall Problems (ii) Intentional subversions <ul><li>Consciously subversions---more functionality, malicious parties </l...
Handling of IP Fragments <ul><li>0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+...
Firewalking <ul><li>http://www.packetfactory.net/firewalk/firewalk-final.html </li></ul><ul><li>http://vesaria.com/Firewal...
Upcoming SlideShare
Loading in …5
×

Firewalls.ppt

12,569 views

Published on

1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
12,569
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
291
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Firewalls.ppt

  1. 1. Firewalls CS 772 Fall 2007
  2. 2. Introduction <ul><li>Any device, software, or arrangement that limits network access. </li></ul><ul><li>Categories: </li></ul><ul><ul><li>Packet filtering (Network level) </li></ul></ul><ul><ul><li>Circuit gateways </li></ul></ul><ul><ul><li>Application gateways </li></ul></ul><ul><ul><li>Dynamic packet filter (Packet filter + circuit-level gateway) </li></ul></ul>
  3. 3. Packet Filters <ul><li>Runs at the network level </li></ul><ul><li>Drop/permit packets based on their source or destination addresses or port#s </li></ul><ul><li>No context is kept (memory less)---decision solely based on current packet contents </li></ul><ul><li>Filtering ma be done at the incoming interface, the outgoing interface, or both. </li></ul><ul><li>Ingress filtering: refers to traffic coming into your organization </li></ul><ul><li>Egress filtering: Outbound packet security is called egress filtering. </li></ul><ul><li>Rules are applied from top to bottom. So the last rule should be to block all those that don’t fit in the above rules. </li></ul>* OUR-GW Allow * * * * Block 25 OUR-GW * * Allow block action * src * SPIGOT * Port dest port
  4. 4. Example <ul><li>Intended policies: </li></ul><ul><ul><li>Limited connections are permitted through thr router between GW and the outside world </li></ul></ul><ul><ul><li>Very limited, but possibly different, conections are permitted between GW and anything on NET 2 or NET 3 </li></ul></ul><ul><ul><li>Any thing can pass between Net 2 and NET 3 </li></ul></ul><ul><ul><li>Outgoing calls are allowed between NET 2 or NET 2 and the external link </li></ul></ul>
  5. 5. Example (cont.) <ul><li>Rule set for external interface at the router (that is filtering packets coming in from the outside world) </li></ul>
  6. 6. Example (cont.) <ul><li>Rule set on the router’s interface to NET 1 </li></ul>
  7. 7. Sample Configurations
  8. 8. Packet-filtering Performance <ul><li>Total degradation due to filtering depends on the number of rules applied at any point. </li></ul><ul><li>It is better to hav eone rule specifying a network rather than to have several rules enumerating different hosts on that network. </li></ul><ul><li>Also, speed up things by ordering the rules so that the most common types of traffic are processed first. </li></ul>
  9. 9. Application-level Filtering <ul><li>Deal with the details of the particular service they are checking </li></ul><ul><li>Special purpose code needed for each application </li></ul><ul><li>Easy to log and control all incoming and outgoing traffic---e.g., checking mail message for specific words. </li></ul><ul><li>Web queries can be checked for conformation with organizational policies </li></ul><ul><li>E-mail is generally passed through an application-level filter </li></ul>
  10. 10. Circuit-level Gateways <ul><li>Work at TCP level---TCP connections are relayed through a computer that essentially acts as a wire </li></ul><ul><li>A client wishing to connect to a server, connects to the relay host supplying the needed info. The name and IP are not available to the server. </li></ul><ul><li>IP packets now flow from server to host, filtered and then to the client (like NAT) </li></ul><ul><li>Circuit relays are generally used to create specific connections between isolated networks </li></ul>
  11. 11. SOCKS – Circuit-level gateway Protocol <ul><li>SOCKS is an Internet protocol that allows client-server applications to transparently use the services of a network firewall . SOCKS is an abbreviation for &quot;SOCKetS&quot; [1] . </li></ul><ul><li>Clients behind a firewall, needing to access exterior servers, may connect to a SOCKS proxy server instead. Such proxy server controls the eligibility of the client to access the external server and passes the request on to the server. SOCKS can also be used in the opposite way, allowing the clients outside the firewall (&quot;exterior clients&quot;) to connect to servers inside the firewall (internal servers). </li></ul>
  12. 12. Distributed Firewalls <ul><li>Rather than have a separate box on the edge of the network reject all inbound packets to port 80, this rule is enforced by every host. </li></ul>
  13. 13. What Firewalls cannot do <ul><li>They are not a panacea </li></ul><ul><li>Useless against attacks from insiders (legitimate user with a bad intention) </li></ul><ul><li>Firewalls act at a specific layer and are not concerned about other layers </li></ul><ul><li>Transitivity is a problem: If A trusts B, and B trusts C, then A trusts C whether or not it wants. </li></ul><ul><li>Errors in rules or firewall is a serious threat. </li></ul>
  14. 14. Application-Level Filtering <ul><li>More complex than packet filters---look at the details of the particular service they are checking </li></ul><ul><li>Special code for each desired application </li></ul><ul><li>Easy to control and log all incoming and outgoing traffic </li></ul><ul><ul><li>Look for inappropriate or confidential words </li></ul></ul><ul><ul><li>Check if web queries are in conformance with company policies </li></ul></ul><ul><ul><li>Strip dangerous attachments </li></ul></ul><ul><ul><li>E-mail is usually passed through an application-level gateway </li></ul></ul>
  15. 15. Circuit-level Gateways <ul><li>Work at the TCP level </li></ul>
  16. 16. Firewall Problems (i) Inadvertent problems <ul><li>Example: Suppose a company has a policy to drop all e-mail coming through the gateway, to avoid exposure to mail-borne viruses. If port 80 is left open, Web mail services (e.g., gmail, hotmail) introduce a new avenue for malicious cod eto get in, via-e-mail-over-Web tunnels. </li></ul><ul><li>Example: Admin errors are the most common cause of trivial firewall problems. A large set of complex rules is a cause of such problems. </li></ul>
  17. 17. Firewall Problems (ii) Intentional subversions <ul><li>Consciously subversions---more functionality, malicious parties </li></ul><ul><li>Firewalls often allow traffic for port 80 to pass; Inbound HTTP traffic should be allowed only to a Web server, and should not reach other internal machines. Web server should be on a DMZ network </li></ul><ul><li>Httptunnel is a publicly available tool for transporting IP packets over HTTP. </li></ul>
  18. 18. Handling of IP Fragments <ul><li>0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ </li></ul><ul><li>IP fragmentation problems---if the destination port# part is in a different fragment than the ACK or SYN, then the firewall will not be able to decide whether or not to allow ACK or SYN packets since it does not know if it is part of a current conversation. </li></ul><ul><li>If initial fragments are at least 16 bytes long, the problem can be avoided. Alternately, the firewall can do the reassembly. This is expensive. </li></ul>
  19. 19. Firewalking <ul><li>http://www.packetfactory.net/firewalk/firewalk-final.html </li></ul><ul><li>http://vesaria.com/Firewall/Testing/eye_of_hacker.php </li></ul><ul><li>Technique of using ICMP echo and ICMP responses and DNS queries to get information about systems beyond a firewall. </li></ul><ul><li>Firewalk is an active reconnaissance network security tool that attempts to determine what layer 4 protocols a  given IP forwarding device will pass. Firewalk  works  by sending out TCP or UDP packets with a TTL one greater than the targeted gateway.  If the gateway allows the traffic, it will forward the packets to the next hop where they will expire and elicit an ICMP_TIME_EXCEEDED  message.  If the gateway hostdoes not allow the traffic, it will likely drop the packets on  the floor and we will see no response. </li></ul><ul><li>To get  the  correct  IP  TTL that will result in expired packets one beyond the gateway we need  to  ramp  up  hop-counts.   We  do  this  in the same manner that traceroute works.  Once we have the gateway hopcount (at  that point the scan is said to be `bound`) we can begin our scan. </li></ul><ul><li>It is significant to note the fact that the ultimate destination host does not have to be reached.  It just  needs to be somewhere downstream, on the other side of the gateway, from the scanning host. </li></ul>

×