<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Attack Trees with Time Constraints</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Aliyu Tanko Ali</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Damas Gruska</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Comenius University</institution>
          ,
          <addr-line>Mlynska Dolina 842 48, Bratislava</addr-line>
          ,
          <country>Slovak Republic</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We propose how attack trees formalism can be extended with time constraints. An attack tree is a basic description of how an attacker can compromise an asset, we refine this basic description by adding time constraints which can prevent an attacker from reaching the root node, if the attack actions performed cannot be completed within the defined time constraint. Adding time to attack trees causes an infinite number of possible states, to overcome this problem, we translate the tree into (an extended version of) timed automata and later use UPPAAL verification tool to analyse.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Attack trees</kwd>
        <kwd>timed attack trees</kwd>
        <kwd>cyber-physical systems</kwd>
        <kwd>security</kwd>
        <kwd>threat modelling</kwd>
        <kwd>timed automata</kwd>
        <kwd>reachability</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Attack tree’s security. The revolution that brought the introduction of assets such as IoTs, CPS,
and industrial control systems etc., in the last decades also brought many security challenges.
At its inception, attack trees are used to model how an asset (mostly static) may be compromised
and allow a security engineer to plan on how to address the potential security threats. For
example, in its early days, attack trees were used to model how to gain access (open) to secure
documents, how a PGP encrypted file or password can be cracked, potential ways to infect a
system files with a virus, how unauthorized users can obtain admin privileges, and how to gain
remote access to a system [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1, 2, 3</xref>
        ] etc. In recent days, attack trees are used for security and
risk assessment of assets such as SCADA systems [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], IoT systems [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], CPS [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and medical
equipment [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] etc. It is important to note that while attack trees remain a powerful graphical
security tool that can be used to identify how an asset may be compromised, the shift in the
dynamics of the assets i.e. from modelling and analysing single static systems to dealing with
complex and dynamic (sometimes run concurrently) raised some questions in the efectiveness
of using attack trees to analyse certain assets.
      </p>
      <p>
        The settings of (traditional) attack trees are to depict (static) varying ways an asset may be
compromised. However, most assets nowadays have erratic behaviour and can interact with
other (sub)systems. This makes their vulnerabilities change according to the threat environments.
Therefore, to capture such dynamism using attack trees, the estimated annotations (i.e. nodes)
need to be updated regularly. Attempts have been made to extend attack trees through the
introduction of attack-defence trees [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], attack protection trees [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], sequential and parallel attack
trees [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], and attack countermeasure trees [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] etc. These proposed extensions introduced
how potential threats can be refuted. For example, if an attack tree models potential ways an
asset may be attacked (i.e. access to a secure sever room), the security engineer having good
knowledge of the assets surroundings, will design a security defence (hidden or open) to defend
the asset. These concepts are proven efective to assets that can be modelled with finite number
of nodes (states). The asset is modelled with an attack tree, and all possible attack paths are
blocked with defence or attack countermeasures. However, for a large and complex asset that
has infinitely many states, this concept is inefective. Another important point is that; most
assets nowadays are safety-critical. They do require a timely response to threats. This means
apart from identifying possible ways an asset may be compromised, the model has to also
provide a means to slow down or prevent the attack. In previous papers [
        <xref ref-type="bibr" rid="ref12 ref9">9, 12</xref>
        ], we investigated
the concept of attack trees for stand-alone assets. In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] we proposed the use of protection nodes
as an alternative to defence nodes. However, we realised that such a method is less efective to
CPS assets even with a small number of states. The challenge here is, CPS assets interact with a
wide range of objects (i.e. routing signs, cameras, buildings) and respond accordingly. Each of
these objects has its characteristics, and an attacker can manipulate these objects in diferent
ways (e.g. blur, blocked, add) to compromise the asset (e.g. DoS, message falsification attacks).
As such, a single pre-defined countermeasures or defence nodes is not enough to stop potential
attacks. In [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] we explored informally an idea to introduce time constraints in the set of parent
nodes in addition to the associated gates refinement. In this idea, we assume that even if the
threat environment of an asset changed, new vulnerabilities that emerged are connected to an
existing parent nodes. Although these vulnerabilities might not be refuted with the already
existing defence or protection nodes for other vulnerabilities, the time constraints defined on
the parent node will still be apply to the new vulnerabilities that connect to the parent node.
      </p>
      <p>In this paper we push forward our approach, we formally defined attack trees with time
constraints, we provided a case study to highlight situations where such model is applicable.
Also, we translated the concept into a (weighted) timed automata, and use a formal verification
tool UPPAAL to analyse. Let  be a parent node that is associated with a gate refinement,
assume we want to prevent an attacker from achieving the parent node. We introduce a set of
constant time intervals  that is represented by a constant pair &lt; ,  &gt;, with  marking the
start of an attack and  marking the end of the attack on a parent node. ,  ∈ Q, and  ≤  .
We associate the set of attack actions  with a set of attack time  . An attack time defines
the attack execution time for each action. To reach to the parent node, the attack time  ∈  for
each action on a given child node under attack has to be less than or equal to the interval. In
other words, if the attack time for child node(s) is more than the interval, the attacker cannot
reach to the parent node. We formalized this idea and translated the parent node reachability to
state reachability of timed automata.</p>
      <p>
        Related work. Currently, threat modelling methods commonly used in industry mainly
include graphical models, such as attack trees [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and attack graph [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Among them, attack
tree is a systematic attack scenario modelling method proposed by Schneier [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and formally
defined by Mauw and Oostdijk [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Since attack tree is a static model (and considered a
semiformal model), several analysis frameworks have been proposed to establish its analysis
method based on formal methods. These analysis frameworks have been developed based on
timed automata [14], petri nets [15], and stochastic games [16] etc. The authors of [17] developed
a stochastic framework for quantitative analysis of ADTrees. The framework adopts ADTree
methodology to represent attack scenarios in a simple graphical representation and performs
quantitative assessment using CTMC analytical approach. The authors of [18] introduced a
multi-objective optimization framework for attack trees whereby the leaves of the attack trees
were enriched with various parameters such as cost, time, skills and resources. The framework
supports the computation of a wide range of security metrics such as attack values, attack paths,
and ranking. They translated each attack tree gate and leaf into a priced timed automata and
analyse the framework via UPPAAL CORE. In another efort, the work in [ 19] developed a
modelling framework for expressing the temporal behaviour of an attacker as a boolean formula,
and use a model checking tools to perform fully automated analyses of the modelled system
by performing both qualitative (boolean) and quantitative (probabilistic) analysis. The authors
demonstrated an example using UPPAAL tool, a network of timed automata that shows the
model of a thief who wants to enter a house while the resident is not at home. The work in
[20] defined the semantics for arbitrary attackers in an attack-defence tree using schematic
timed automata (STA), and implemented the model by translating it into UPPAAL SMC. The
authors modelled the encoding of an AD-Tree with one automaton modelling the defender, one
automaton modelling the attacker and a separate one modelling the environment of an outcome,
and coordinated their behaviour through synchronising channels. Other related works are
[
        <xref ref-type="bibr" rid="ref11 ref8">21, 22, 11, 8</xref>
        ].
      </p>
      <p>Unlike the works mentioned here, our work focus on traditional attack trees without
considering defence nodes/actions. In our view, as mentioned earlier, defence actions are efective
only to pre-identified vulnerabilities. As such cannot be applied to a (new) set of attack surface
that emerged as a result of a change in the vulnerabilities landscape of the asset; modelled in an
attack tree. Therefore, we shift our focus on preventing attacks by introducing a set of time
constraints at the parent nodes; in addition to the gate refinement of the tree. We introduce a
set of time constraints  that is represented by a constant pair &lt; ,  &gt;, with  marking the
start of an attack and  marking the end of the attack on a parent node. ,  ∈ Q, and  ≤  .
We associate the set of attack actions  with a set of attack time  . An attacker can achieve
the parent node if and only if the attack action(s) together with the attack time can be executed
within the defined constant time intervals. To model the time constraints, we translate the tree
into a parallel composition of weighted timed automata (WTA). The sets of nodes of the attack
trees are translated to a set of locations in the weighted timed automata. For each leaf node in
the attack tree, we have an automaton that represents a linear path from the leaf to the root
node. Altogether their areas many WTAs as the leaf nodes in the attack tree. Each location that
represents a leaf has a clock that is activated when there is an attack in the corresponding leaf
in the tree. A transition is enabled only if a simple attack is successful in the attack tree.</p>
      <p>The paper is organized as follows. In Section 2 we describe attack trees formalism. In Section
3 we present the motivation for enhanced restrictions on attack trees model, and why time
constraint is a good option. In Section 4 we present time constraint as a form of security in attack
trees, and Section 5 timed automata and the translation of attack trees with time constraint into
(weighted) timed automata. Section 6 contains discussions and plans for future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Attack trees formalism</title>
      <p>
        In this section, we describe and define attack trees. An attack tree is a graphical way of describing
varying ways an asset may be compromised by a malicious user (an attacker). The structure
of attack trees we use in this paper is based on the existing model introduced by Schneier [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
but here we introduce a set of attacker’s actions  (explain later) over the tree. (, ℰ ) is a
tree, where  = {0} ∪  ∪ . {0} is the root node of the tree, it represents attackers
ultimate goal,  is a set of internal nodes which we will refer to as sub-goal (also called parent
nodes), they represent the decomposition of the root node into smaller units that are easier to
solve, and  is a set of leaf nodes (also called child nodes). The leaf nodes represent atomic
nodes or end nodes (vulnerability), indicating an attack step. These sets of nodes are connected
by a set of edges ℰ ⊆  ×  . Each node in the attack tree (except for leaf nodes) has a gate
refinement. A gate indicates (the fashion) how a node can be achieved (compromised). The
interpretation of this fashion is on a node at a level above the current node. For this work, we
make use of the   and  gates refinement. Informally, for a (parent) node with  
gate, it is said to have a set of (child) nodes, that are linked to the parent node by a set of
edges and all these (child) nodes must be achieved first before the parent node is reached. For a
(parent) node with  gate, a single node from the set of child nodes when achieved is enough
for the parent node to be reached. Formally we associate nodes with gates by the mapping
 : {0} ∪  → { , }.
      </p>
      <p>Definition 1. An attack tree is a tuple  = (, 0, , , ℰ , ) where,  is a finite set of
nodes, 0 is the root node of the tree, ,  ⊆  are two subsets such that  ∪  = 
and  ∩  = ∅, ℰ ⊆  ×  is a set of edges, connecting the nodes, and  : {0} ∪  →
{ , } is a mapping that associate some nodes to a gate.</p>
      <p>Steal a car attack tree (A)</p>
      <p>An attack tree with time constraint (B)</p>
      <p>Note, to compromise nodes in the tree, an attacker needs to perform a set of attack actions.
These set of (possible) actions are denoted by , and we defined an attack as a mapping
 :  →  ∪ { } such that () =  means that an attacker can compromises leaf node
 ∈  by executing an action  ∈ , () = Nil when no action is performed. We say that
attack  is simple if () ̸= Nil only for one leaf i.e. only one leaf is attacked. Practically, these
set of attack actions are aided by the use of tools or/and techniques to carry out the attack.
Therefore, in this work, we will name a tool that can aid an attacker in executing the attack
when referring to attack process in the working examples.</p>
      <p>Example 1. Shown in Figure.1 (A) is a simple attack tree that depicts possible ways to steal a car.
The car can be stolen by achieving the sub-goal obtain key or short-circuit. To obtain the key, the
sub-goal is of  refinement and therefore, an attacker must either steal the key or make a copy.
While to achieve short-circuit, the sub-goal is of   refinement and the attacker must get access
interior, find ignition cable, and connect the cable. Since the nodes must be achieved sequentially,
in this case the   gate is said to be extended to   (sequential  ). Linked with dotted
lines (below the tree) are a set of aided tools or/and techniques, and an attack is performed when
a tool is mapped to a node i.e. (make copy) = key cutter.</p>
      <p>To model the attack propagation (i.e. from leaf nodes, through sub-goals to root), we define a
state of attack tree, denoted by  i.e. state after an attacker has performed some actions from
. A state of attack tree is defined as a set of nodes, and for each successful execution of
attack actions (depending on the gate refinement of the target state), an attacker progresses to
another state. An initial state is denoted by 0. Let  be a state of an attack tree, and let  be
an attack. The transition  : (, ) → ′ defines a change in state from , when an attack 
is performed, to state ′ . We define this for simple attacks but it can be extended for arbitrary
ones.</p>
      <p>Definition 2. Let  be a simple attack such that () =  and let  be an attack state. Then
the next state ′ after attack  is defined as ′ = ( ∪ ) where operation  on the set of nodes
is defined as follows: ′ = () if ′ is the smallest set with the following properties
•  ⊆ ′
• if  is a sub-goal that is associated with   gate and all its child nodes are in () then
 ∈ ()
• if  is a sub-goal that is associated with  gate and at least one of its child node is contained
in () then  ∈ (),
A state is called final if it contains the root node. The transitive closure of  defines reachability
and will consider only states reachable from 0 by some attacks. Henceforth, we will use the
notation  → ′ instead of  : (, ) → ′ . In the following lemma, we can see that an attack
can be decomposed into simple attacks, however, the order of executing the attacks is important
in succeeding.</p>
      <p>Lemma 1. Given an attack tree  . Let 1, 2 be two simple attacks and  is a state. Then
 →12 ′ ̸=  21 ′, i.e. attacks are asymmetry.</p>
      <p>→
Proof 1. By example. State  is composed of all the nodes needed to reach ′, while ′ contains
all the nodes attacked by 1 and 2. As we can see from example 1, it is impossible to connect
the cable before accessing the interior and/or before finding the ignition cable. As such ordering of
attacks has influences on multiple simple attacks.</p>
      <p>Example 2. Let , ′ be a state and its successor respectively. Suppose from Fig.1 (A) to access the
interior, an attacker needs a plier. Then a transition  → ′ if (access interior) = plier.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Motivation for enhanced restrictions</title>
      <p>In this section, we will present motivations for a new security concept that will be formally
introduced in the next section. We start by presenting why it is important to have enhanced
restrictions in attack trees that will serve as a form of security in addition to identifying varying
ways an asset (modelled with attack trees) may be compromised. But first, we start by explaining
enhanced restriction and why it is needed.</p>
      <p>
        An attack tree is a basic description of how an attacker may compromise an asset, without
the description of how to prevent or repel the attack. This can play well into potential attackers;
by analysing an asset using attack trees to identify the set of vulnerabilities. The gates describe
an order (restriction) that guides how a set of parent nodes can be achieved. For example, the
  gate refinement required an attacker to execute attack on all the child nodes (link to a
parent node) before the attack succeeds. A more restrictive version of this was proposed in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ],
where the attacker is required to achieve the (child) nodes in sequential order. Failing to achieve
“all” the child nodes or “ accordingly”, will result in the attack process failing. Mechanisms like
this can be added (hidden) to components that will help prevent an attack. However, assets
such as CPS (i.e. interaction with objects from the physical environment which can be observed
by the attacker), this can be uncovered easily. The following scenario motivates the need for
extending attack trees (gates refinement) with time constraints.
      </p>
      <p>Attack Scenario: Assume that an auto company developed an app tool that connects its
customers with the service centre for
• technical analysis: whereby, some sensors in the vehicle can send data back to the
manufacturer for intelligent and autonomous vehicle studies,
• threat analysis: whereby, safety or/and varying ways a vehicle can be in danger is
identiifed and cautions message sent to the user.</p>
      <p>Combined this, a security threat analysis of the vehicle can be carried out based on the threat
environment (i.e. vehicle moving or parked), at each instance; an attack tree identifies potential
threats and display either in the vehicles’ onboard TFT LCD screen display or/and the user
mobile phone as a notification. For each identified possible threat/fault, the app indicates the
originating location (leaf node), other components in the vehicle that can be afected (sub-goals)
and the resultant efect/damage (attack goal). Potential adversaries to the vehicle are classified
as follows:
• an insider: someone with close relation to the auto company i.e. rough employee that
directly/indirectly misuses his/her privileges,
• generic attacker: someone with the intention to exploit vulnerabilities, that can result in
putting the vehicle to harm,
• component failure: part of vehicle components with rust/ware-out that can lead to
damages.</p>
      <p>For this paper, we will model working examples from a single threat environment i.e. the
vehicle is at a parked position, and in our future work, we will consider working with a dynamic
threat environment. Now, consider the vehicle user who is notified (by the app) of potential
danger. Even though the attack tree can (correctly) show the originating point and target, the
user cannot prevent or slow down the attack process.</p>
      <p>Example 3. Let us revisit example 1. let us assume a case whereby an attacker has already made
some progress with the attack (i.e. access interior and locate ignition cable) and (s)he is interrupted.
By the settings of traditional attack trees model, the attacker is not restricted from returning later
in time to complete the attack, or with the previous knowledge, restart the attack process.</p>
      <p>It is important that, apart from identifying possible ways the attacker can achieve the target,
a security measure is defined that will constrain the attacker from unlimited attempts.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Time constraints and security</title>
      <p>In this section, we extend the set of gates refinement with a set of time constraints. The time
constraints is an addition to the already existing gate refinement that is associated with each
parent node. We also associate each attack action with an attack time, indicating the time
needed for an attacker to complete executing the action.</p>
      <p>Given a set of attack actions , we introduce a set of attack time  .  is the time needed to
complete an action that can result in compromising a node, denoted simply by (, ) ∈  × 
(see Figure.1 (B)). By doing so, we are extending the attack definition (defined in section 2) by
 :  → ( ×  ) ∪ { }. The set of gates refinements mapping is also extended with a
set of time constraints  that is represented by a constant pair ⟨,  ⟩, with  marking the start
of an attack and  marking the (expected) end of attack on the parent node such that ,  ∈ Q,
and  ≤  . This allows us to redefine the gates refinement mapping as  : {0} ∪  →
{,  } ×  . For the sake of simplicity, we denote this as ⟨,  ⟩. From the graphical
representation shown in Figure.1 (B), one can easily derive these time extensions whereby
⟨0, 0⟩, ⟨1, 1⟩, and ⟨2, 2⟩ is added to the parent nodes (root node and sub-goals), meaning
they can only be reached if an attacker can execute the attack within the interval respectively.
Also, below with the dotted lines, attack time  is added to each action, where  ∈ {1 . . . 6}.
Regardless of the gates refinement i.e. ,  , an attack can only succeed if the action(s)
execution time does not exceed the time intervals at the gates of the (parent) node.
Example 4. Let us consider attack tree shown in Figure.1(B), the parent nodes are extended with
time intervals represented as pairs ⟨0, 0⟩ for the root node, ⟨1, 1⟩ for the  sub-goal, and
⟨2, 2⟩ for the   sub-goal. The attack actions (represented by tools) are also extended with
attack time. Each time indicates the time needed to complete the attack. From the initial attack
attempt, an attacker has until elapsed of  to complete the attack, otherwise the whole attack
process is consider failed. If  is larger than the constant time interval for the connected sub-goal,
the attack cannot succeed.</p>
      <p>Definition 3. Attack trees with time constraint. Let (, ℰ ) be a tree, an attack tree with
time constraint is a tuple  = (, 0,  , , ℰ , , , , ), where,  is a finite set of nodes,
0 is the root node of the tree that represents the attack target,  ,  ⊆  are two subsets such
that  ∪  =  and  ∩  = ∅, ℰ ⊆  ×  is a set of edges that connect the nodes,  is
a set of time constraints,  : {0} ∪  → { , } ×  is the mapping that associate some
nodes to a gate and time constraint,  is a set of attack time, and  :  → ( ×  ) ∪ { }.
Definition 4. Given an attack tree with time constraint , an attack over the tree that can reach
to the root node is defined as (assuming  ∈ ,  ∈  and  ∈  )
• If the tree has   gates, ∀1 . . .  : ∀ . . .  are less than or equal to the constant
time interval on the parent node,
• If the tree has  gates, ∃ :  is less than or equal to the constant time interval on the
parent node.</p>
      <p>As an example, let us consider a sub-goal short-circuit from Figure. 1 (B), an attacker can
succeed in achieving the sub-goal if and only if the summation of attack time 3 + 4 + 5 does
not exceed the time interval defined at ⟨,  ⟩.</p>
      <p>From Figure.1 (B), () = Nil if the attacker cannot complete the attack within the time
constraint at the gates. The following lemma guarantees that under some conditions a parent
node remains unreachable to a potential attacker regardless of the gate refinement associated
with the parent node.</p>
      <p>Lemma 2. Given a sub-goal , a set of time constraint defined at the gate refinement ⟨,  ⟩, and
a set of attack (actions)  ⊆  required to compromise . The sub-goal is unreachable to an
attacker if the attack execution time ∀ ∈  exceeds the attack time defined at the gate refinement.
Proof 2. Since each action has an attack time, we need to show that this attack time for all the
child nodes of  exceeds the time constraint at the gate. Now if this action cannot be executed
within the attack time, the sub-goal cannot be achieved.</p>
      <sec id="sec-4-1">
        <title>4.1. Enhanced restrictions and security</title>
        <p>There are some relations between time constraint on the gates refinement and improved security
for diferent kinds of systems; in general. For example, the use of idle time outs for web session
is a common practice in the development of high-risk applications such as online banking
platforms. Other instances where time constraint is used to improve the security of asset can be
found on e-locks (eg. car central locking system) that can automatically locked itself after a
specified passage of time [ 23]. The implementation of time restriction such as action time-out
in assets such as ATMs [15], and SMART-doors [24] are further good examples.</p>
        <p>In addition to other extensions of attack trees with security mechanism such as defence nodes
or attack countermeasures, time constraint can be used to model and analyse diferent kinds of
attack scenarios for diferent kinds of assets.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Timed automata</title>
      <p>
        As in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], we now consider the use of a weighted timed automata to analyse our model.
A weighted timed automata (WTA) is an extension of timed automata [14] with cost/price
information on both locations and edges that can be used to solve several interesting problems.
There exists a formal verification tool UPPAAL [ 25] that accepts WTA as its modelling language.
Before we explain further, we first recall the definition of a timed automata. (henceforth, we
refer to a location of timed automata by ).
      </p>
      <p>Definition 5. A timed automaton is a tuple   = (ℒ, ℒ0, E, , ℐ, ,  ), where ℒ is a finite set
of locations, ℒ0 ⊆ ℒ is a set of initial locations, E is a finite set of synchronization actions (events),
 is a finite set of clocks, ℐ : ℒ → Φ( ) is an invariant, assigning to every location  ∈ ℒ a clock
constraint,  ⊆ ℒ × E × Φ( ) × 2 × ℒ is a set of transition relations such that ⟨, , , , ′ ⟩
represents an edge from location  to location ′ on symbol .  is a clock constraint,  ⊆  is a set
of clocks to be reset, and  is a final location.</p>
      <p>The semantics of a timed automaton   is defined by associating a (labelled) transition
system    (defined in section 1) with it. A state in    consists of a pair (, ) whereby
 is a location of   and  indicates that for a clock ,  satisfies the label constraint ℐ().</p>
      <sec id="sec-5-1">
        <title>5.1. Weighted time automata and attack trees translation</title>
        <p>In this subsection, we introduce the basics of a WTA and give the translation of attack trees
with time constraint into a WTA.</p>
        <p>A Weighted timed automata, otherwise known as price timed automata (PTA), is an extended
version of timed automata (TA) with weight/cost information added on both locations and
edges. To arrive at a location, the weight value defined at that location has to be satisfied, also,
to enabled a transition via an edge, the weight value at that edge has to be satisfied. At the
ifnal/desired location, a global weight/cost which is the accumulated weight/cost along the run
is calculated. With this accumulative weight/cost value, it is easy to calculate the distance or
cost of travelling from point  to point  in diferent case studies. Formally, a weighted timed
automata is defined as follows [25].</p>
        <p>Definition 6. The tuple    = (ℒ, ℒ0, E, , ℐ, , ,   ) is a weighted timed automaton,
where ℒ is a finite set of locations, ℒ0 ⊆ ℒ is a set of initial locations, E is a finite set of
synchronization actions (events),  is a finite set of clocks, ℐ : ℒ → Φ( ) is an invariant, assigning to
every location  ∈ ℒ a clock constraint,  : ℒ ∪ E → N≥ 0 is a function that assigns weight value
to location and edge,  :  → Q is a set of weight parameters that updates the weight value
 :  → ( ∪ ),  is a set of transitions such that ⟨, , , , ,  ′ ⟩, where , ′ ∈ ℒ are the
source and target locations,  is a clock constraint,  ∈ E,  ⊆  is a set of clocks to be reset, and
 is a parametric weight update, and finally  is a final location.</p>
        <p>The trace of a weighted timed automata is a sequence of states with the transitions across
the states given as  = 0 →−00  0 1 →−11  1 2... such that
• there is always an initial location 0 with an initial clock valuation 0 = 0,
• for every  ∈ {1, .., }, there is some transition (, , , ,  , +1) ∈  ,
• a transition is enables only if; for every clock valuation , there exists a constraint  such
that  satisfies ,
• for every successful transition, a new clock valuation +1 is obtained by increasing every
clock variable in  by a transition  and resetting all previous clocks 0.</p>
        <p>Now, in other to analyse attack trees with time constraint using UPPAAL, we translate the
tree into a parallel composition of weighted timed automata. The sets of nodes of the attack
trees are translated to a set of locations in the weighted timed automata. For each leaf node
in the attack tree, we have a WTA that represents a linear path from the leaf to the root node.
Altogether there are as many WTAs as the leaf nodes in the attack tree. Each location that
represents a leaf which has a clock that is activated when there is an attack in the corresponding
leaf in the tree. An attack on a node in the tree represents an enabled transition in the WTA.
Initially, clocks become active when events synchronized, and end with either a success or fail
synchronization action.</p>
        <p>More general, an attack tree is translated into a parallel composition of weighted timed
automata   1 . . .    that represents linear path from the leaf to the root node. Given
an attack tree with time constraint , the semantics of successfully reaching the root node that
satisfies the weighted timed automata WTA can be given as JK ⊆ WTA if
• J0K = {WTA1 . . . WTA}such that at least WTA reached the</p>
        <p>= WTA, a final location  ∈ WTA is always satisfied,
• JK</p>
        <p>ifnal location ,
• JK = {WTA1 . . . WTA}such that for all A, the final location  reached.
Lemma 3. Let  be an attack tree with time constraint and let    be the equivalent product
of weighted timed automata. Suppose  is a (target) node, and location  is the (equivalent)
translation in   . The number of the active clock(s) in    to reach , is the same as the number
of (attack) actions carried out by an attacker before reaching .</p>
        <p>Proof 3. We know that a clock is reset for each enabled transition in WTA, therefore, since the
locations of    corresponds to the nodes in the attack trees, each enabled clock indicates an
active attack on a node. As such, the number of attack executed will correspond to the number of
clock(s) reset for events in the   .</p>
        <p>Theorem 1. Let    be a product of weighted timed automata for the translation of . For
a transition (, , , ,  , +1), the clock  is inactive for a corresponding node  ∈  in the
tree, if there is no active attack process on that node.</p>
        <p>Proof 4. Directly from lemma 3.</p>
        <p>We can model an attack  as a special weighted timed automata, and denote it as   ,
this weighted timed automata shows the attackers’ action and time when they are performed
on the attack tree. We use this in the following theorem to check the attack target (root node)
reachability for both the attack tree and the WTA.</p>
        <p>Theorem 2. Given an attack tree with time constraint  and a time automata   , an
attacker  can only reach the root node of the tree {0} if corresponding    plus   
running with the attack path in the tree can reach the final location.</p>
        <p>Proof 5. The main idea. We know that a root node can only be reached if an attacker can succeed
in completing the attack process. Therefore we have to show that a    plus    can also
reach the final location.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. UPPAAL model</title>
        <p>Uppaal accepts the synchronization of events using channels (input and output). As such, we
modelled a set of events ?, ?, ?, ? (receive) at the initial location to serve as a set of leave
nodes. We use two clocks  and , with  being a clock associated with each event while 
associated with a target location. Here,  is a clock to track . We also define two invariant
 and , to check whether both  and  are satisfied before the transition to the target
location is enabled.</p>
        <p>The UPPAAL template shown in Figure.2 is a simple model of time constraint in achieving
nodes in an attack trees. The leaves locations begin by waiting for the activation of signal
by one of the events ?, ?, ?, ? An event become activate only when the clock is less than
(predefined) . If the sub_goal location is of  gate, the activation of a single event is
enough for the transition to be enabled to the target location (sub_goal), otherwise all the events
(i.e.   gate) needs to be activated, and the sub_goal location can only be reached if the
clock  is less than (predefined) .</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Discussion and future work</title>
      <p>In this paper, we have presented attack trees with a time constraint to serve as a secured version
of attack trees. We discussed how the gates refinement can be extended with time parameters
and also propose how the attack trees with time constraint can be modelled using a formal
verification tool UPPAAL.</p>
      <p>As further work, we plan to study how attack trees can be used to analyse a CPS. A CPS is
a special kind of asset that can interact with objects from the physical environment as well
as other cyber-systems. This allows its operations to run parallel and concurrent, making it
easy for a potential attacker to observe (from the physical components), and perform some
dangerous attacks such as message falsification attack, DoS, message spoofing etc. by simply
adding, blocking or blurring the objects from the physical environment. This kind of threats
cannot be captured using attack trees alone. We plan to investigate opacity, a security property
formalizing the information leakage of a system to an external observer, namely intruder and
study how it can be used with attack trees.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgement</title>
      <p>This work was supported by the Slovak Research and Development Agency under the Contract
no. APVV-19-0220 (ORBIS) and by the Slovak VEGA agency under Contract no. 1/0778/18
(KATO).
[14] R. Alur, Timed automata, in: International Conference on Computer Aided Verification,</p>
      <p>Springer, 1999, pp. 8–22.
[15] B. Berthomieu, M. Diaz, Modeling and verification of time dependent systems using time
petri nets, IEEE transactions on software engineering 17 (1991) 259.
[16] L. S. Shapley, Stochastic games, Proceedings of the national academy of sciences 39 (1953)
1095–1100.
[17] K. Lounis, S. Ouchani, Modeling attack-defense trees’ countermeasures using continuous
time markov chains, in: International Conference on Software Engineering and Formal
Methods, Springer, 2020, pp. 30–42.
[18] R. Kumar, E. Ruijters, M. Stoelinga, Quantitative attack tree analysis via priced timed
automata, in: International Conference on Formal Modeling and Analysis of Timed
Systems, Springer, 2015, pp. 156–171.
[19] O. Gadyatskaya, R. R. Hansen, K. G. Larsen, A. Legay, M. C. Olesen, D. B. Poulsen, Modelling
attack-defense trees using timed automata, in: International Conference on Formal
Modeling and Analysis of Timed Systems, Springer, 2016, pp. 35–50.
[20] R. R. Hansen, P. G. Jensen, K. G. Larsen, A. Legay, D. B. Poulsen, Quantitative evaluation
of attack defense trees using stochastic timed automata, in: International Workshop on
Graphical Models for Security, Springer, 2017, pp. 75–90.
[21] I. A. Tøndel, M. G. Jaatun, M. B. Line, Threat modeling of ami, in: Critical Information</p>
      <p>Infrastructures Security, Springer, 2013, pp. 264–275.
[22] A. E. M. AL-Dahasi, B. N. A. Saqib, Attack tree model for potential attacks against the
scada system, in: 2019 27th Telecommunications Forum (TELFOR), IEEE, 2019, pp. 1–4.
[23] D. Ray, The time structure of self-enforcing agreements, Econometrica 70 (2002) 547–582.
[24] J. Padhye, V. Firoiu, D. Towsley, J. Kurose, Modeling tcp throughput: A simple model
and its empirical validation, in: Proceedings of the ACM SIGCOMM’98 conference on
Applications, technologies, architectures, and protocols for computer communication,
1998, pp. 303–314.
[25] P. Bulychev, A. David, K. G. Larsen, M. Mikučionis, D. B. Poulsen, A. Legay, Z. Wang,
Uppaal-smc: Statistical model checking for priced timed automata, arXiv preprint
arXiv:1207.1272 (2012).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Schneier</surname>
          </string-name>
          ,
          <article-title>Attack trees</article-title>
          ,
          <source>Dr. Dobb's journal 24</source>
          (
          <year>1999</year>
          )
          <fpage>21</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Mauw</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Oostdijk</surname>
          </string-name>
          ,
          <article-title>Foundations of attack trees</article-title>
          ,
          <source>in: International Conference on Information Security and Cryptology</source>
          , Springer,
          <year>2005</year>
          , pp.
          <fpage>186</fpage>
          -
          <lpage>198</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B.</given-names>
            <surname>Kordy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Piètre-Cambacédès</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Schweitzer</surname>
          </string-name>
          ,
          <article-title>Dag-based attack and defense modeling: Don't miss the forest for the attack trees</article-title>
          ,
          <source>Computer science review 13</source>
          (
          <year>2014</year>
          )
          <fpage>1</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.-W.</given-names>
            <surname>Ten</surname>
          </string-name>
          , C.-C. Liu, G. Manimaran,
          <article-title>Vulnerability assessment of cybersecurity for scada systems</article-title>
          ,
          <source>IEEE Transactions on Power Systems</source>
          <volume>23</volume>
          (
          <year>2008</year>
          )
          <fpage>1836</fpage>
          -
          <lpage>1846</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Beaulaton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. B.</given-names>
            <surname>Said</surname>
          </string-name>
          , I. Cristescu,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sadou</surname>
          </string-name>
          ,
          <article-title>Security analysis of iot systems using attack trees</article-title>
          ,
          <source>in: International Workshop on Graphical Models for Security</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>68</fpage>
          -
          <lpage>94</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Guo</surname>
          </string-name>
          , J. Liu,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Peng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <article-title>Security analysis on cyber-physical system using attack tree</article-title>
          ,
          <source>in: 2013 Ninth International Conference on Intelligent Information Hiding and Multimedia Signal Processing</source>
          , IEEE,
          <year>2013</year>
          , pp.
          <fpage>429</fpage>
          -
          <lpage>432</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Siddiqi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Seepers</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hamad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Prevelakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Strydis</surname>
          </string-name>
          ,
          <article-title>Attack-tree-based threat modeling of medical implants</article-title>
          .,
          <source>in: PROOFS@ CHES</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>32</fpage>
          -
          <lpage>49</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Roy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. S.</given-names>
            <surname>Trivedi</surname>
          </string-name>
          ,
          <article-title>Attack countermeasure trees (act): towards unifying the constructs of attack and defense trees</article-title>
          ,
          <source>Security and Communication Networks</source>
          <volume>5</volume>
          (
          <year>2012</year>
          )
          <fpage>929</fpage>
          -
          <lpage>943</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A. T.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Gruska</surname>
          </string-name>
          ,
          <article-title>Attack protection tree</article-title>
          ., in: CS&amp;P,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>F.</given-names>
            <surname>Arnold</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Guck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Stoelinga</surname>
          </string-name>
          ,
          <article-title>Sequential and parallel attack tree modelling</article-title>
          , in: International Conference on Computer Safety, Reliability, and Security, Springer,
          <year>2014</year>
          , pp.
          <fpage>291</fpage>
          -
          <lpage>299</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>X.</given-names>
            <surname>Ji</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Fan</surname>
          </string-name>
          , W. Fu,
          <article-title>Attack-defense trees based cyber security analysis for cpss</article-title>
          ,
          <source>in: 2016 17th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence</source>
          ,
          <article-title>Networking and Parallel/Distributed Computing (SNPD)</article-title>
          , IEEE,
          <year>2016</year>
          , pp.
          <fpage>693</fpage>
          -
          <lpage>698</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A. T.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <article-title>Simplified timed attack trees</article-title>
          ,
          <source>in: International Conference on Research Challenges in Information Science</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>653</fpage>
          -
          <lpage>660</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>X.</given-names>
            <surname>Ou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Singhal</surname>
          </string-name>
          ,
          <article-title>Attack graph techniques</article-title>
          ,
          <source>in: Quantitative Security Risk Assessment of Enterprise Networks</source>
          , Springer,
          <year>2012</year>
          , pp.
          <fpage>5</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>