a security based model for mobile agent software systems

42
A Security Based Model for Mobile Agent Software Systems Haiping Xu, Ph.D. Computer and Information Science Department University of Massachusetts Dartmouth http://www.cis.umassd.edu/~hxu

Upload: evangeline-pugh

Post on 02-Jan-2016

33 views

Category:

Documents


2 download

DESCRIPTION

A Security Based Model for Mobile Agent Software Systems. Haiping Xu, Ph.D. Computer and Information Science Department University of Massachusetts Dartmouth http://www.cis.umassd.edu/~hxu. Outline. Part 1: Background and Motivations Part 2: Agent-Oriented G-Net Model - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Security Based Model for Mobile Agent Software Systems

A Security Based Model for

Mobile Agent Software Systems

Haiping Xu, Ph.D.Computer and Information Science Department

University of Massachusetts Dartmouth

http://www.cis.umassd.edu/~hxu

Page 2: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 2

Outline

Part 1: Background and Motivations

Part 2: Agent-Oriented G-Net Model

Part 3: Design of Intelligent Mobile Agents

Part 4: Design of Facilitator Agents

Part 5: A Case Study: Agent Migration

Part 6: Conclusions and Future Work.

Page 3: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 3

Part 1: Background and Motivations

The development of software systems starts with two main activities:

Software requirements analysisSoftware design

Software requirements analysis: to reduce potential errors caused by incomplete and ambiguous requirementsSoftware design: to depict the overall structure of a system by decomposing the system into its logical components.

Page 4: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 4

Formal Methods in Software Engineering

The purpose of software requirements analysis can be achieved in two ways:

Write a specification in natural languagesChoose a formal language, e.g., Petri nets

Ideally, formal methods can be applied in each phase of the software development life cycle, e.g., the design phaseHowever, to create a formal model in the design phase and to verify its correctness is rare.

Page 5: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 5

Introduction to Petri Net“Three-in-one” capability of Petri net models [Murata 1989]

Graphical representationMathematical descriptionSimulation tool

Definition:

A Petri net is a 4-tuple, PN = (P, T, F, M0) where

P = {P1, P2, …, Pm} is a finite set of places; T = {t1, t2, …, tn} is a finite set of transitions; F (P x T) (T x P) is a set of arcs (flow relation);

M0: P --> {0, 1, 2, 3, …} is the initial marking.

Page 6: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 6

An Example

P4

P2

P5t1

t5

t3

t4

t2P1

P3

Page 7: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 7

G-Net: A High Level Petri Net

Defined to support modeling of systems as a set of independent and loosely-coupled modules [Deng et al. 1993]

Provides support for incremental design and successive modificationIs not fully object-oriented due to a lack of support for inheritance.

Page 8: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 8

An Example GSP(Buyer)

ISP(Seller, sellGoods())

buyGoods() askPrice()

t1

t2

ISP(Seller, returnPrice())

t3

t4

returnPrice()

calculate_

price sell_

goods

sellGoods()

GSP(Seller)

t8

t7

t6

t5

Page 9: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 9

Introduction to Agents

The term “agent” comes from the Greek word “agein”, which means to drive or to leadA software agent is a program that acts on behalf of a (human) userA software agent is typically situated in some environment, and that is capable of autonomous action.

Page 10: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 10

Research Directions

Multi-agent systems (MAS)Agents act as “active” objects (intelligence)

Collaborative or competitive

Generally use distributed but static (non-mobile) agents

Mobile agents (MA)Model agent mobility and agent coordination

Generally assume very limited or even no intelligence.

Page 11: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 11

Evolution of the Mobile Agent Paradigm

results (data)RPC Server Client

parameters (data)

4. agent migration

3. agent migration1. agent dispatchagent (code + data + state)

Client Server-3

2. agent migration

Agent Migration Server-1 Server-2

Clientprocedure (code + data)

results (data)REV Server

Clientprocedure (code)

COD Server

data mobilitydata mobility

code mobilitycode mobility

agent mobilityagent mobility

(remote procedure call)

(remote evaluation)

(code on demand)

Page 12: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 12

Why Mobile Agent ?

Asynchronous TasksAsynchronous processing of requests

Mobile device can be disconnected and reconnected

Reduction of Communication CostsThe number of interactions

The amount of data communicated over the network.

Page 13: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 13

Academic Research WorkFormal models for agent mobility

Distributed join-calculus: an extension of -calculus that introduce the explicit notions of named localities and distributed failure [Fournet et al., 1996]Mobile UNITY: a programming notation that captures the notion of mobility and transient interaction among mobile nodes [Roman et al., 1997]MobiS: an extended version of PoliS, which is a specification language based multiple tuple spaces [Mascolo, 1999]LIME: a middleware based on tuple spaces [Murphy et al., 2001]

Very few attempts to formally model agent security for mobile agents

The use of encrypted functions for mobile agent security, which protects mobile agents from malicious hosts [Lee and Harrison, 2004]Mobile agent security through multi-agent cryptographic protocols [Tate and Xu, 2003].

Page 14: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 14

ChallengesSecurity issues for mobile agent systems

Inter-agent securityAgent-host securityInter-host security

Most of the existing work concentrates on solving one of the above problemsIn contrast, our approach provides a uniform framework to deal with all the above security issues.

Page 15: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 15

Part 2: Agent-Oriented G-Net Model

Software agent systems: one of the most important topics in distributed and autonomous decentralized systemsKey features: autonomous, reactive, proactive and internally-motivated agentsHowever, the G-net model is not sufficient for agent modeling because:

Does not support a common communication language and common protocols among agentsDoes not directly support asynchronous message passingDoes not support modeling agent’s mental state, such as goals, plans and knowledge.

Page 16: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 16

An Agent-Based G-Net Model

GSP(G)

message_

processing

incoming message

Goal

outgoing message

action_1 action_m

Knowledge-base

Planner

MSP(self) MSP(self) MSP(G’.Aid) MSP(G’.Aid)

action_1 action_n

message_ processing

message_

processing message_

processing

Return Return

utility method utility_1 utility_p

utility_1 utility_p

Plan Environment

Page 17: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 17

A Template of Planner Module

GSP(G) Goal/Plan/KB Environment

ignore

start_a_ conversation

continue

external internal

update

to place “goal”

to place “knowledge base”

from transition “update”

update_ goalplan/kb

next_

action

dispatch_

utilities

dispatch_ outgoing_ message

dispatch_

incoming_ message

private_utility

incoming messages

outgoing messages utility methods

Page 18: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 18

Formal Definitions of Agent-Based G-Net Model

Definition 3.1 Agent-Based G-NetAgent-Based G-NetAn agent-based G-net is a 7-tuple AG = (GSP, GL, PL, KB, EN, PN, IS), where GSP is a Generic Switch Place providing an abstract for the agent-based G-net, GL is a Goal module, PL is a Plan module, KB is a Knowledge-base module, EN is an Environment module, PN is a Planner module,and IS is an internal structure of AG.

Definition 3.2 Planner ModulePlanner ModuleA Planner module of an agent-based G-net AG is a colored sub-net defined as a 7-tuple (IGS, IGO, IPL, IKB, IEN, IIS, DMU), where IGS, IGO,IPL, IKB, IEN and IIS are interfaces with GSP, Goal module, Plan module, Knowledge-base module, Environment module and internal structure of AG, respectively. DMU is a set of decision-making unit, and it contains three abstract transitions: make_decision, sensor and update.

Definition 3.3 Internal Structure (IS)Internal Structure (IS)An internal structure (IS) of an agent-based G-net AG is a triple (IM, OM, PU), where IM/OM is the incoming/outgoing message section, whichdefines a set of message processing units (MPU); and PU is the private utility section, which defines a set of methods.

Definition 3.4 Message Processing Unit (MPU)Message Processing Unit (MPU)A message processing unit (MPU) is a triple (P, T, A), where P is a set of places consisting of three special places: entry place, ISP and MSP. Each MPU has only one entry place and one MSP, but it may contain multiple ISPs. T is a set of transitions, and each transition can be associatedwith a set of guards. A is a set of arcs defined as: ((P-{MSP}) x T) ((T x (P-{entry}).

Definition 3.5 U-MethodU-MethodA U-Method or method is a triple (P, T, A), where P is a set of places with three special places: entry place, ISP and return place. Each method has only one entry place and one return place, but it may contain multiple ISPs. T is a set of transitions, and each transition can be associated with a set of guards. A is a set of arcs defined as: ((P-{return}) x T) ((T x (P-{entry}).

Page 19: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 19

A Framework for Modeling Agent-Oriented Software

To support inheritance, we revise the planner module:Abstract transition: represents abstract units of decision-making or mental-state-updating (with synchronization)

Autonomous unit: makes an agent autonomous and internally-motivated

Asynchronous Superclass switch Place (ASP): used to forward a MPU or a method call (token) to a “superclass” model in the case of inherited communication mechanisms.

Show the useful role of inheritance in agent-oriented software design.

Page 20: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 20

A Template for the Planner Module

GSP(G) Goal Knowledge-base

make_ decision

start_a_ conver_ sation

continue

external internal

to place “Goal” to place “Plan”

t o place “Knowledge base”

from transition “update”

update_ goal/plan/kb

check_ primary

dispatch_ outgoing_ message

dispatch_ incoming_ message

dispatch_ private_ utility

private

Plan

bypass

ASP(super)

ignore

next_ action

sensor

automatic_ update

new_ action

ASP(super)

ASP(super)

update

outgoing messages

utilit y methods

incoming messages

autonomous unit

Environment

syn <e>

<e>

<e>

Page 21: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 21

Part 3: Design of Intelligent Mobile Agents – A Generic Model

Two schemes for agent development:Weak agent approachStrong agent approach

Most of the existing work on mobile agents use weak agent approach (not flexible, security issues …)In contrast, we propose a generic model for intelligent mobile agent.

Page 22: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 22

Agent World Architecture

Host-A

computer network

AVM: A AVM:

B

Host-B

(1) move-request (2) grant (3) notify (4) move

… …

FA: A MA: MA: MA: FA:

B

(1)

(2)

(3)

MA:

Page 23: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 23

Formal Definitions of Agent World ArchitectureDefinition 3.1 Agent World (AW)Agent World (AW)

An agent world (AW) is a 3-tuple (WKHOST, SHOST, HCOM), where WKHOST is a well-known static host, which is responsible for recording the most recent address and public key of all other hosts and for issuing certificates to the FAs in SHOST. SHOST is a set of hosts that can provide the services of an agent virtual machine. HCOM is the communication protocol among hosts in SHOST; an example of such protocols is TCP/IP.

Definition 3.2 Agent Virtual Machine (AVM)Agent Virtual Machine (AVM)

An agent virtual machine (AVM) is a 5-tuple (IFA, SIMA, HOSTIP, ID), where IFA is a facilitator for AVM, which is responsible for recording information of mobile agents running on that AVM, and also for providing services for mobile agents running on the AVM. SMA is a set of mobile agents. HOSTIP is the current IP address of the host that is supporting this AVM, and ID is a unique identifier for that AVM.

Definition 3.3 Static Host (SH) and Mobile Host (MH)Static Host (SH) and Mobile Host (MH)

A host is a 4-tuple (SAVM, ACOM, HOMEIP, CURIP), where SAVM is a set of agent virtual machines (AVM). ACOM is the communication protocol among AVMs in SAVM, and examples of such protocols are IPC and TCP/IP. HOMEIP is the original IP address of the host, and CURIP is the current IP address of the host. If at any time, CURIP = HOMEIP, we call the host a static host (SH); otherwise, we call it a mobile host (MH).

Definition 3.4 Static Agent (SA) and Mobile Agent (MA)Static Agent (SA) and Mobile Agent (MA)

An agent A is a 3-tuple (HOMEIP, CURIP, AO), where HOMEIP is the IP address of the host on which agent A is created. CURIP is the IP address of the host supporting agent A. AO is the agent object with the general structure as we described in Section 2. If at any time, CURIP = HOMEIP, we refer to agent A as a static agent (SA); otherwise, we refer to agent A as a mobile agent (MA).

Page 24: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 24

Security ConsiderationIf a mobile agent is allowed to communicate with a remote facilitator agent or any other mobile agents directly

Both mobile agents and facilitator agents are responsible for security checking all other facilitator agents and mobile agents

Use the facilitator agents as a middleware for agent communications and agent migration

Communications between local mobile agentsCommunications between a local mobile agent and a remote facilitator agent

Security checking become more efficient and reliableMobile agents are only responsible for security checking its local facilitator agentFacilitator agents are only responsible for security checking its local mobile agents and any remote facilitator agents.

Page 25: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 25

Agent Interaction Protocol for Agent Migration

Local FA

x

MA Remote FA

move-request

x

move-refuse

msg-forward (move-request)

msg-forward (move-refuse)

move-grantmsg-forward (move-grant)

cert-invalid

moveregister

Page 26: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 26

Intelligent Mobile Agent (IMA) GSP(IMA)

incoming message

Goal

outgoing message

-cert-invalid move-refuse

Knowledge-base

Planner

MSP(Self)

move-grant

return return

utility method

utility-n

MSP(G’.Aid) MSP(G’Aid)

Plan Environment

action action action

MSP(Self)MSP(Self)

move-request move utility-1

action action action action

Page 27: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 27

Part 4: The Facilitator Agent Model

GSP(FA)

move-inform

MSP(G’.Aid)

return

utility methods

utility_1 utility_1

outgoing messages

MSP(G’.Aid)MSP(G’.Aid)MSP(G’.Aid) MSP(G’.Aid)MSP(G’.Aid) return

move-grant move-refuse msg-forward registercert-invalid

Planner

AgentGoal KnowledgePlan

Page 28: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 28

Cryptographic Mechanisms

Public-key cryptograph is one of the most widely used encryption mechanism on the Internet

Involves a pair of keys — a public key and a private key

Page 29: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 29

Cryptographic Mechanisms (cont’d)

Use digital signature to authenticate the message sender

Use a one-way hash (also called a message digest)The value of the hash is unique for the hashed data

The content of the hashed data cannot be deduced from the hash.

Page 30: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 30

Cryptographic Mechanisms (cont’d)

A certificate is an electronic document used to identify an entity and to associate that identity with a public key

A certificate also includes the name of certificate holder, an expiration date, the issuer’s name, a serial number etc.

Most importantly, a certificate always includes the digital signature of the issuer.

Page 31: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 31

Certificate/Passport/Visa Approach

User assigns a certificate to a mobile agent when it is created

Contains info such as issuer’s name, public key etc.Is recognizable by the local facilitator agentIs not recognizable by a remote facilitator agent

Local facilitator agent assigns a passport to the mobile agent to replace the initial certificate A mobile agent can use the passport to apply for a visa from a foreign facilitator agent.

Page 32: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 32

Structure of Certificate, Passport and Visa StampStruct Certificate {

int serial_number; // the serial number of the certificate String issuer_name; // the issuer’s nameString name; // the name of holderPrivilege privilege; // the privilege assigned by the issuerString public key; // the public key of the holderTime valid_time; // the valid time for the certificateSignature signature; // the encrypted value of the above items

// encoded by the issuer’s private key}

Struct Passport {Certificate passport; // issued by the local facilitator agentVisapage visapages; // visa pages to hold visa stamps

}

Struct Visapage {Certificate visaStamp; // the same structure as a certificateVisapage nextVisapage; // visa is defined as linked list

}

Page 33: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 33

Encrypting Messages

Each message MSG is first encrypted by the sender’s private key: (MSG)Ks-1

Then combined with the sending agent’s certificate/passport: ((MSG)Ks-1, certificate)

Finally encrypted by the receiver’s public key: ((MSG)Ks-1, certificate)Kr.

Page 34: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 34

Structure of a MessageStruct Message {

AgentID sa; // source agentAgentID da; // destination agentHead mh; // message headString mb; // message bodyFileNode fileRef; // binary attachments

}

enum Head {RMI, GOTO, REGISTER, METHOD, LOCAL};

Struct FileNode { File file;FileNode nextFile;

}

Page 35: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 35

The Planner Module of Facilitator Agent(initial design)

outgoing messages

Mobile agents

[MH=GOTO]

Knowledge

invalid

[MH=RMI]

valid passport/visa

assign_visa

assign_

passport

sa_in [local]

[MH=REGISTER]

da_is_self da_not_self [MH=RMI]

no_passport

[MH=LOCAL]

utility methods

sa_not_in [remote]

check_ct

GSP(FA)

valid

update_passport

<sa, da, REGISTER, alpha>

reply

goto_grant syn

[MH=METHOD]

<(sa, da, mh, mb), ct>

dispatch_

local_message

dispatch_

remote_message

<sa, da, RMI, (goto_request, passport)>

dispatch_

outgoing_message

deny_visa

register

Page 36: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 36

Part 5: A Case Study: Agent Migration

Knowledge

outgoing messages

Mobile agentsGSP(FA)

syn

outgoing messages

Mobile agentsGSP(FA)

syn

Knowledge

t1

t2

t3 t4

t5 t6

t7 t8t9 t10

t11t12t13

t14

t14 t15t16

t17

t18 t19

t20

t21

t23

t24

t25

t26

t27

t28 t29

t30 t31

t32 t33 t34 t35

t36 t37t38

t39

t40 t41t42

t43

t44t45

t46

t47

t48

local local

facilitatorfacilitator

agentagent

remoteremote

facilitatorfacilitator

agentagent

Page 37: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 37

Redesign of the Planner Module

outgoing messages

Mobile agents

[MH=GOTO]

Knowledge

invalid

[MH=RMI]

valid passport/visa

assign_visa

assign_

passport

sa_in [local]

[MH=REGISTER]

da_is_self da_not_self [MH=RMI]

no_passport

[MH=LOCAL]

utility methods

sa_not_in [remote]

check_ct

GSP(FA)

valid

update_passport

<sa, da, REGISTER, alpha>

reply

goto_grant syn

[MH=METHOD]

<(sa, da, mh, mb), ct>

dispatch_

local_message

dispatch_

remote_message

<sa, da, RMI, (goto_request, passport)>

dispatch_

outgoing_message

deny_visa

register

Page 38: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 38

Example of Agent MigrationKnowledge

outgoing messages

Mobile agentsGSP(FA)

syn

outgoing messages

Mobile agentsGSP(FA)

syn

Knowledge

t1

t2

t3 t4

t5 t6

t7 t8t9 t10

t11t12t13

t14

t14 t15t16

t17

t18 t19

t21

t23

t24

t25

t26

t27

t28 t29

t30 t31

t32 t33 t34 t35

t36 t37t38

t39

t40 t41t42

t43

t44t45

t47

t48

Local facilitator agent

Remote facilitator agent

Page 39: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 39

Advantages of Our Approach

Application-specific mobile agent class can be defined as a subclass of IMA

Security checking for mobile agents is efficient and reliable due to localization

The resulting Petri net model can be used as a foundation for formal Petri net analysis and simulation techniques.

Page 40: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 40

Part 6: Concluding Comments

There is an increasing need to ensure that complex software systems are robust, reliable and fit for purpose (Agent-Oriented SE)

Petri nets provide a formal and visual model with natural expression for concurrency and coordination

Adapt Petri net models to define a security-based model for mobile agent software system.

Page 41: A Security Based Model for Mobile Agent Software Systems

04/9/2004 CIS Dept., UMass Dartmouth 41

Future Work

Study various security issues in mobile agent design, especially the efficiency and reliability of different security protocols

Design and develop a compilation process to automatically build security protocols into our existing agent models

Develop a model-based mobile agent development environment (M-MADE) for rapid agent design and implementation (i.e., synthesis of the work).

Page 42: A Security Based Model for Mobile Agent Software Systems

Thanks for your attention!

The slides for this talk may be downloaded from

http://www.cis.umassd.edu/~hxu