The Vulnerability ProtectionDeep Security firewall is a bidirectional, stateful firewall that is responsible for making sure that packets originating from unauthorized sources do not reach the applications on its host.
To enable Firewall functionality on a computer:
The Firewall module uses the Vulnerability ProtectionDeep Security Network Engine which can operate in one of two modes:
In Tap Mode, the live stream is not modified. All operations are performed on the replicated stream. When in Tap Mode, Vulnerability ProtectionDeep Security offers no protection beyond providing a record of Events.
To switch between Inline and Tap mode, open a Policy or Computer Editor and go to Settings > Network Engine > Network Engine Mode.
The Firewall can use the following criteria to determine traffic source and destination:
The following options are available for defining IP addresses:
The following options are available for defining MAC addresses:
The following options are available for defining Port addresses:
If the rule is meant for the Internet Protocol (IP) frame type, the protocol field is enabled, and administrators will be asked to specify the transport protocol that will be analyzed. The protocol options available are:
The Vulnerability ProtectionDeep Security firewall is a bidirectional firewall. Therefore it is able to enforce rules on traffic originating from the network to the Vulnerability ProtectionDeep Security host, referred to as incoming, and traffic from the host to the network, referred to as outgoing.
When dealing with TCP traffic, administrators can choose the TCP flags to which rules apply. If the rule does not apply to all flags, administrators can choose from the following:
There are a number of ways these flags can be used in different attacks. Only a selection will be discussed here.
The URG flag indicates that the packet is urgent and must be processed before all others, while the PSH flag sets the TCP stack to flush its buffers and send all information up to the application. Both flags can be used in a type port scan called the Xmas scan which is typically a FIN packet with the URG and PSH flags enabled. This scan gets its name from the alternating bits turned on and off in the flags byte (00101001), much like the lights of a Christmas tree.
When an unprotected machine receives packets related to a Xmas scan, the following happens:
| Condition | Response |
|---|---|
| Closed Port | Returns an RST packet |
| Open Port | No response, exposing existence of the open port |
The RST, or RESET, flag abruptly terminates TCP connections. As described above, among its legitimate uses is to terminate connects to closed ports indicating an impossible or disallowed connection. However, the RST flag can also be used as part of a RESET attack, designed to disrupt existing sessions. The following diagram illustrates a situation where an attack, Host C, was able to calculate the TCP sequence number that Host A expected from a packet from Host B, thereby spoofing Host A into believing that Host B had sent it a RST packet. The end result is a denial of service attack:
The term "frame" refers to Ethernet frames, and the available protocols specify the data that the frame carries.
Internet Protocol (IP), Address Resolution Protocol (ARP), and Reverse Address Resolution Protocol (REVARP) are the most commonly carried protocols on contemporary Ethernet networks but by selecting "Other" from the drop-down list you can specify any other frame type by its "frame number".
Firewall Rules can take the following actions:
Allow rules have two functions:
Commonly applied Allow rules include:
The Bypass rule is designed for media-intensive protocols where filtering by the Firewall or Intrusion Prevention modules is neither required nor desired. Bypass rules have the following noteworthy characteristics:
A packet that matches the conditions of a Bypass rule:
Since stateful inspection is not applied to bypassed traffic, bypassing traffic in one direction does not automatically bypass the response in the other direction. Because of this, bypass rules should always be created and applied in pairs, one rule for incoming traffic and another for outgoing.
The Vulnerability ProtectionDeep Security Manager automatically implements a Priority 4 Bypass Rule that opens incoming TCP traffic at port 4118 on host computers running Vulnerability ProtectionDeep Security Agent. Priority 4 ensures that this Rule is applied before any Deny rule, and Bypass guarantees that the traffic is never impaired. The Bypass Rule is not explicitly shown in the Firewall rule list because the rule is created internally.
This rule, however, accepts traffic from any IP address and any MAC address. To harden the DSA at this port, you can create an alternative, more restrictive, Bypass Rule for this port. The Agent will actually disable the default Manager traffic rule in favor of the new custom rule provided it has the following characteristics:
The custom rule must use the above parameters to replace the default rule. Ideally, the IP address or MAC address of the actual Manager should be used as the packet source for the rule.
The Force Allow option excludes a sub-set of traffic that could otherwise have been covered by a deny action. Its relationship to other actions is illustrated below. Force allow has the same effect as a Bypass rule. However, unlike Bypass, traffic that passes the firewall because of this action is still subject to inspection by the Intrusion Prevention module. The Force allow action is particularly useful for making sure that essential network services are able to communicate with the DSA computer. These default Force allow rules are commonly enabled in real-life:
Packets arriving at a computer get processed first by Firewall Rules, then the Firewall Stateful Configuration conditions, and finally by the Intrusion Prevention Rules.
This is the order in which Firewall Rules are applied (incoming and outgoing):
Within the same priority context, a Deny rule will override an Allow rule, and a Force Allow rule will override a Deny rule. By using the rule priorities system, a higher priority Deny rule can be made to override a lower priority Force Allow rule.
Consider the example of a DNS server policy that makes use of a Force Allow rule to allow all incoming DNS queries over TCP/UDP port 53. Creating a Deny rule with a higher priority than the Force Allow rule lets you specify a particular range of IP addresses that must be prohibited from accessing the same public server.
Priority-based rule sets allow you set the order in which the rules are applied. If a Deny rule is set with the highest priority, and there are no Force Allow rules with the same priority, then any packet matching the Deny rule is automatically dropped and the remaining rules are ignored. Conversely, if a Force Allow rule with the highest priority flag set exists, any incoming packets matching the Force Allow rule will be automatically allowed through without being checked against any other rules.
Bypass Rules will never generate an Event. This is not configurable.
Log-only rules will only generate an Event if the packet in question is not subsequently stopped by either:
If the packet is stopped by one of those two rules, those rules will generate the Event and not the Log-only rule. If no subsequent rules stop the packet, the Log-only rule will generate an Event.
Vulnerability ProtectionDeep Security Firewall Rules have both a rule action and a rule priority. Used in conjunction, these two properties allow you to create very flexible and powerful rule-sets. Unlike rule-sets used by other firewalls, which may require that the rules be defined in the order in which they should be run, Vulnerability ProtectionDeep Security Firewall Rules are run in a deterministic order based on the rule action and the rule priority, which is independent of the order in which they are defined or assigned.
Each rule can have one of four actions.
Implementing an ALLOW rule will cause all other traffic not specifically covered by the Allow rule to be denied:
A DENY rule can be implemented over an ALLOW to block specific types of traffic:
A FORCE ALLOW rule can be placed over the denied traffic to allow certain exceptions to pass through:
Rule actions of type deny and force allow can be defined at any one of 5 priorities to allow further refinement of the permitted traffic defined by the set of allow rules. Rules are run in priority order from highest (Priority 4) to lowest (Priority 0). Within a specific priority level the rules are processed in order based on the rule action (force allow, deny, allow, log only).
The priority context allows a User to successively refine traffic controls using deny/force allow combinations to achieve a greater flexibility. Within the same priority context, an allow rule can be negated with a deny rule, and a deny rule can be negated by a force allow rule.
Rules are run in priority order from highest (Priority 4) to lowest (Priority 0). Within a specific priority level the rules are processed in order based on the rule action. The order in which rules of equal priority are processed is as follows:
When a Stateful Configuration is in effect on a computer, packets are analyzed within the context of traffic history, correctness of TCP and IP header values, and TCP connection state transitions. In the case of stateless protocols (e.g. UDP and ICMP) a pseudo-stateful mechanism is implemented based on historical traffic analysis.
A packet is passed through the stateful routine if it is explicitly allowed via static rules.
Once enabled, the stateful engine is applied to all traffic traversing the interface.
UDP pseudo-stateful inspection, by default, rejects any incoming "unsolicited" UDP packets. If a computer is running a UDP server, a force allow rule must be included in the policy to permit access to that service. For example, if UDP stateful inspection is enabled on a DNS server, a force allow rule permitting UDP traffic to port 53 is required.
ICMP pseudo-stateful inspection, by default, rejects any incoming unsolicited ICMP request-reply and error type packets. A force allow must be explicitly defined for any unsolicited ICMP packet to be allowed. All other ICMP (non request-reply or error type) packets are dropped unless explicitly allowed with static rules.
Generally speaking, there are two approaches when defining a firewall policy for a computer:
In general, prohibitive policies are preferred and permissive policies should be avoided.
Force allow rules should only be used in conjunction with allow and deny rules to allow a subset of traffic that has been prohibited by the allow and deny rules. Force allow rules are also required to allow unsolicited ICMP and UDP traffic when ICMP and UDP stateful are enabled.
Take the example of how a simple firewall policy can be created for a Web server.
At this point we have a basic firewall policy that allows solicited TCP, UDP and ICMP replies and external access to the Web server on this computer all other incoming traffic is denied.
For an example of how deny and force allow rule actions can be used to further refine this Policy consider how we may want to restrict traffic from other computers in the network. For example, we may want to allow access to the Web server on this computer to internal users but deny access from any computers that are in the DMZ. This can be done by adding a deny rule to prohibit access from servers in the DMZ IP range.
We may, however, want to refine this policy further to allow incoming traffic from the mail server which resides in the DMZ.