The rulelist is a semicolon separated file (the operator also may use the comma or pipe symbol "|" as legal separator symbols). We are planning a replacement of this field based text file by an XML rulelist file with more flexibility for the next version of OCFA.
You as operator can use the rulelist in order to program the evidence flow through the Computer Forensics Architecture. That is: to define the sequence of modules to process the evidence.
The idea behind the rulelist is roughly based on the iptables implementation. In the source distribution several example rulelists are included (an example tells more than a thousand words). After installation, the rulelists can be found in the ${OCFAROOT}/etc directory. The rulelist actually used during processing is defined in the ocfa configuration file.
The current version of the rulelist is a line based text file. Each line defines a rule. The maximum number of rulelines is defined in the ocfa configuration file . The rule line is mainly devided into three main parts:
| Table name |
Packet section |
Final action field |
Example of three rulelines from an actual rulelist:
default;DNTCR;mimetype;image/jpeg;DNTCR;ACT_FORWARD;exif;
default;DNTCR;mimetype;application/msword;DNTCR;ACT_FORWARD;antiword;
default;DNTCR;mimetype;application/x-zip;DNTCR;ACT_FORWARD;zip;
In the following section the three fields are further explained.
The table name fields is not used for a routing decision at this moment. The value is set to "default". In this implementation only a single table is available and this puts some strain on how expressive the rulelist can be built. Future versions of the router will include support for jumping between multiple tables in order to allow routing on multiple metadata fields and in order to allow (per table) routing based on metadata added by modules before the previous module.
The router uses the packet section to base the routing decision on. The packet section contains four restrictive selection fields:
A match of the packet field will fire the final action defined in the same ruleline.
For each field in the packet section you may use the reserved "DNTCR" value. This means "don't care". In the example the value for the namespace does not influence the routing decision. All values from the metadata will match here. It is not a good practice to use "DNTCR" for all four fields. This rule will match for sure and the rulelist will exit at this point, never reaching the rulelines following (see matching strategies section below) . For this purpose a default routing is defined in the ocfa configuration file. Firing the default routing will cause a warning message in the logging. A properly constructed rulelist should prevent the firing of the default rule.
Future versions of the router shall have support for side-actions (logging, adding metadata etc) to make the router even more expressive. In the current version of the rulelist the operator can use the action field to define the final action on a evidence. The final action has three fields:
In the ocfa configuration file, a rulelist section defines the default action in the case no ruleline matches.
The following final action types are defined:
| table name |
namespace |
meta type |
meta value |
last module |
action type |
action target |
action argument |
Back to router.