COEN 350 Network Defense in Depth Firewalls Terms

  • Slides: 41
Download presentation
COEN 350 Network Defense in Depth Firewalls

COEN 350 Network Defense in Depth Firewalls

Terms of the Trade n Border Router n n DMZ n n n First

Terms of the Trade n Border Router n n DMZ n n n First / last router under control of system administration. Demilitarized zone. Security is low, since not protected by firewall. Locate webservers and other services there that generate potentially unsafe traffic. Firewall n Filters packages based on a variety of rules.

Terms of the Trade n IDS n Intrusion Detection System. n n n VPN

Terms of the Trade n IDS n Intrusion Detection System. n n n VPN n n NIDS: glean intrusion signatures from traffic. HIDS: monitor activity at a host on which they are located. Virtual private network Screened subnet n Area protected by an internal firewall.

Terms of the Trade n Configuration Management n n Known vulnerabilities account for most

Terms of the Trade n Configuration Management n n Known vulnerabilities account for most of actually perpetrated exploits. For most of them, patches were available, but not installed. CM tries to enforce uniform security policies. Backdoors n An entrance into the system that avoids perimeter defenses.

Defense in Depth n Rule 1: Multitude of security measures. n n Do not

Defense in Depth n Rule 1: Multitude of security measures. n n Do not relay on one security mechanism. Rule 2: Do not make security so expensive / burdensome that you give legitimate users an incentive to circumvent security.

Defense in Depth n Example: External tcp packet passes: n n n Internet Perimeter

Defense in Depth n Example: External tcp packet passes: n n n Internet Perimeter Router Internet perimeter firewall DMZ firewall Network IPS Net. Flow n n n Analyzes connections on network Antivirus on host Host IPS

Firewalls n Firewalls are perimeter defense: n Keep the bad stuff outside, enjoy life

Firewalls n Firewalls are perimeter defense: n Keep the bad stuff outside, enjoy life inside.

Filtering n Signature n n Any distinctive characteristic that identifies something (with a high

Filtering n Signature n n Any distinctive characteristic that identifies something (with a high degree of probability) Signature Types n Atomic Signatures n n Single packet, single event, single activity is examined. Stateful Signatures n State: Needed when analyzing multiple pieces of information that are not available at the same time.

Filtering n Atomic vs. Stateful Signatures n LAND attack n Attacker sends TCP-SYN packet

Filtering n Atomic vs. Stateful Signatures n LAND attack n Attacker sends TCP-SYN packet with same source and destination address. n n n Caused TCP stacks to crash. Can be discovered looking at a single packet. Search for string “etc/password” in a URL n n Attacker fragments the packet so that the string is not in either fragment. State is needed in order to recognize the attack.

Filtering n Signature Triggers n Pattern Detection n Simple string search n n Protocol

Filtering n Signature Triggers n Pattern Detection n Simple string search n n Protocol decoders search for string only in protocol fields. n n ARP request with source address FF: FF: FF: FF Anomaly Detection n Search for string “etc/passwords” ARP Traffic going to an unusual port. Protocol compliance for http traffic Behavior Detection n n Abnormally large / small fragmented packets Search for RPC requests that do not initially utilize the Port. Mapper

Filtering n Signature Actions n n n Generating an alert Dropping / preventing an

Filtering n Signature Actions n n n Generating an alert Dropping / preventing an activity Logging the activity Resetting a TCP connection Blocking future activity Allow activity

Packet Filtering n Static Packet Filtering n Allow or deny access to packets based

Packet Filtering n Static Packet Filtering n Allow or deny access to packets based on internal characteristics. access list 111 deny ip host 205. 1 any access list 111 permit tcp host 205. 1 any access list 111 deny icmp any echo-request access list 111 permit icmp any packet-to-big access list 111 deny icmp any Cisco extended ACL

Static Packet Filtering Difficult to design efficient rules. n n Easy to get the

Static Packet Filtering Difficult to design efficient rules. n n Easy to get the rules tables wrong and allow bad traffic. Security risks n People can piggy-back bad messages in harmless ones. n n n http traffic is known to be used as a backdoor. Loki uses unused fields in normal TCP packets. Fragmentation allows the filter to look only at a fragment n Most only look at the first fragment

Static Packet Filtering n Configuring a packet filter: n n n Security Policy: what

Static Packet Filtering n Configuring a packet filter: n n n Security Policy: what is allowed, what is not allowed. Allowable types of packets must be specified logically, in terms of logical expression on packet fields. Expressions need to be rewritten in the firewall vendor’s language.

Static Packet Filtering n Example n Security Policy: n n Allow inbound mail messages

Static Packet Filtering n Example n Security Policy: n n Allow inbound mail messages (SMTP, port 25), but only to gateway. Block host faucet. action Our host port Their host port comment block * * faucet * We don’t trust these people. allow OUR-GW 25 * * Connection to our SMTP server

Static Packet Filtering n Example n If no rule applies, then the packet is

Static Packet Filtering n Example n If no rule applies, then the packet is dropped. n n Without additional rules, our rule set would drop all non-mail packets. There would also be no replies. Beware of a rule like this (intended to allow acks) action Our host port Their host port comment allow * * * 25 Connection to their SMTP port n Based solely on outside host’s port number. n Port 25 is usually the mail port. n But there is no guarantee.

Static Packet Filtering n Example n Expand rule set to allow connection with the

Static Packet Filtering n Example n Expand rule set to allow connection with the outside: action Our host port Their host port block * * faucet * allow OUR-GW 25 * * allow (our host) * * 25 allow * 25 * * Flag comment Our packets to their port ACK Their replies Specify the names of all machines allowed to send mail to the outside here.

Static Packet Filtering n Combating Address Spoofing n At a minimum: n n n

Static Packet Filtering n Combating Address Spoofing n At a minimum: n n n Don’t allow inside source addresses coming in. Don’t allow outside source addresses going out. Block source routing at the border routers.

Static Packet Filtering n Routing Information n If a node is unreachable from the

Static Packet Filtering n Routing Information n If a node is unreachable from the outside then the node is almost (but not quite) as safe as a node disconnected from the net. Internal routers should not advertise paths to such nodes to the outside. Filter routes learned from the outside: n n Protects against subversion by route confusion. Route squatting: n n n Use internal addresses that belong to a different domain. The nodes are de facto unreachable from the outside. Use non-announced addresses. (e. g. 10. x. x. x) n But beware, when companies merge, these addresses tend to be incompatible. n So pick addresses in unpopular address ranges.

Static Packet Filtering n Performance n Packet filtering is done at the border. n

Static Packet Filtering n Performance n Packet filtering is done at the border. n n n No degradation for the internal network. Typically, connection to ISP is the bottleneck. However: n n Degradation depends on the number of rules applied. Can be mitigated by careful ordering of rules.

Application Level Filtering n Packet filters only look at n n n The source

Application Level Filtering n Packet filters only look at n n n The source address The destination address TCP / UDP port numbers TCP / UDP flags. Application filters deals with the details of the service they are checking. n E. g. a mail application filter looks at n n n RFC 822 headers. MIME attachments. Might identify virus infected attachments.

Application Level Filtering n Snort: n n Allows to set up rules that pass

Application Level Filtering n Snort: n n Allows to set up rules that pass a packet on to another service. Commercial firewalls n n Include application level filters for many products. Use non-disclosure agreement to obtain proprietary protocols

Dynamic Packet Filtering n n n Stateful Firewall Still look at each packet. Maintains

Dynamic Packet Filtering n n n Stateful Firewall Still look at each packet. Maintains a state of each connection. n n n Implements connection filtering. Dynamically adjust a filtering table of current connections. Implementation n Adjust the filtering rules dynamically. n n n E. g. : We started an HTTP connection to a given host. Now HTTP packages from that host are allowed. OR: Terminate the connection at the firewall and then have the firewall call the ultimate destination (proxying).

Proxy Firewalls n n Proxies act on behalf of a client. Proxy firewall n

Proxy Firewalls n n Proxies act on behalf of a client. Proxy firewall n Reverse Proxy n n Receives packages on one card. Processes requests. Translates them into internal requests on other card. Receives answers from inside and translates to the outside.

Proxy Firewalls n Proxy firewall n Forward Proxy n n n Receives requests from

Proxy Firewalls n Proxy firewall n Forward Proxy n n n Receives requests from the inside. Processes requests. Translates them into requests to the outside on other card. Receives answers from outside and translates to the inside. Acts on behalf of inside machine that is protected from the vagaries of the internet.

Proxy Firewalls n n Application level proxies work at the level of application. Circuit-level

Proxy Firewalls n n Application level proxies work at the level of application. Circuit-level proxies n n does not understand the application makes filtering decisions by validating and monitoring sessions.

Application Inspection n Dynamic Firewalls allow selective inspection of applications: n n n http

Application Inspection n Dynamic Firewalls allow selective inspection of applications: n n n http ftp dns icmp …

Application Inspection n DNS example (Cisco ASA DNS inspection) n n n Guarantees that

Application Inspection n DNS example (Cisco ASA DNS inspection) n n n Guarantees that the ID of the DNS machine matches the ID of the DNS query Allows translation of DNS packets using NAT Reassembles DNS packets to verify its length.

Application Inspection n SMTP (Cisco ASA protection) n Protects against SMTP-based attacks by restricting

Application Inspection n SMTP (Cisco ASA protection) n Protects against SMTP-based attacks by restricting the types of SMTP commands. n n n Illegal command is modified and forwarded. Typically, receiver replies with an SMTP error 500 (command not recognized) Checks size, …

Network Address Translation n Originally designed to address the IPv 4 address shortage: n

Network Address Translation n Originally designed to address the IPv 4 address shortage: n Use internal IP addresses n n 192. 168. x. x 172. 16. x. x, 172. 32. x. x 10. x. x. x NAT box is dual hosted: n n One connection to interior network Other connection to exterior network n with “overloaded” or “public” address

Network Address Translation n n Internal host initiates TCP connection to the outside. NAT

Network Address Translation n n Internal host initiates TCP connection to the outside. NAT box takes TCP package, replaces source IP with its public IP, port with a port chosen for that connection When reply return to NAT box, forwards package to internal host. NAT uses stored connection data to determine the interior address

Network Address Translation n NAT increases security: n n n NAT hides host identities

Network Address Translation n NAT increases security: n n n NAT hides host identities NAT hides weak sequence number generating hosts by randomizing sequence numbers. NAT disables inbound TCP connections NAT breaks most UDP protocols NAT allow load balancing and transparent failover

Network Address Translation n Full Cone NAT (one to one NAT) n n all

Network Address Translation n Full Cone NAT (one to one NAT) n n all requests from same internal IP address and port are mapped to the same external IP address and port. Allows external host to send package to the host by using the mapped external address.

Network Address Translation n Restricted Cone NAT n n All requests from same internal

Network Address Translation n Restricted Cone NAT n n All requests from same internal IP address and port are mapped to the same external IP address and port. External host can only send package to internal host if the connection has already been established

Network Address Translation n Port Restricted Cone NAT n Like restricted cone NAT, n

Network Address Translation n Port Restricted Cone NAT n Like restricted cone NAT, n n Symmetric NAT n n but only for certain port numbers All request from the same internal IP address and port to a specific destination IP and port are mapped to a unique external source IP address and port. If the same hosts sends to the same port, but another IP address, then a different mapping is used. External host needs to receive a packet before sending a UDP packet back to the internal host. In practice: n combinations between these behaviors.

Virtual Private Networks

Virtual Private Networks

Virtual Private Networks n n VPN uses connections over an existing public network Connection

Virtual Private Networks n n VPN uses connections over an existing public network Connection secured with encryption n Host to Gateway to Gateway

Virtual Private Networks

Virtual Private Networks

Virtual Private Networks n Encryption can be done at n n Application level. Transport

Virtual Private Networks n Encryption can be done at n n Application level. Transport level. Network level. Data link level.

Virtual Private Networks VPN Technologies n Application Level n n n Pretty Good Privacy

Virtual Private Networks VPN Technologies n Application Level n n n Pretty Good Privacy Secure Shell (SSH) Transport Level n Secure Socket Layer n n n Does not protect the package, but its content. Typically runs at the application level of the OS, so OS does not need to be changed. Network Level n IPSec n n Encrypts package itself. Encrypted package receives a new package header. n n n IPSec protects port address, but not destination address. OS need to be changed (but only once: Win 2000, Win. XP) Data Link n Layer 2 Tunneling Protocol addition to Point-to-Point protocol (PPP) n n Encrypts packets on the data layer. L 2 TP (Layer 2 Tunneling)

Virtual Private Networks n Alternatives are dedicated point-to-point connections such as a private T

Virtual Private Networks n Alternatives are dedicated point-to-point connections such as a private T 1 line. n n n Most secure. Most expensive. Takes time to set-up.