Abstract:
A method and apparatus for Automatic Risk Assessment of a Firewall Configuration facilitates the automatic generation of a risk assessment of a given firewall configuration. The method scans the firewall analyzer report, before the human user does, and flag the Configuration errors. Each found mis-configuration is called a risk item. The report is analyzed according a Knowledge Base of known risk items. The method further filters duplicate risk item which are trigger by different rules

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    The application is a continuation in part of application Ser. No. 11/175,781 filed on 7 Jul. 2005 claiming the priority of provisional U.S. patent application Ser. No. 60/587,938, filed Jul. 15, 2004. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention relates generally to firewalls, and more particularly, to a method and apparatus for Automatic Risk Assessment of a Firewall Configuration. 
       BACKGROUND OF THE INVENTION 
       [0003]    Network firewalls provide important safeguards for any network connected to the Internet. Firewalls are not simple applications that can be activated “out of the box.” A firewall must be configured and managed to realize an important security policy for the particular needs of a given company or entity. It has been said that the most important factor affecting the security of a firewall is the firewall configuration A firewall is a network gateway that filters packets and separates a proprietary corporate network, such as an Intranet, from a public network, such as the Internet. Most of today&#39;s firewalls are configured by means of a rule-base or firewall configuration file. The rule-base instructs the firewall which inbound sessions (packets) to permit to pass, and which should be blocked. Similarly, the rule-base specifies which outbound sessions (packets) are permitted. The firewall administrator needs to implement the high-level corporate security policy using this low-level rule-base. 
         [0004]    The firewall&#39;s configuration interface typically allows the security administrator to define various host-groups (ranges of IP addresses) and service-groups (groups of protocols and corresponding port-numbers at the hosts that form the endpoints). A single rule typically includes a source, a destination, a service-group and an appropriate action. The source and destination are host-groups, and the action is generally either an indication to “pass” or “drop” the packets of the corresponding session 
         [0005]    In many firewalls, the rule-base is order sensitive. In other words, the firewall checks if the first rule in the rule-base applies to a new session. If the first rule applies, the packets are either passed or dropped according to the action specified by the first rule. Otherwise, the firewall checks if the second rule applies, and so forth until a rule applies. This scheme makes it difficult to understand what policy a firewall configuration is actually implementing, since the user needs to comprehend the effects of the whole rule-base, including any inter-play between subsequent rules. 
         [0006]    Analyzing a firewall configuration is much worse for a larger company, whose rule-base may include thousands of rules, and whose firewall administration team includes many staff members, possibly in different locations. 
         [0007]    As apparent from the above-described deficiencies with conventional techniques for administering a firewall, a need exists for analyzing and auditing firewall configurations. 
         [0008]    The prior work of [Mayer et al; 2000, Mayer et al; 2005] and [Wool; 2001] teaches how to analyze Firewall Configurations and produce HTML-based Firewall Analyzer Reports. However, the said Reports produced by the methods of [Mayer et al; 2000, Mayer et al; 2005] are voluminous, and do not identify or rate the risks present within the Firewall Configuration. In the current state of the art, a Firewall administrator or auditor needs to navigate through the Firewall Analyzer Report, and use his or her expertise to identify any Configuration mistakes or badly written rules. The current invention shows how to automatically augment the Report with a Risk Assessment. 
       BRIEF SUMMARY OF THE INVENTION 
       [0009]    The present invention provides a computer implemented method of detecting firewall mis-configurations of a firewall operatively associated with a computer network. The method comprises the following steps
       receiving a firewall configuration report exhibiting relationships between any potential packet received by the firewall and a corresponding action taken by the firewall in response, wherein the report is achieved by algorithmically simulating all potential packet receipts on an internal model of the firewall;   converting the firewall configuration report into a computer searchable file enabling detection of firewall mis-configurations; detecting firewall mis-configurations by searching the computer searchable file for mis-configurations in view of a predefined knowledge base exhibiting risk items associated with corresponding firewall mis-configurations;
 
customizing the detected firewall mis-configurations according to the knowledge base and the firewall configuration report thereby producing a list of risks associated with the firewall; and
   eliminating redundancy of reported risks by defining a suppression code for each risk associated with at least one second risk where the rules of the second risk contains the rules of the first risk, wherein the reported risks which have same number of triggering rules as the corresponding second risk defined by suppression code of the first risk, are suppressed       
 
         [0013]    The computer searchable file according to the present invention obeys a particular predefined schema indicating relationships between objects exhibited on tables in the report; and the searched mis-configurations are in a particular predefined search expression format that corresponds with the particular predefined schema; 
         [0014]    According to some embodiments of the present invention the firewall configuration report is arranged according to name/type of risk accumulating all rules which triggered said risk, wherein said arrangement is a result of a what-if simulation for correlating the risks and their corresponding rules 
         [0015]    The Knowledge Base according to the present invention may be maintained in an Extensible Markup Language (XML) document. 
         [0016]    The Knowledge Base according to the present invention may be maintained in a relational database. 
         [0017]    Each risk item in said Knowledge Base may comprise at least one of:
       a brief description of the risk item;   a risk rating;   an explanation about the risk item;   links to further details of the risk item; and   a remedy.       
 
         [0023]    According to some embodiments of the present invention the List-of-Risks is displayed in HTML format and may be displayed as a bar chart.
       According to some embodiments of the present invention the risk items are customized before being searched for in said searchable report and the List-of-Risks is sorted in decreasing risk rating order.       
 
         [0025]    The method according to the present invention may enable each risk item to be associated with a search expression used by the software module to search the computer searchable file to identify occurrences of said each risk item. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0026]      FIG. 1  is a schematic block diagram of the ADVISOR module according to some embodiment of the present invention; 
           [0027]      FIG. 2  illustrates an excerpt from a rule base according to some embodiment of the prior art; 
           [0028]      FIG. 3  illustrates a query, and the resulting query result table according to some embodiment of the present invention; 
           [0029]      FIG. 4  illustrates an excerpt from a host group table according to some embodiment of the present invention; 
           [0030]      FIG. 5  illustrates an excerpt from a service group table according to some embodiment of the present invention; 
           [0031]      FIG. 6  a flow chart of enhancing the firewall configuration report according to some embodiment of the present invention; 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0032]    The Firewall analysis that is described in references [Mayer et al;  2000 , Wool; 2001, Mayer et al; 2005], produces a very detailed report about the action a Firewall would take on any type of packet it could ever see. We shall refer to an implementation of the methods of [Mayer et al;  2000 , Wool; 2001, Mayer et al; 2005] as the Basic Software. The input for the Basic Software consists of the Firewall Configuration files and the Routing Table file. The Basic Software parses these files, produces an internal model, simulates the behavior of the Firewall (algorithmically, without sending any packets), and produces a Basic Report  200  as output. 
         [0033]    The said Basic Report  200  consists of multiple tables, of several types. These tables are available in several formats: they are produced as blank-separated plain ASCII files, and then translated by the Basic Software into html (hyper-text markup language). The types of tables available in a Basic Report  200  include:
       Rule tables: the main columns of a rule table are the source IP address, destination IP address, service (combination of protocol, and source &amp; destination port numbers), and action (e.g., PASS/DROP). Other columns are often shown as well. See  FIG. 2  for an example.   Query result tables: a query is of the form “which packets, among those with source IP addresses included in a set Src, destination IP addresses included in a set Dst, and service included in a set Srv, will reach their destination through the Firewall?” The result of a query is a table with columns including (at least): source IP address, destination IP address, service, and rules letting this type of service through. See  FIG. 3  for an example.   Host group tables: These describe the IP addresses associated with a named definition, See  FIG. 4  for an example.   Service group tables: These describe the protocols and port numbers associated with a named definition, See  FIG. 5  for an example.       
 
       Finding Configuration Mistakes State of the Art 
       [0038]    Many Firewalls are configured incorrectly, and the protection that they offer to the networks behind them is insufficient, as shown by [Wool; 2004]. The Basic Report  200  described above shows the effects of any mis-configuration, for instance, by showing that certain types of traffic are allowed to cross the Firewall. In the current state of the art, a Firewall administrator or auditor would navigate through the Basic Report, and use his or her expertise to identify any Configuration mistakes or badly written rules. 
         [0039]    According to the present invention it is suggested to provide wizard software module (“ADVISOR” module) to traverse the report and enhancing the search report, before the human user does, and flag the Configuration errors (see  FIG. 1 : Data flow through the ADVISOR). Each found mis-configuration is called a risk item. The software module may be implemented using an Intel x86-based PC running the RedHat Linux operating system. 
         [0040]    For each risk item, the ADVISOR module produces the following items:
       1. A brief description of the risk item (usually a short English sentence),   2. A risk rating (such as High/Medium/Low/Informational/Suspected),   3. An explanation about the risk item, and the reason why it is considered to be a risk,   4. Further details of the problem, and its causes, in the form of direct links to other parts of the Basic Report  200 ,   5. A suggestion about possible methods to prevent/remedy the problem.       
 
         [0046]    The advisor module may include different functionalities for enhancing the report: The ADVISOR module can sorts the risk items in decreasing order of risk (higher risks appear first). The ADVISOR may produces various statistics and graphic charts about the general state of the analyzed Firewall (such as the number of risk items per risk category, a general rating of the Firewall&#39;s Configuration quality, comparison to historic data for the same Firewall or for other Firewalls, comparison to industry averages etc). 
         [0047]      FIG. 1  illustrates the processing of the firewall configuration report by the advisory module. The ADVISOR module receives the basic reports from a Knowledge Base  100  which includes data encapsulating the knowledge of a Firewall auditor. The ADVISOR module flow comprises of the following steps:
       Converting the Basic Report  200  into a Converted Searchable Report  210 , in a format and schema that is suitable for searching for Configuration errors,   searching the Converted Searchable Report  210  for each of the possible risk items listed in the Knowledge Base  100 , and creating a List-of-Risks  400 . For each risk item, generating all the elements of the risk item (in generic form).   defining suppression code for at least part of the risk items. Risk items which include definition of a suppression are associated with a second risk item which logically contains the first risk item.   examining pairs of risks which were associated by the suppression codes, by comparing the number of rules which triggered each of the two risks.   creating updated report  405  by eliminating from the report. suppressed risks having the same triggering rules of the associated paired risk.   Customizing the found risk items to match the current report to produce a Customized List-of-Risks  410 ,   Sorting the Customized List-of-Risks  410  in decreasing risk rating order to produce a Sorted List-of-Risks  420  and   displaying the Sorted List-of-Risks  420 , and additional statistics and graphics, in the Risk Report  500 .         
         [0056]    Each of the above steps is described in more detail below. 
       The Knowledge Base  100   
       [0057]    The ADVISOR&#39;s Knowledge Base  100  stores data which encapsulate the knowledge a Firewall auditor expert, the data structure of the expert knowledge is configured to adapt the structure and organization of the search report combined with an understanding of the structure and organization of the Basic Report. According to some embodiment of the present invention, the Knowledge Base  100  is organized in an XML (eXtensible Markup Language) document, however other formats (ranging from a flat text file to a relational database) are also possible. 
         [0058]    The Knowledge Base  100  consists of multiple items, each detailing a possible risk item. Each possible risk item in the Knowledge Base  100  contains a search expression, where the search expression refers to, and makes use of, the schema of the Converted Searchable Report  210 . The language used to write the expression is suitable for the Risk Search  300  mechanism described above. According to some embodiment expression is formatted in XQL (assuming that the Basic Report  200  is converted into XML format with a predefined schema). Alternative languages could be database query languages such as SQL. 
         [0059]    The search expression may be customizable—i.e., it may contain keywords that will be instantiated as part of the search procedure. For instance, a % FWNAME keyword indicates the name of the Firewall. 
         [0060]    The text in the various elements is written in customizable form: the text contains embedded keywords (such as % FWNAME to indicate the Firewall&#39;s name, or % RULE to indicate the number of a found rule). 
       Converting the Firewall Analyzer Report to a Searchable Format 
       [0061]    In order to search for the possible risk items, the Basic Report  200  (or portions of it) needs to be converted into the Converted Searchable Report  210 , in a searchable format. Such a format needs to be organized according to a defined schema. The schema indicates which columns appear in each table, how the tables relate to each other etc. According to some embodiments of the present invention the Converted Searchable Report  210  is a set of one or more XML documents. Alternative embodiments include database formats (such as MySQL or Oracle). The choice of search expressions in the risk items within the Knowledge Base  100 , should be appropriate for the Converted Searchable Report  210  format. 
         [0062]    According to further embodiments of the present invention it is suggested to enable the user to run a specific simulation for a defined risk. In this case the risk item may be defined to check specific servers, or specific range of addresses. Such a risk item may be not included in the basic firewall configuration report. The results of the simulation are integrated into the searchable configuration report enabling the ADVISOR system to search the report according to specific risk expression. 
       Searching the Report 
       [0063]    After the Basic Report (or portions of it) is converted to a Converted Searchable Report  210 , the ADVISOR Risk Search  300  performs the following procedure: 
         [0064]    First scan all possible risk items in the Knowledge Base  100 , for each possible risk item, Customize the search expression by replacing all the keywords with Firewall-specific information. Once the report is customized, search the converted report using the said customized search expression for said possible risk item. If the search is successful, add the possible risk item to the List-of-Risks  400 . The elements of the risk item are still generic at this point. Attached to the risk item, the List-of-Risks  400  contains the details of the risk item (such as the rule number, or service name). The procedure defined above is repeated until all possible risk items have been tried. 
       Suppressing Risk Items 
       [0065]      FIG. 6  describes a further embodiment of enhancing the firewall configuration report according to the present invention. The List-of-Risks  400  may include duplication of risks occurrences, since some risk items are special cases of others. As a result, the same rule may trigger multiple risks. For instance, the risk item of “i05—allowing Telnet (TCP on port  23 )” is a special case of the risk item “i03—allowing all TCP ports”, which in turn is a special case of the risk “i01—allowing Any service”. Thus, a rule that allows “Any service” will trigger all three risk items, and all three will appear in the Updated List-of-Risks  405 . It is suggested to optionally associate a “suppressed-by” attribute risk item, wherein the code of a more general risk item is specified. In the abovementioned example, the i05 risk item will be “suppressed-by” the i03 risk item, which in turn is “suppressed-by” the i01 risk item. 
         [0066]    To enable such identification for at least some of the risk items, a suppression code is defined for at least part of the risk items. Risk items which include definition of a suppression are associated with a second risk item which logically contains the first risk item ( 610 ). When editing/creating the firewall configuration report, pairs of risks which were associated by the suppression codes are examined by comparing the number of rules which triggered each of the two risks ( 616 ). In case the number of triggering rules is the same for both risks, the first risk is suppressed, eliminating it from the report ( 620 ). Otherwise both risks will appear in the report ( 618 ). 
       Customizing the Risk Items 
       [0067]    After the Updated List-of-Risks  405  is created, the ADVISOR performs the following procedure: First scan all risk items in the Updated List-of-Risk items. 
         [0068]    For each risk item:
       Replace the generic keywords with the specific information that is pertinent to the current Basic Report  200  and the current risk item. For instance, the % RULE keyword is replace by the number of the rule that matched the current risk item, and the % FWNAME keyword is replaced by the name of the current Firewall. Some of the generic keywords indicate hyperlinks to parts of the Basic Report  200  where further details may be found (such as definitions of the found service). These hyperlink keywords are replaced by the appropriate hyperlink information (such as URLs).   Add the customized risk to the Customized List-of-Risks  410 .       
 
       Sorting and Presenting the Risk Items 
       [0071]    After the Customized List-of-Risks  410  is created, the ADVISOR sorts the risk items in decreasing order of risk (Highest risks appear first) to create the Sorted List-of-Risks  420 . 
         [0072]    The ADVISOR calculates the various statistics (such as the number of risk items per risk category), and produces this information in tabular, textual, or graphic format. The combination of the Sorted List-of-Risks  420 , and the additional statistics and graphics form the Risk Report  500 . 
         [0073]    The ADVISOR outputs the formatted Risk Report  500  as additional pages that are incorporated into the Basic Report  200 . A preferred embodiment is to place the brief description, along with the above-mentioned statistics, into an executive summary, and to place the risk items themselves in a separate risk assessment page.