repeated for all root nodes in the graph. Also, each internal node along the path to a
particular leaf node is assigned an index (which is the distance from the root node).
It is to be noted that an internal node may appear more than once in different paths
to individual leaf nodes, thus having multiple indexes. In such a situation, the internal
node is assigned an index which is the highest of all its computed indexes. This
ensures that the node belongs to the longest possible path to that particular leaf node.
Once all possible distances from all root nodes in the graph to all its respective
reachable leaf nodes are computed, step 4 of the algorithm sorts these distances in
descending order. This is done in order to group nodes based on the longest-
dependency- path-first approach.
Step 5 forms the most important part of the algorithm. Starting from the farthest
reachable leaf node computed in the above step, the leaf node is added to a new group
and marked as ‘added to group’. Then the immediate parent of the leaf node is added
to the same group contingent upon whether or not it is marked as ‘added to group’.
This is done at each step to ensure that a node does not appear in more than one
group. If the parent node is not marked, it is added to the same group, otherwise it is
skipped and the algorithm proceeds to its parent node and so on till the respective root
node is reached.
The algorithm then proceeds to the next farthest leaf node and follows the same
process till all leaf nodes are covered.
Finally, when all nodes are grouped, step 7 checks for groups that contain a single
node in them. In such a case, if the node contained in the group were a leaf node, it is
added to the same group as its immediate parent. If the node were any other, it is
added to the same group as its immediate parent node (in case of an internal node) or
its immediate child node (in case of a root node).
2.2 Damage Assessment Algorithm
The damage assessment process determines the extent of propagation of damage
amongst data items by building a damaged list. An initial list of damaged data items is
produced by the intrusion detection system. The agents are then notified about these
data items and then they proceed to check damage to their list of data items and
continually add to the damaged list.
The algorithm shown below illustrates one method in which damage assessment
can be done on the grouped nodes.
Damage Assessment Algorithm
1. IDS notifies the co-coordinator C agent about the intrusion.
2. Co-coordinator agent C notifies all the other agents A
i
(i = 1, 2, 3….n) about the initial set
of damaged nodes.
3. Set R
jA
= 0 for all agents. (Where j = Round number and A = Agent ID).
4. For all agents A
i
, check if damaged node present in list.
4.1. If ‘yes’:
4.1.1. Perform damage assessment.
4.1.2. Update damaged list.
4.1.3. Count number of nodes with external dependencies (D
A
).
4.1.4. Increment R
jA
.
4.1.5. Update D
A.
112