an importance value, the salience, that determines the
probability it is chosen and fired.
3.2.2 Emulating Attackers
To evaluate an individual, i.e. an attacker, the GA
executes the corresponding rules. This results in a se-
quence of steps where at each step, the attacker exe-
cutes an action according to the fired rule. The emu-
lation stops when the attacker has reached its goal or
all options have been exhausted and no rules can fire.
Each rule action is associated with a cost and the cost
of a sequence is the sum of the cost of the rules it has
fired, where each action repetition contributes to the
overall cost.
To determine activated rules, an emulation needs
an efficient representation of the security status. This
status is a set of parameters for each module that may
be updated any time a rule fires. The minimal set of
parameters to model both information acquisition and
attack consists of two Boolean values for each mod-
ule. They record, respectively whether the module
has already been scanned and whether the attacker has
acquired some rights on it. A rule precondition may
match some of these values. Anytime a rule fires, the
success or the failure of the action, its outcome, is
determined because a successful action updates the
security status. The outcome is decided through the
output of a random generator according to the action
success probability. If an action may fail, the repeti-
tion factor in the twin determines the number of pos-
sible repetitions. The only action that is always suc-
cessful is the scanning of a module so that a module
is scanned only once. The security status also records
the number of attacks that have used each graph edge.
In general, the structure of a rule is
⟨security state⟩, ⟨vulnerabilities⟩, ⟨connections⟩ → ⟨
action, security state ⟩
where securitystate, vulnerabilities and connections
are premises, i.e. conditions on the security status,
on module vulnerabilities and connections. If the rule
fires and the action is successful, the security status
is updated. As an example, if the attacker controls
N
1
, it has scanned but does not control N
2
(security
state premise), there is a vulnerability in N
2
(vulner-
abilities premise) and N
1
is connected to N
2
(connec-
tion premise), then it can attack N
2
(action). If this
rule fires and the attack is successful, the attacker will
control N
2
(new security state).
3.2.3 Evaluating Attackers
If we only consider rule premises and post-conditions,
each attacker is described by the same rules. As an ex-
ample, a rule may state that after scanning a module
M the module can be attacked or that a successful at-
tack to M enables an attack to a module connected to
M.
To pair distinct attacker, i.e. individuals, with dis-
tinct rules, the GA pairs each individual with two
sets that convey information on the network topology
and include, respectively, promising modules and the
deadpoints. A promising module leads the attacker to
its goal, while a deadpoint has no outbound edge or
has resisted all the attack attempts.
The same rule may differ in distinct attackers be-
cause its salience depends upon the nodes it matches.
The salience of a rule that matches a promising mod-
ule is larger than when the rule matches another one.
Hence, the salience of a rule that scans or attacks a
promising module is larger than those of rules target-
ing not promising ones. Furthermore, a rule where
the action targets a deadpoint, has lower salience than
rules that do not match a deadpoint.
To discover promising modules and deadpoints,
the GA analyses a log that stores the actions of an
attacker and the modules it has targeted in an emula-
tion. The GA classifies attackers in three categories.
It also pairs an attacker with a priority and a distance
from the target module in terms of the number of hops
or the success probabilities paired with arcs. Each at-
tacker may be:
• successful if it reaches its goal. Its distance is
0 and the priority decreases with the sum of the
costs of its actions;
• close if its distance is lower than a threshold δ. Its
priority decreases with this distance;
• unsuccessful if its distance from the goal is larger
than δ.
The distance and the priority of an individual deter-
mine its fitness.
3.3 Algorithm Set Up
The GA is applied to a population after evaluating
each of its individuals, i.e. a set of rules plus the set of
promising nodes and the one of the deadpoints. Some
parameters of the GA are set a priori such as the elite
size namely the number of individuals that reproduce.
Other parameters will be determined by the GA, such
as the probability of choosing an action, that is a func-
tion of the salience of the rule, and the sets of, respec-
tively, promising nodes and deadpoints a parent will
transmit to its descendants.
The selection operator analyzes each individual in
the current population and classifies it as either suc-
cessful, close, or unsuccessful. Then, it ranks individ-
uals in a listby increasing distance from the goal. The
SECRYPT 2022 - 19th International Conference on Security and Cryptography
550