You are on page 1of 5

JOURNAL OF COMPUTING, VOLUME 2, ISSUE 9, SEPTEMBER 2010, ISSN 2151-9617

HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 102

Mobile Agent Security and Key Management Technique


V Sreekanth, Prof S. Ramchandram, and Prof A.Govardhan

Abstract— Mobile agent technology is a new paradigm of distributed computing that can replace the conventional client-server
model. However, it has not become popular due to some problems such as security. The fact that hosts have complete control
over all the programs makes it very hard to protect mobile agents from untrusted hosts. The cryptographic key generation and
distribution mechanism strongly holds the success of the mobile agent security systems. The agents and hosts are mutually
distrusting each other, but they trust the third parties. In this paper, this property is exploited for the secure way of generating
and distributing the keys using service oriented architecture.

Index Terms— Mobile Agents, Security, Key Exchange, JADE.

——————————  ——————————

1 INTRODUCTION

W ITH the advent of new computing paradigms like


mobile code and ubiquitous computing, the priva-
cy and integrity of software programs become a
the authors. This setup is useful for collecting bids (Of-
fers) from each of the hosts. This system also addresses
security issues for the system, evaluate possible attacks by
major concern beyond classical data security considera- malicious hosts, and devise and implement solutions to
tions. Running a program in a potentially hostile envi- protect the system against these attacks.
ronment may raise various security concerns. The securi-
ty concerns can be classified in two broad categories, ac-
cording to whether the agent’s or the platform’s security
2 DEFINATIONS AND NOTATIONS
is at stake.
The integrity of an agent means that neither code nor the
On the one hand, host platforms receiving and executing execution state should be changed by an unauthorized
mobile agents must be protected against malicious code. host, and if the code or execution state has been tampered
Common mechanisms addressing this issue include cryp- with, such changes should be detectable (the owner, host
tographic authentication and integrity checks, code sign- or an agent platform, that wants to interact with the
ing and encryption, etc. On the other hand, mobile agents agent).
must protect themselves against hosts trying to tamper The authorized changes occur only when the agent has to
maliciously with either the code or the data carried by migrate from one host to another. The formal definitions
incoming agents. This issue, known as the malicious host are given below:
problem, is usually addressed by the introduction of ap-
plication-level cryptographic protocols [6, 10, 9, 8] whose Definition 1 (Integrity of an agent): An agent’s integrity is
aim is providing two basic guarantees: confidentiality not compromised if any unauthorized modification can
and integrity. be detected by the agent’s owner.
Definition 2 (Weak forward integrity): If in is the first ma-
The use of design patterns is an approach to improve the licious agent place on the itinerary, the integrity of each
development process of applications and the quality of partial result m0, …, mn-1 is provided.
the final products. Some mobile agent design patterns
have already been proposed. However, most of these pat- Weak forward integrity is conceptually not resistant to
terns have not been concretely implemented yet. In addi- cooperating malicious hosts and agent places that are vi-
tion, there is not enough concrete information on how sited twice. To really protect the integrity of partial result
they can be implemented and on whether they are techni- we need a definition without constraints.
cally feasible when considering a specific agent platform.
As defined by Yee[11], if a mobile agent visits a sequence
This paper discuss about the experimental setup built by of hosts S1,S2,…Sn, and the first malicious host is after
Sm, where 1≤m≤n-1, then none of the partial results gen-
————————————————
erated at hosts Si (i ≤ m) can be undetectably modified by
 V Sreekanth is persuing his Ph.D from Jawaharlal Nehru Technological
University, Hyderabad, AP. Currently employed in Tata Consultancy Ser- malicious host.
vices, Plano, TX, 75024.
 Prof S Ramchandram, Dept. of Computer Science & Engg, University Definition 3 (Strong forward integrity): None of the encap-
College of Engineering (A), Osmania University Hyderabad – 500 007, sulated messages mk, with k<n, can be modified.
INDIA
 Prof. A Govardhan, Principal, JNTUH College of Engg, Nachupally, Ka-
rimnagar, AP. If a mobile agent visits a sequence of hosts S1,S2,…,Sn,
and the first malicious host is after Sm, then none of the
encapsulated offers Ok where k>m can be modified.
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 9, SEPTEMBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 103

This paper refers to forward integrity as strong forward trusted infrastructure elements which may or may not
integrity (when applicable). To make notion of forward exist.
integrity more useful, publicly verifiable forward integri-
ty is also defined, that enables any host to detect com- Extended Deployment Periods: Agents must function for
promised agents. extended periods of time, thus allowing users to launch
long-term “watcher” agents that take action only if speci-
Definition 4 (Publicly verifiable forward integrity): Any fied criteria have been met and other long-term service
host Si can verify that the chain of partial results agents.
m(i0),….m(in-1) has not been compromised.
Safe Execution: Agents must be free from integrity attacks
Definition 5 (Insertion Resilience): Offers can only be add- conducted by malicious hosts or other agents, and must
ed to the agent data by authorized hosts. be protected from faulty execution or non-execution by
malicious hosts. Agents will also be much more useful if
Definition 6 (Truncation Resilience): The chain can only be they can carry secrets (such as cryptographic keys or user
truncated at i if the host Si colludes with the malicious decision information, such as how much a user would be
host(s). willing to pay for merchandise).

TABLE 1: NOTATIONS USED Realistic Infrastructure Requirements: Agent properties


must not rely on unrealistic infrastructure assumptions,
S0 Source System of the Agent (Origin of Mobile
such as the assumption that all hosts are trustworthy, that
Agent)
implementation algorithms will remain secret, or that
Si (i>=1) Set of hosts the Agent visits (intermediate Hosts) every agent execution environment is implemented by a
tamper-resistant hardware peripheral.
oi Original Bid made by host Si

Oi Encapsulated offer from Si

H(x) Cryptographic hash function 4 CURRENT AGENT INTEGRITY


ri Nonce generated by Si TECHNIQUE
MACki(x) Message Authentication Code generated using This technique of agent integrity and key generation is
secret key ki the extension of Yee’s Strong forward integrity, which
says none of the offers in the agent data can be modified
As mentioned, each of these protocols has a common se- without detection by the originator, was extended by oth-
quence of phases: Initial setup by originator, initial visit ers. Each offer in the data set is chained to the next one
on intermediate hosts, and update of data and verification using the identity of the next host to be visited by the
of data integrity. The agent visits a sequence of hosts s1, agent. Upon agent return, for each visited host, the origi-
s2, ...sn, and obtain an offer oi from each host, where an nator decrypts the random nonce and generates the secret
offer includes not only a price but some indication of the keys. If the chaining relation fails at a particular point, all
source of the offer, usually set of offers ω, a set of encap- subsequent offers are rejected.
sulated offers Ω and key k, and we use subscript to de-
note these values over time. For example, ωi represents The originator generates the initial key K1, ω0 & Ω0 are in-
the value of ω after the agent has visited the ith host. itially set to NULL. Each host generates a random nonce ri
and encrypts it using the originator’s public key to in-
clude the offer from ith and the identity of the i+1 (next)
host. The term ri prevents a host si from being able to
3 SECURITY REQUIREMENTS modify the offers of hosts that follow it, since it cannot
This paper is aimed to provide a technical basis for build- identify the chaining value that must be inserted into the
ing trustworthy agents that perform their missions with encapsulated offer of the hosts that follow it.
confidence even though they sometimes execute on un-
trusted hosts. Several key requirements must be satisfied 4.1 Key Generation
for agent systems to realize their potential:
The initial random key is set by the originator. The subse-
High Mobility: Agents must be free to migrate to, and ex- quent keys are generated by the agent after visiting the
ecute on, a wide variety of hosts that are unknown to the host. The value ri is an input to the computation of the
users who launched the agents. Without such mobility, next secret key ki+1.
agents will be unable to perform the searching and com-
mercial operations often envisioned for agent technology. Ki+1 = h(ki, ri, oi, Si+1)

Detached Operation: Agents must operate autonomously, As the key changes for a host on each visit, it would not
without the need for constant communication with users, be possible for the malicious host to change the offer
and, preferably, without constant communication with submitted by the host. However, this also comes with the
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 9, SEPTEMBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 104

limitation that a host cannot update the offers it has sub- (ii) Since the offer itself is used in computing the
mitted as the offer itself is used in computing the key. key for the next host, offers may not be
changed, and a new key must be generated
4.2 Encryption and Decryption of Data each time when the agent re-visits a host.
(iii) A limited degree of insertion resilience is en-
Each host generates the offer oi, and the first offer is en- sured by this protocol. A malicious server
crypted using the random key generated by the Origina- cannot insert spurious offers into the chain of
tor. All the subsequent offers are encrypted by the key hosts visited prior to it. However, it is possi-
generated by the previous host. As the Agent reaches the ble for a malicious server to insert data in the
originator, the originator decrypts the first offer using the chain from this point onward, since the tech-
random key it generated. This would also give the key the nique explicitly allows a host to do so. In a
next offer is encapsulated with. All the subsequent keys chain of encapsulated offers O1, … Om, it is
are generated by each of the offers submitted by the host. possible to detect any truncation at k < m,
Setup on Source System: (Originator) assuming that m is not malicious. However,
S0 -> S1: a malicious host can truncate all the offers
ω0 = Ø; Ω0 = Ø following its own and can insert fake offers.
K1 = random initial key

Visit on a hostSi :
5 PROPOSED KEY EXCHANGE AND AGENT
Encapsulated Offer INTEGRITY TECHNIQUE
Oi = (oi, MACKi(ri, oi, Si+1))
The proposed key exchange and agent integrity technique
Protocol
will overcome the limitations discussed in the previous
Si -> Si+1:
technique. The three important areas of focus of the cur-
Ri = ENC0(ri) ; ωi = ωi-1 U {oi, Ri }
rent technique are
Ωi = Ωi-1 U {Oi};
(i) Authentication & Key Exchange
(ii) Integrity of code and mobile agent
(iii) Protection of bid collected from each host
and partial encapsulation of data
5.1 Authentication & Key Exchange

A new trusted Third Party Key Exchange (TPKE) server is


introduced that serves the purpose of a Certifying Agent
(CA). Public Key Infrastructure is setup by this trusted
third party key exchange server. This third party server
shares the public key of the originator with the hosts so
that the offers are encrypted with the Originator public
key. This architecture resembles a closed set of hosts reg-
istered to a trusted CA.
Figure 1 demonstrates the Agent life cycle and key gener-
ation. This technique allows an agent to take predefined
action when certain condition is met. The approach cen-
ters on constructing agents in such a way that upon re-
ceiving an offer from the host, the offer is encrypted and
the subsequent key is generated. After all the offers are
collected, the agent returns to the originator. The path of
the mobile agent is predefined and the agent counts the
number of hops it made to validate with the initial count
to check no malicious hosts have submitted their offers.

4.3 Limitations

(i) The important limitation of this technique is


the verification by the originator must be
performed sequentially i.e., the decryption
can be performed only in the order the agent
has visited. The originator must have the
prior knowledge of the order of the hosts to
5.2 Integrity of Code & Mobile Agent
be visited.
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 9, SEPTEMBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 105

overcomes all the limitations discussed in the previous


The code and the data of the Mobile Agent is Digitally section. Since we are using TPKE server, malicious hosts
Signed and encrypted with the Originator’s Private Key. will never be able to put in their bids nor read the data or
As the Mobile Agent reaches the host, the Host verifies code. Another problem that a malicious host puts in thou-
the Digital Signature to validate the Mobile Agent so that sands of offers to flood the Agent can be avoided since
the host is not attacked with a malicious agent. The host the number of bids an Agent expect is always equal to the
decrypts the data and updates its offer oi in the Agent. hop count.
Each host generates a random nonce ri and the encrypted
offer is generated by encrypting with the shared key. The 6. IMPLEMENTATION
encryption technique is similar the one discussed earlier.
The proposed system is implemented using Java Agent
Setup on Source System: (Originator) Development Framework (JADE). JADE simplifies the
S0 -> S1: implementation of multi-agent systems through a middle-
ω0 = Ø; Ω0 = Ø ware that complies with the FIPA specifications and
K1 = key received from TPKE server through a set of graphical tools that supports the debug-
ging and deployment phases. The agent platform can be
Visit on a hostSi : distributed across machines (which not even need to
share the same OS) and the configuration can be con-
Encapsulated Offer trolled via a remote GUI. The configuration can be even
Oi = (oi, MACKi(ri, oi, Si+1)) changed at run-time by moving agents from one machine
Protocol to another one, as and when required.
Si -> Si+1:
Ri = ENC0(ri) ; ωi = ωi-1 U {oi, Ri } The hardware used is 2 Intel Centrino Laptops having 2
Ωi = Ωi-1 U {Oi}; GB RAM and Windows XP as the operating system. One
system is set as an originator and the second system is
Since the number of host visited by an Agent is prede- setup to 5 different Host Frames. The bidding system is
fined by the number of hosts exchanging the keys with designed in such a way that each host is visited at least
the TPKE server, hop count can be used to restrict the once. The Key exchange server is setup on the originator
number of hosts an Agent visits. An additional function system and designed to generate a 1024 bit key for each
selfDestruct() is used to automatically destruct an Agent host.
when a tamper is detected. This validation is run by the
agent each time it visits a host and before collecting the The implementation of this platform has been simplified
bid from the host. since the platform already provides a Directory Facilitator
(DF). The originator is setup to register for DF, the agent
5.3 Data Encapsulation must include in its initialization (setup) the following
piece of code (Figure 3). The Host system sending bids is
Each of the partially encrypted offer is collected from the implemented using a Facilitator Agent (FA). When the
host is placed at the end of the Agent. A different key Ki is agent receives a message, it adds the SearchBehaviour,
used by each host so that the offer encrypted by one host that will do the search according to the type defined in
is not readable by the subsequent hosts. This technique the message and then it returns the results to the request-
allows a host to update the bid it offered earlier. Since the er agent.
key a host shares is different from the keys other hosts
share, the host can decrypt the encrypted offer, update it
and encrypt it back using the same key.

Update: (Changing a previous offer oj)


Encapsulated Offer
Oi = (oi, MAXCkj (ri, oi, Si+1))
Protocol
Si - > Si+1:
Ri = ENC0(ri) ; ωi= ωi-1 U {(oi, Ri) }
Ωi = Ωi – 1 U {Oi};

Since the code and data are read by only authorized


Agents and each offer given by the host is digitally
signed, a host can never deny the fact that is has given a
bid.

The mobile agent reaches the originator and the origina- The application system is designed to retrieve the cost of
tor decrypts each bid to read the offers. This technique an Air Ticket phone from each host. The originator signs
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 9, SEPTEMBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 106

his request and floated across the hosts. The hosts are Verlag, 2002.
giving their offer in an encrypted form and this encrypted [11] B.Yee A Sanctuary for mobile agents. In J.Vitek
offer is digitally signed. Finally the host receives the data and C.Jensen, editors, Secure Internet Programming,
in a secure way. The agent gets the key through the Third volume 1603 if lecture notes in Computer Science, p.
Party Key Exchange server and decrypts each bid sent by 261-273. Springer-Verlag,1999.
the host and presented to the user. Each of the bid is en-
crypted by a 1024 bit key and is completely protected.

7 CONCLUSION
This paper has attempted to improve the security aspects
of mobile agents by proposing an approach based on Cer-
tifying Authority (CA). The major issue of distributing
cryptographic keys is solved using a trusted Third Party
Key Exchange server. This application may be extended
in future to develop new system architecture to ensure
the security at the system level itself.

8 REFERENCES

[1] Jade, java agent development framework.


http://jade.cselt.it, 2004.
[2] William M. Farmer, Joshua D. Guttman, and Vipin
Swarup. Security for mobile agents: Authentication and
state appraisal. In Proceedings of the Fourth European
Symposium on Research in Computer Security, pages
118–130, Rome, Italy, 1996.
[3] Erich Gamma, Richard Helm, Ralph Johnson, and John
Vlissides. Design Patterns: Elements od Reusable Object-
Oriented Software. Addison-Wesley Professional Compu-
ting Series. Addison-Wesley Publishing Company, New
York, NY, 1995.
[4] F. Hohl. A Model of Attacks of Malicious Hosts
Against Mobile Agents. In Proceedings of the ECOOP
Workshop on Distributed Object Security and 4th Work-
shop on Mobile Object Systems: Secure Internet Mobile
Computations, pages 105–120, INRIA, France, 1998.
[5] V Sreekanth, Prof S.Ramchandram, Prof A.Govardhan
A Novel Approach for Security and Integrity of Mobile
Agents. ICCBN 2008, IISc, Bangalore
[6] Neeran M. Karnik and Anand R. Tripathi. Security in
the Ajanta mobile agent system. Software Practice and
Experience, 31(4):301–329, 2001.
[7] Chess David M. Security issues in mobile code sys-
tems. In Mobile Agents and Security, volume 1419, pages
1–14.
Springer Verlag, 1998.
[8] J. Mir and J. Borrell. Protecting mobile agent itinera-
ries. In Mobile Agents for Telecommunication Applica-
tions (MATA), volume 2881 of Lecture Notes in Comput-
er Science, pages 275–285. Springer Verlag, October 2003.
[9] S. Robles, J. Mir, and J. Borrell. Marism-a: An architec-
ture for mobile agents with recursive itinerary and secure
migration. In 2nd. IW on Security of Mobile Multiagent
Systems, Bologna, July 2002.
[10] V. Roth. Empowering mobile software agents. In
Proc. 6th IEEE Mobile Agents Conference, volume 2535 of
Lecture Notes in Computer Science, pages 47–63. Spinger

You might also like