each packet group. Using records and concentrating
only on attributes of interest greatly helps in reducing
the amount of information used by more computation-
ally intensive components of the architecture. Specif-
ically, records (and not packets) are used by the infer-
ence engine in our system to evaluate fuzzy rules.
The Data Miner implements a variation of Kuok’s
(Kuok et al., 1998) algorithm that allows for efficient,
single-pass, record processing by partioning data into
hierarchical files to produce output rules. Candidate
rules are expressed in terms of itemsets, a grouping
of relevant attributes. In order to minimize the poten-
tially large number of candidate rules, the algorithm
uses the concept of large itemsets to maximize the ex-
pressive power of the rule. Our implementation inte-
grates the Apriori and Kuok’s algorithms and is capa-
ble of discovering association rules for binary, cate-
gorical and numerical attributes. The final output of
the algorithm is a set of fuzzy rules. Rules are ex-
pressed as a logic implication p → q where p is the
antecedent and q is the consequence.
The fuzzy inference engine implements fuzzy logic
reasoning to evaluate the truthfulness of the incoming
records against the rules produced by the Data Miner.
Its implementation is the focus of this paper and a
more detailed description follows.
3 IMPLEMENTATION
The Fuzzy Inference Engine (Figure 1) makes use
of FuzzyJess (Orchard, 2001), a rule based expert
system shell that integrates the functionality of the
FuzzyJ Toolkit (Orchard, 2001) with Jess (Friedman-
Hill, 2004). The FuzzyJ Toolkit allows the expression
of fuzzy reasoning within the Java environment and
Jess provides a Java-based rule-engine in which rules
can be applied to data.
Jess, the Java expert system shell and scripting
language developed by Sandia National Laboratories,
can be used as either a general-purpose programming
language or as a rule-engine to efficiently apply rules
to data. Rule-based expert systems developed in Jess
can be firmly linked to Java code. Jess rules allow
for reasoning about knowledge that is expressed as
facts. These facts and rules, though, cannot handle
the imprecision and uncertainty that often abounds in
real-life applications.
The National Research Council of Canada devel-
oped The FuzzyJ Toolkit, a Java API that extends
Jess to allow reasoning about some forms of uncer-
tainty through the use of fuzzy sets and fuzzy rea-
soning. Fuzzy concepts are represented in the FuzzyJ
Toolkit using the keywords FuzzyVariable, Fuzzy-
Set, and FuzzyValue. A FuzzyVariable describes
a general fuzzy concept (Zadeh, 1975). It consists
Membership
TCP
0.25
0.00
1.00
0.6 1.0
Above
Average
0.20.0
Average
Below
Average
0.70
Figure 2: Fuzzy variable
of a name (T CP ), its units (N umberofP ackets), a
range ([0, 100]), and a set of terms that describe spe-
cific fuzzy concepts for this variable. These fuzzy
terms are defined using a term name (Average or
AboveAverage) together with a fuzzy set.
A FuzzySet (Zadeh, 1965) identifies the degree of
membership of the term over the range of the fuzzy
variable. Figure 2 illustrates the use of fuzzy sets
to describe the fuzzy variable T CP over [0,1] using
three fuzzy term sets. Thus, the fuzzy variable T CP
is a measure of the number of TCP packets received
within a certain time frame. All values that T CP can
assume must fall into at least one of those fuzzy sets.
Membership functions (Zadeh, 1965) map each ob-
ject in the fuzzy set to a real number in the inter-
val [0,1]. Fuzzy membership functions are used to
evaluate degrees of membership for each category or
term. Thus, the membership function f
A
(x) produces
a value that indicates the truth value of x in the term
A. For instance, in Figure 2, f
BelowAverage
(0.2) =
70% indicates that a T CP value of 0.2 belongs to
BelowAverage with 70% certainty.
A FuzzyValue represents a specific fuzzy concept.
The logic of the expert system is expressed in terms of
FuzzyRules. A FuzzyRule holds three sets of Fuzzy-
Values representing the antecendents, consequences,
and input values of the rule. The antecedents must be
true before the rule can execute (or fire) and conse-
quences asserted. An example of a fuzzy rule is
if TCP is
Average
then SYN is
Average
For this rule to fire the T CP value needs only to
match the fuzzy concept of Average to some degree
for the antecedent to be true.
Simple fuzzy systems can be created quite easily
using the FuzzyJ Toolkit, but larger systems with a
greater number and type (fuzzy, crisp, fuzzy-crisp) of
rules suggest that a convenient way to encode many
types of applications is needed. FuzzyJess is a rule
based expert system shell that integrates the fuzzy
logic of the FuzzyJ Toolkit with Jess to provide a
more robust tool for fuzzy reasoning. The Fuzzy In-
ference Engine is implemented using FuzzyJess.
The Fuzzy Inference Engine can be used with sam-
ple offline data or live traffic. Use of sample data (read
IMPLEMENTATION OF A HYBRID INTRUSION DETECTION SYSTEM USING FUZZYJESS
391