You are on page 1of 6

Modeling and Analysis of Authentication Protocols

Using Colored Petri Nets

Yang Xu 1, 2 Xiaoyao Xie * 1, 2, Member, IEEE


1. Key Laboratory of Information and Computing Science 2. School of Computer Science and Technology
of Guizhou Province Guizhou University
Guizhou Normal University Guiyang, China
Guiyang, China xyx@gznu.edu.cn (corresponding author: Xiaoyao Xie)
kyxy3465@sina.com.cn

Abstract—Authentication protocols are the basis of security in and the state space analysis, an attack is found which the same
networks. Therefore, it is essential to ensure that these protocols as the one found by Gavin Lowe [12].
correctly. However, it is difficult to design authentication The paper is organized as follows. Section 2 presents the
protocols that are immune to malicious attack, since good Andrew secure RPC protocol and its fixes [9, 10, 12, 13]. In
analysis techniques are lacking. In this paper, combining some
Section 3, a CP-Net for the Andrew secure RPC protocol fixed
analysis methods currently for analysis of security protocols
based on Petri Nets methods together, a Colored Petri Net for the in [10] is introduced. Then, an intruder model is developed
Andrew secure RPC protocol fixed in [10] has been presented. and integrated into the protocol model. In Section 4, model
And then an intruder model is developed and integrated into the checking is performed in CPN Tools. After model checking
protocol model. Model checking is performed in CPN Tools. In and the state space analysis, an attack is found. Finally, we
the model checking, two methods are used. After model checking conclude the work and suggest future research in Section 5.
and the state space analysis, an attack is found.
II. ANDREW SECURE RPC PROTOCOL
Keywords- authentication protocols; Colored Petri Net; Andrew
In [9], the Andrew secure RPC protocol is introduced. It
secure RPC protocol; protocol analysis
allows two agents, who already share a key K AB , to agree upon
'
I. INTRODUCTION a new session key K AB , and to perform an authentication
With the rapid growth of network applications, network handshake.
security has become an important issue, and authentication The Andrew secure RPC protocol is as follows:
protocols are the basis of security in networks. Therefore, it is 1. A → B : A,{N a }Kab
essential to ensure these protocols correctly. Unfortunately, it 2. B → A :{N a + 1, N b }Kab
is difficult to design a robustness and effective security
protocol for networks. Not only because of the characteristics 3. A → B :{Nb + 1}K ab
of networks, but also because good analysis techniques are 4. B → A :{K ab' , N b' }K ab
lacking.
Colored Petri Nets (CP-Nets) [1] which belongs to the Here, principal A is a client and principal B is a
high level Petri Nets have already proven suitable as a server. N a and N b are nonces. N b' is an initial sequence number
modeling technique for analysis of security protocols [2]-[7]. which will increase monotonically to be used in subsequent
Ruilong Wu presents a new checking security protocol method communication. The first message transfers a nonce, which B
based on CP-Nets [8]. In this method, a general intruder model returns in the second message. If A is satisfied with the reply,
is given and CPN Tools is used. To verify the method, two it returns B’nonce. After B receives and checks the third
authentication protocols using asymmetric keys are analyzed. message, it sends a new session key to A.
However, more protocols need to be analyzed to prove the In [10], this protocol is analyzed using BAN logic, and a
universality of the method. But also, when a general intruder weakness is exposed. Further, a correction to the Andrew
model is given, the state space explosion problem may follow. secure RPC protocol was suggested:
In this paper, we introduce a CP-Net for the Andrew 1. A → B : A, N a
secure RPC protocol [9] using symmetric keys fixed in [10]. '
Then, an intruder model is developed and integrated into the 2. B → A :{N a , K ab }Kab
protocol model. Model checking is performed in CPN Tools 3. A → B :{N a }K ′
ab
[11]. In the model checking, two methods are used. One
exploits the provided state space exploration functions and 4. B → A : N b'
another is simulation implementation. After model checking

This work was supported in part by National High Technology Research


and Development Program (863 Project) of China under Grant
2007AA010609, in part by National Natural Science Foundation of China
under Grant 90718009, in part by Science and Technology Foundation of
Guizhou Province, China under Grant 20082125, and in part by Postgraduate
Innovation Foundation of Guizhou University, China under Grant 2007035.
Although the correction is stronger than the original one, RUN 2, RUN3, and RUN4 are declared for modeling the states
Gavin Lowe finds an attack on it using two parallel runs [12]. of the performing protocol. We declare variables i, j, l, ln, and
He suggests change the second message to include an no, of type INT and n1 of type N.
encrypted copy of the sender’s identity: CP-Net Model:
2. B → A :{N a , K ab' , B}Kab Fig. 2 shows the CP-Net model of the Andrew secure RPC
protocol in the case of normal execution. This model consists
III. MODELING THE ANDREW SECURE RPC PROTOCOL of two CP-Net blocks. One CP-Net block describes the
Initiator of the protocol. The other block describes the
In this section, a CP-Net for the Andrew secure RPC Responder of the protocol. Principal p(1) and p(2) may be
protocol fixed in [10] is introduced. Then, an intruder model is Initiator can also be Responder. However, it is impossible that
developed and integrated into the protocol model. Modeling is a principal is Initiator and also Responder, since there is no
performed in CPN Tools developed at the University of the token color in color set PROC. A time implementation of
Aarhus [11], a graphical ML-based tool for editing and this CP-Net model related to two principal.
analyzing CP-Nets.
Transitions Sent1, Sent2, Sent3 and Sent4 represent the
A. CP-Net Model of the Andrew Secure RPC Protocol transmission occurrence of Message1, Message2, Message3
Data is modeled by tokens each belonging to a special data and Message4 respectively. On the other hand, transitions
type called the color set of a token. The token color is the Rec1, Rec2, Rec3 and Rec4 represent the receiving
actual assignment of values to this token. The CP-Net model occurrence of Message1, Message2, Message3 and Message4
for the Andrew secure RPC protocol fixed in [10] is shown in respectively. Places Run1_1, Run1_2, Run1_3, and Run1_4
Fig. 1 (declarations) and Fig. 2 (the CPN-Net). In the hold the state after the implementation of every step of
following, names of places, transitions, and variables of the Initiator. Place Run2_11, Run2_12, Run2_2, Run2_3, and
CPN-Net model are written in italic style. Run2_4 hold the state after the implementation of every step
of Responder. After the protocol carries out, Run1_4 and
Run2_4 save the tokens which can prove that the protocol has
already carried out. Places M1, M2, M3, and M4 hold the state
of the message in the public channel. Thus, the intruder can
modify the messages, replay the messages or pass the
messages without any modifications.
B. CP-Net Model of the Andrew Secure RPC Protocol
Integrated into an Intruder Model
The CP-Net model for the Andrew secure RPC protocol
integrated into an intruder model is shown in Fig. 3(the CP-
Net of protocol) and Fig. 4(the CP-Net of intruder).
Declarations:
The intruder has the ability of a normal principal, so, he
can play the role of the Initiator or Responder. Thus, the value
of constant, u, becomes to 3. The other declarations of the new
CP-Net model are the same as the ones shown in Fig. 1.
CP-Net Model:
There are two types of CP-Nets: non-hierarchical CP-Nets
and hierarchical CP-Nets [11]. Effective CP-Net modeling
requires the ability to distribute a CP-net across multiple
Fig.1. Declarations of the CPN-Net model of the Andrew secure RPC pages, so as to divide it into modules small enough to keep
protocol
track of. CP-Net hierarchy is able to organize a CP-net into
Declarations: sub models. Therefore, the model for the Andrew secure RPC
Referring to Fig.1, a constant, u, is defined to represent the protocol integrated into an intruder model is established using
maximum number of the principals in the protocol, another the hierarchical CP-Nets.
constant, m, represents the number of the nonces. Two color CP-Net hierarchy supports a method for defining sets of
sets, INT, and NO, are declared to the sets of integers. Color places so that anything that happens to each place in a set also
set PART models the principals. Color set N models the happens to all the other places in the set. The places are then
nonces. Color set PROC, a subset of PROC1, models the functionally identical. Such places are called fusion places,
principals who are performing the protocol. Color set INT_KK and a set of fusion places is a fusion set.
models the shared key of the two principals. Two color sets,
CRY1and CRY2, are declared for modeling the cryptographs in
the message. To model the messages, color sets MSG1, MSG2,
MSG3, and MSG4 are declared. Four color sets, RUN1 and
1`n(1)
N1 N Run1_1 RUN1 Run1_2 RUN3 Run1_3 RUN3 Run1_4 RUN4

n1 (p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j))) (p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))
(p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)),no)
(p(i),p(j),n1) (p(i),p(j),n1) (p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))
PROC.all() (p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))

(p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j))


Proc1_1 Sent1 Proc1_2 Rec2 Proc1_3 Sent3 Proc1_4 Rec4
PROC
PROC PROC PROC
(p(i),p(j)) (p(i),p(j),no)
(p(i),p(j),n1) (p(i),p(j),(n1,(2,k(i),k(j)),(1,k(i),k(j)))) (p(i),p(j),(n1,(2,k(i),k(j))))

Fig.2 CP-Net model of the Andrew secure RPC protocol


M1 M2 M3 M4
MSG1 MSG2 MSG3 MSG4
(p(i),p(j),n1) (p(i),p(j),(n1,(2,k(i),k(j)),(1,k(i),k(j)))) (p(i),p(j),(n1,(2,k(i),k(j)))) (p(i),p(j))
PROC.all() (p(i),p(j),no)

no+1 1
(p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j))
Proc2_1 Rec1 Proc2_2 Sent2 Proc2_3 Rec3 Proc2_4 Sent4 NextNO
no
PROC PROC PROC PROC INT
(p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j))) (p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))
(p(i),p(j),n1) (p(i),p(j),n1,(ln,k(i),k(j))) (1,k(i),k(j))
(p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))(p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)))
(p(i),p(j),n1,(2,k(i),k(j)),(1,k(i),k(j)),no)
Run2_12 K2 Run2_2 Run2_3
RUN2 INT_KK RUN3 RUN3
(p(i),p(j),n1,(2,k(i),k(j))) 1`(1,k(1),k(2))++
(2,k(i),k(j))
(p(i),p(j),n1) 1`(1,k(2),k(1))
2
2
Run2_11 NewK NextKNO Run2_4
RUN1 INT RUN4
1`n(1)
N1 Run1_1 Run1_2 Run1_3 Run1_4
N RUN1 RUN3 RUN3
RUN4
n1 ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j))) ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
((p(i),p(j)),n1) ((p(i),p(j)),n1)
((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j))) ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
PROC.all() ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)),no)

(p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j))


Proc1_1 Sent1 Proc1_2 Rec2 Proc1_3 Sent3 Proc1_4 Rec4
PROC
PROC PROC PROC
((p(i),p(j)),n1) ((p(i),p(j)),(n1,(2,k(i),k(j)))) ((p(i),p(j)),no)
((p(i),p(j)),(n1,(2,k(i),k(j)),(1,k(i),k(j)))) (p(i),p(j))

Store1 M2 Store3 M4
Store1 M2 Store3 M4
MSG1 MSG2 MSG3 MSG4

Fig.3 CP-Net model of the Andrew secure RPC protocol (with an intruder)
M1 Store2 MSG2 M3 Store4 MSG4
M1 Store2 M3 Store4
MSG1 MSG3

((p(i),p(j)),(n1,(2,k(i),k(j)),(1,k(i),k(j)))) ((p(i),p(j)),no)
((p(i),p(j)),n1) ((p(i),p(j)),(n1,(2,k(i),k(j)))) (p(i),p(j))
PROC.all()

no+1 1
(p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j)) (p(i),p(j))
Proc2_1 Rec1 Proc2_2 Sent2 Proc2_3 Rec3 Proc2_4 Sent4 NextNO
PROC
PROC no
PROC PROC INT
((p(i),p(j)),n1,(ln,k(i),k(j))) ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
(1,k(i),k(j)) ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
((p(i),p(j)),n1)
Run2_12 K2 Run2_2 ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
RUN2 INT_KK RUN3 ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)))
((p(i),p(j)),n1,(2,k(i),k(j))) 1`(1,k(1),k(2))++
1`(1,k(2),k(1))++ ((p(i),p(j)),n1,(2,k(i),k(j)),(1,k(i),k(j)),no)
((p(i),p(j)),n1) (2,k(i),k(j))
2 1`(1,k(1),k(3))++
2 1`(1,k(3),k(1))++
Run2_11 NewK NextKNO 1`(1,k(2),k(3))++ Run2_3 Run2_4
RUN4
1`(1,k(3),k(2))
RUN1 INT RUN3
C. CP-Net Model of an Intruder Model of the Andrew A. State Space Analysis of the Andrew Secure RPC
Secure RPC Protocol Protocol CP-Net Model
Following the intruder model of Dolev and Yao [14], the To analyze the desired properties of the Andrew secure
intruder has to be modeled with the highest imaginable RPC protocol, we firstly check the state space standard report
strength so that all possible attacks on the protocol can be generated by CPN Tools. The report shows that a full state
identified. Considering the public channel, the intruder has full space with 19 nodes and 18 arcs is generated. We also found 2
control over it. According to the model, he can then carry out dead markings in the state space, which are nodes18, 19. We
the following actions: can use the state space exploration functions shown in Fig. 5
1. Tapping and storage of all messages exchanged via the to know the tokens in the places Run1_4 and Run2_4 of node
public channel. 18. From Fig. 5 we can know that the Initiator is p(1) and the
2. Forwarding, rerouting and blocking of messages. Responder is p(2) in this implementation of the protocol. In
3. Generation of forged messages using tapped, randomly addition, p(1) and p(2) have the same believes. There is a
generated and obsolete data and encryption techniques. similar result to node 19.
4. Decryption of cryptographs if the intruder has a
matching key
5. The intruder has the ability of a normal principal, so, he
can take part in the protocol.
Fig. 4 illustrates an intruder between Initiator and
Responder. We observe that the intruder can modify and
replay the outgoing messages from the Initiator to the
Responder and vice versa.
We study the case of man-in-middle attack, although Fig.5 Function Mark and the result 1
different attack models can be applied to the Andrew secure
B. State Space Analysis of CP-Net Model of the Andrew
RPC protocol.
Secure RPC Protocol Integrated into an Intruder Model
((p(j),p(i)),(n1,(2,k(j),k(i)),(1,k(j),k(i)))) In the same way, we firstly check the state space standard
report of CP-Net model integrated into an intruder model. The
Store1 Replay2 M2 report shows that a full state space with 79 nodes and 78 arcs
Store1 M2
MSG1 MSG2 is generated. We also found 6 dead markings in the state
((p(i),p(j)),n1) space. However, the report does not give the all dead
markings. Thus, the function ListDeadMarkings( ) is used, and
((p(i),p(j)),(n1,(2,k(i),k(j)),(1,k(i),k(j))))
((p(j),p(i)),n1) the result is shown in Fig. 6.
Replay1 M1 Store2 MSG2
M1 Store2
MSG1

((p(j),p(i)),no)
Store3 Replay4 M4
Store3 M4 Fig.6. Dead markings for the described CP-net
MSG3 MSG4

((p(i),p(j)),(n1,(2,k(i),k(j))))
((p(j),p(i)),(n1,(2,k(j),k(i))))
((p(i),p(j)),no) Additionally, we use the state space exploration functions
shown in Fig. 7 to know the tokens in the places Run1_4 and
Replay3 M3 Store4 MSG4 Run2_4 of node 79. From Fig. 7, we can see that p(1) and p(2)
M3
MSG3
Store4 do not have the same believes.

Fig.4 CP-Net model of intruder of the Andrew secure RPC protocol

IV. ANALYZING THE ANDREW SECURE RPC PROTOCOL


In this section, model checking of the two CP-Net models
is performed in CPN Tools. In the model checking, two
methods are used. One exploits the provided state space
Fig.7 Function Mark and the result 2
exploration functions and another is simulation
implementation. After model checking and the state space To get more details, we run a simulation to the CP-Net.
analysis, an attack is found which the same as the one found Variable i is bound to 1 and j is bound to 2. After the
by Gavin Lowe [12]. simulation, we get an implementation sequence. In this
sequence, p(1) believes that he has established a session with
p(2), and he believes that p(2) has established a session with
him, even though p(2) may in fact be absent. There are the
similar results to the other nodes. [2] E. Doyle, S. Tavares, and H. Meijer, “Automated security analysis of
cryptographic protocols using Coloured Petri Net specifications,”
Coincidentally, this attack is the same as the one found by Workshop on Selected Areas in Cryptography, SAC’95 Workshop
Gavin Lowe [12]. In fact, we have analyzed the original Record, 1995, pp. 35–48.
protocol and its fixes in [10] and [12] using Rubin logic, and [3] E. Doyle, S. Tavares, and H. Meijer, “Computer analysis of
we also present a new fix in which the weakness no longer cryptographic protocols using Coloured Petri Nets,” 18th Biennial
exists [13]. Symposium on Communication, Kingston, Ontario, 1996, pp. 194–199.
[4] A. M. Basyouni, “Analysis of wireless cryptographic protocols,”
V. CONCLUSION Master’s Thesis, Queen’s University Kingston, Ontario, Canada, 1997.
[5] HeeChul Moon, “A study on formal specification and analysis of
A Colored Petri Net for the Andrew secure RPC protocol cryptographic protocols using Colored Petri Nets,” Master’s Thesis,
fixed in [10] has been presented. And then an intruder model Kwangju institute of science and technology, Korea, 1998.
is developed and integrated into the protocol model. Model [6] Daobin Liu, Li Guo, and Shuo Bai, “Formal analysis of security protocol
checking is performed in CPN Tools. In the model checking, using Petri Nets,” Acta Electronica Sinica, vol.32, no.11, 2004, pp.
1926–1929.
two methods are used. After model checking and the state
[7] W. Dresp, “Computer-gest¨utzte Analyse von kryptographischen
space analysis, an attack is found which the same as the one Protokollen mittels gef¨arbter Petrinetze,” Diploma Thesis, Department
found by Gavin Lowe [12]. For the sake of simplicity, we use of Business Information Systems, University of Regensburg, 2004.
the hierarchal CP-Nets in our analysis of the protocol. [8] Ruilong Wu, “Research on checking security protocols technology based
In the future, we would like to use CP-Nets to analyze on CPN models,” Master’s Thesis, Guangxi University, Nanning, China,
other security protocols and combine different methods 2005.
together in the analysis. We are also interested in the state [9] M. Satyanarayanan, “Integrating security in a large distributed system,”
ACM Transactions on Computer Systems, vol. 7, no. 3, 1989, pp. 247–
space reduction methods to overcome the state space 280.
explosion problem in the specialized CP-Nets. [10] M. Burrows, M. Abadi, and R. Needham, “A logic of authentication,”
ACM Transactions on Computer Systems, vol. 8, no. 1, 1990, pp. 18–36.
ACKNOWLEDGMENT [11] CPN Tools Homepage: http://wiki.daimi.au.dk/cpntools/cpntools.wiki.
The Authors thank Professor Kaile Su of Peking [12] Gavin Lowe, “Some new attacks upon security protocols,” in Proc. 9th
1996 IEEE Workshop Computer Security Foundations, pp. 162–169.
University for his excellent suggestion to pursue this topic. [13] Yang Xu, and Xiaoyao Xie, “Analysis of authentication protocols based
on Rubin logic,” in Proc. 4th IEEE Int. Conf. Wireless Communications,
REFERENCES Networking, Mobile Computing, 2008, pp. 1–5.
[1] K. Jensen, “Coloured Petri Nets: basic concepts, analysis methods and [14] D. Dolev, and A.Yao, “On the security of public key protocols,” in Proc.
practical use,” Vol. 1–3, Basic Concepts. Monographs in Theoretical 1981 IEEE Symposium on Foundations of Computer Science, pp. 350–
Computer Science, Springer-Verlag, 1997. 357.

You might also like