Design and Implementation of TARF A

download Design and Implementation of TARF A

of 15

Transcript of Design and Implementation of TARF A

  • 7/23/2019 Design and Implementation of TARF A

    1/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 1

    Design and Implementation of TARF: A

    Trust-Aware Routing Framework for WSNsGuoxing Zhan, Weisong Shi,Senior Member, IEEE, and Julia Deng

    AbstractThe multi-hop routing in wireless sensor networks (WSNs) offers little protection against identity deception through replaying

    routing information. An adversary can exploit this defect to launch various harmful or even devastating attacks against the routing

    protocols, including sinkhole attacks, wormhole attacks and Sybil attacks. The situation is further aggravated by mobile and harsh

    network conditions. Traditional cryptographic techniques or efforts at developing trust-aware routing protocols do not effectively address

    this severe problem. To secure the WSNs against adversaries misdirecting the multi-hop routing, we have designed and implemented

    TARF, a robust trust-aware routing framework for dynamic WSNs. Without tight time synchronization or known geographic information,

    TARF provides trustworthy and energy-efficient route. Most importantly, TARF proves effective against those harmful attacks developed

    out of identity deception; the resilience of TARF is verified through extensive evaluation with both simulation and empirical experiments

    on large-scale WSNs under various scenarios including mobile and RF-shielding network conditions. Further, we have implemented alow-overhead TARF module in TinyOS; as demonstrated, this implementation can be incorporated into existing routing protocols with

    the least effort. Based on TARF, we also demonstrated a proof-of-concept mobile target detection application that functions well against

    an anti-detection mechanism.

    1 INTRODUCTION

    Wireless sensor networks (WSNs) [2] are ideal can-didates for applications to report detected events ofinterest, such as military surveillance and forest fire

    monitoring. A WSN comprises battery-powered senornodes with extremely limited processing capabilities.With a narrow radio communication range, a sensornode wirelessly sends messages to a base station viaa multi-hop path. However, the multi-hop routing ofWSNs often becomes the target of malicious attacks.An attacker may tamper nodes physically, create trafficcollision with seemingly valid transmission, drop ormisdirect messages in routes, or jam the communicationchannel by creating radio interference [3]. This paperfocuses on the kind of attacks in which adversariesmisdirect network traffic by identity deception throughreplaying routing information. Based on identity decep-

    tion, the adversary is capable of launching harmful andhard-to-detect attacks against routing, such as selectiveforwarding, wormhole attacks, sinkhole attacks and Sybilattacks [4].

    As a harmful and easy-to-implement type of attack, amalicious node simply replays all the outgoing routingpackets from a valid node to forge the latter nodes iden-tity; the malicious node then uses this forged identity toparticipate in the network routing, thus disrupting the

    G. Zhan and W. Shi are with the Department of Computer Science, WayneState University, Detroit, MI, 48202.E-mail: [email protected], [email protected].

    J. Deng is with Intelligent Automation Inc., Rockville, MD 20855.Email: [email protected].

    This work is in part supported by AFRL contract FA8650-10-C-1740 andNSF Career Award CCF-0643521. We also would like to thank the programmanager Mr. John Woods for his great support as well as the anonymousreviewers for their constructive comments and suggestions.

    network traffic. Those routing packets, including theiroriginal headers, are replayed without any modification.Even if this malicious node cannot directly overhear thevalid nodes wireless transmission, it can collude withother malicious nodes to receive those routing packets

    and replay them somewhere far away from the originalvalid node, which is known as a wormhole attack [5].Since a node in a WSN usually relies solely on thepackets received to know about the senders identity,replaying routing packets allows the malicious node toforge the identity of this valid node. After stealing thatvalid identity, this malicious node is able to misdirectthe network traffic. For instance, it may drop packetsreceived, forward packets to another node not supposedto be in the routing path, or even form a transmissionloop through which packets are passed among a fewmalicious nodes infinitely. It is often difficult to know

    whether a node forwards received packets correctly evenwith overhearing techniques [4]. Sinkholeattacks are an-other kind of attacks that can be launched after stealinga valid identity. In a sinkhole attack, a malicious nodemay claim itself to be a base station through replayingall the packets from a real base station [6]. Such a fakebase station could lure more than half the traffic, creatinga black hole. This same technique can be employed toconduct another strong form of attack - Sybil attack [7]:through replaying the routing information of multiplelegitimate nodes, an attacker may present multiple iden-tities to the network. A valid node, if compromised, canalso launch all these attacks.

    The harm of such malicious attacks based on thetechnique of replaying routing information is furtheraggravated by the introduction of mobility into WSNsand the hostile network condition. Though mobility isintroduced into WSNs for efficient data collection and

  • 7/23/2019 Design and Implementation of TARF A

    2/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 2

    various applications [8], [9],[10], [11], it greatly increasesthe chance of interaction between the honest nodesand the attackers. Additionally, a poor network connec-

    tion causes much difficulty in distinguishing betweenan attacker and a honest node with transient failure.Without proper protection, WSNs with existing routingprotocols can be completely devastated under certain cir-cumstances. In an emergent sensing application throughWSNs, saving the network from being devastated be-comes crucial to the success of the application.

    Unfortunately, most existing routing protocols forWSNs either assume the honesty of nodes and focuson energy efficiency [12], or attempt to exclude unau-thorized participation by encrypting data and authen-ticating packets. Examples of these encryption and au-

    thentication schemes for WSNs include TinySec [13],Spins [14], TinyPK [15], and TinyECC [16]. Admittedly, itis important to consider efficient energy use for battery-powered sensor nodes and the robustness of routingunder topological changes as well as common faultsin a wild environment. However, it is also critical toincorporate security as one of the most important goals;meanwhile, even with perfect encryption and authen-tication, by replaying routing information, a maliciousnode can still participate in the network using anothervalid nodes identity. The gossiping-based routing proto-cols offer certain protection against attackers by selectingrandom neighbors to forward packets [17], but at a

    price of considerable overhead in propagation time andenergy use.

    In addition to the cryptographic methods, trust andreputation management has been employed in genericad hoc networks and WSNs to secure routing protocols.Basically, a system of trust and reputation managementassigns each node a trust value according to its pastperformance in routing. Then such trust values are usedto help decide a secure and efficient route. However,the proposed trust and reputation management systemsfor generic ad hoc networks target only relatively pow-erful hardware platforms such as laptops and smart-

    phones [18], [19], [20], [21]. Those systems can not beapplied to WSNs due to the excessive overhead forresource-constrained sensor nodes powered by batteries.As far as WSNs are concerned, secure routing solutionsbased on trust and reputation management rarely ad-dress the identity deception through replaying routinginformation[22],[23]. The countermeasures proposed sofar strongly depends on either tight time synchronizationor known geographic information while their effective-ness against attacks exploiting the replay of routinginformation has not been examined yet [4].

    At this point, to protect WSNs from the harmfulattacks exploiting the replay of routing information, we

    have designed and implemented a robust trust-awarerouting framework, TARF, to secure routing solutions inwireless sensor networks. Based on the unique character-istics of resource-constrained WSNs, the design of TARFcenters on trustworthiness and energy efficiency. Though

    TARF can be developed into a complete and indepen-dent routing protocol, the purpose is to allow existingrouting protocols to incorporate our implementation of

    TARF with the least effort and thus producing a secureand efficient fully-functional protocol. Unlike other se-curity measures, TARF requires neither tight time syn-chronization nor known geographic information. Mostimportantly, TARF proves resilient under various attacksexploiting the replay of routing information, which isnot achieved by previous security protocols. Even understrong attacks such as sinkhole attacks, wormhole attacksas well as Sybil attacks, and hostile mobile networkcondition, TARF demonstrates steady improvement innetwork performance. The effectiveness of TARF is ver-ified through extensive evaluation with simulation and

    empirical experiments on large-scale WSNs. Finally, wehave implemented a ready-to-use TARF module withlow overhead, which as demonstrated can be integratedinto existing routing protocols with ease; the demon-stration of a proof-of-concept mobile target detectionprogram indicates the potential of TARF in WSN appli-cations.

    We start by stating the design considerations of TARFin Section 2. Then we elaborate the design of TARFin Section 3, including the routing procedure as wellas the EnergyWatcher and TrustManager components. InSection 4, we present the simulation results of TARFagainst various attacks through replaying routing in-

    formation in static, mobile and RF-shielding conditions.Section5 further presents the implementation of TARF,empirical evaluation at a large sensor network and aresilient proof-of-concept mobile target detection appli-cation based on TARF. Finally, we discuss the relatedwork in Section6and conclude this paper in Section7.

    2 DESIGN CONSIDERATIONS

    Before elaborating the detailed design of TARF, wewould like to clarify a few design considerations first,including certain assumptions in Section 2.1 and the

    goals in Section2.3.

    2.1 Assumptions

    We target secure routing for data collection tasks, whichare one of the most fundamental functions of WSNs. Ina data collection task, a sensor node sends its sampleddata to a remote base station with the aid of other inter-mediate nodes, as shown in Figure1.Though there couldbe more than one base station, our routing approach isnot affected by the number of base stations; to simplifyour discussion, we assume that there is only one basestation. An adversary may forge the identity of any legal

    node through replaying that nodes outgoing routingpackets and spoofing the acknowledgement packets,even remotely through a wormhole.

    Additionally, to merely simplify the introduction ofTARF, we assume no data aggregation is involved.

  • 7/23/2019 Design and Implementation of TARF A

    3/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 3

    Node

    Base station

    Fig. 1. Multi-hop routing for data collection of a WSN.

    Nonetheless, our approach can still be applied to cluster-based WSNs with static clusters, where data are aggre-gated by clusters before being relayed [24]. Cluster-based

    WSNs allows for the great savings of energy and band-width through aggregating data from children nodes andperforming routing and transmission for children nodes.In a cluster-based WSN, the cluster headers themselvesform a sub-network; after certain data reach a clusterheader, the aggregated data will be routed to a basestation only through such a sub-network consisting ofthe cluster headers. Our framework can then be appliedto this sub-network to achieve secure routing for cluster-based WSNs. TARF may run on cluster headers onlyand the cluster headers communicate with their childrennodes directly since a static cluster has known relation-ship between a cluster header and its children nodes,though any link-level security features may be furtheremployed.

    Finally, we assume a data packet has at least thefollowing fields: the sender id, the sender sequencenumber, the next-hop node id (the receiver in this one-hop transmission), the source id (the node that initiatesthe data), and the sources sequence number. We insistthat the source nodes information should be includedfor the following reasons because that allows the basestation to track whether a data packet is delivered. Itwould cause too much overhead to transmit all the one-hop information to the base station. Also, we assume the

    routing packet is sequenced.

    2.2 Authentication Requirements

    Though a specific application may determine whetherdata encryption is needed, TARF requires that the pack-ets are properly authenticated, especially the broadcastpackets from the base station. The broadcast from thebase station is asymmetrically authenticated so as toguarantee that an adversary is not able to manipulate orforge a broadcast message from the base station at will.Importantly, with authenticated broadcast, even withthe existence of attackers, TARF may use TrustManager

    (Section 3.4) and the received broadcast packets aboutdelivery information (Section 3.2.1) to choose trustwor-thy path by circumventing compromised nodes. Withoutbeing able to physically capturing the base station, it isgenerally very difficult for the adversary to manipulate

    the base station broadcast packets which are asymmet-rically authenticated. The asymmetric authentication ofthose broadcast packets from the base station is crucial to

    any successful secure routing protocol. It can be achievedthrough existing asymmetrically authenticated broadcastschemes that may require loose time synchronization. Asan example, TESLA[14] achieves asymmetric authen-ticated broadcast through a symmetric cryptographicalgorithm and a loose delay schedule to disclose thekeys from a key chain. Other examples of asymmetricauthenticated broadcast schemes requiring either looseor no time synchronization are found in [25], [26].

    Considering the great computation cost incurred by astrong asymmetric authentication scheme and the diffi-culty in key management, a regular packet other than a

    base station broadcast packet may only be moderatelyauthenticated through existing symmetric schemes witha limited set of keys, such as the message authenticationcode provided by TinySec [13]. It is possible that anadversary physically captures a non-base legal node andreveals its key for the symmetric authentication [27].With that key, the adversary can forge the identity ofthat non-base legal node and joins the network legally.However, when the adversary uses its fake identity tofalsely attract a great amount of traffic, after receivingbroadcast packets about delivery information, other le-gal nodes that directly or indirectly forwards packetsthrough it will start to select a more trustworthy path

    through TrustManager (Section3.4).

    2.3 Goals

    TARF mainly guards a WSN against the attacks mis-directing the multi-hop routing, especially those basedon identity theft through replaying the routing informa-tion. This paper does not address the denial-of-service(DoS) [3] attacks, where an attacker intends to damagethe network by exhausting its resource. For instance, wedo not address the DoS attack of congesting the networkby replaying numerous packets or physically jamming

    the network. TARF aims to achieve the following desir-able properties:High Throughput Throughput is defined as the ratio ofthe number of all data packets delivered to the basestation to the number of all sampled data packets. Inour evaluation, throughput at a moment is computedover the period from the beginning time (0) until thatparticular moment. Note that single-hop re-transmissionmay happen, and that duplicate packets are consideredas one packet as far as throughputis concerned. Through-put reflects how efficiently the network is collecting anddelivering data. Here we regard high throughput as oneof our most important goals.

    Energy EfficiencyData transmission accounts for a ma-jor portion of the energy consumption. We evaluate en-ergy efficiency by the average energy cost to successfullydeliver a unit-sized data packet from a source node to thebase station. Note that link-level re-transmission should

  • 7/23/2019 Design and Implementation of TARF A

    4/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 4

    be given enough attention when considering energy costsince each re-transmission causes a noticeable increase inenergy consumption. If every node in a WSN consumes

    approximately the same energy to transmit a unit-sizeddata packet, we can use another metric hop-per-deliveryto evaluate energy efficiency. Under that assumption, theenergy consumption depends on the number of hops,i.e. the number of one-hop transmissions occurring. Toevaluate how efficiently energy is used, we can measurethe average hops that each delivery of a data packettakes, abbreviated as hop-per-delivery.Scalability & Adaptability TARF should work well withWSNs of large magnitude under highly dynamic con-texts. We will evaluate the scalability and adaptability ofTARF through experiments with large-scale WSNs and

    under mobile and hash network conditions.Here we do not include other aspects such as latency,load balance, or fairness. Low latency, balanced networkload, and good fairness requirements can be enforced inspecific routing protocols incorporating TARF.

    3 DESIGN OF TARF

    TARF secures the multi-hop routing in WSNs against in-truders misdirecting the multi-hop routing by evaluatingthe trustworthiness of neighboring nodes. It identifiessuch intruders by their low trustworthiness and routesdata through paths circumventing those intruders to

    achieve satisfactory throughput. TARF is also energy-efficient, highly scalable, and well adaptable. Before in-troducing the detailed design, we first introduce severalnecessary notions here.NeighborFor a node N, a neighbor (neighboring node)of N is a node that is reachable from Nwith one-hopwireless transmission.Trust level For a nodeN, the trust level of a neighbor is adecimal number in[0, 1], representingNs opinion of thatneighbors level of trustworthiness. Specifically, the trustlevel of the neighbor is Ns estimation of the probabilitythat this neighbor correctly delivers data received to thebase station. That trust level is denoted as Tin this paper.

    Energy costFor a node N, the energy cost of a neighboris the average energy cost to successfully deliver a unit-sized data packet with this neighbor as its next-hopnode, from N to the base station. That energy cost isdenoted as E in this paper.

    3.1 Overview

    For a TARF-enabled node Nto route a data packet to thebase station,Nonly needs to decide to which neighbor-ing node it should forward the data packet consideringboth the trustworthiness and the energy efficiency. Oncethe data packet is forwarded to that next-hop node, the

    remaining task to deliver the data to the base station isfully delegated to it, and N is totally unaware of whatrouting decision its next-hop node makes. N maintainsa neighborhood table with trust level values and energycost values for certain known neighbors. It is sometimes

    necessary to delete some neighbors entries to keep thetable size acceptable. The technique of maintaining aneighborhood table of a moderate size is demonstrated

    by Woo, Tong and Culler [28]; TARF may employ thesame technique.

    In TARF, in addition to data packet transmission, thereare two types of routing information that need to be ex-changed: broadcast messages from the base station aboutdata delivery and energy cost report messages fromeach node. Neither message needs acknowledgement. Abroadcast message from the base station is flooded to thewhole network. The freshness of a broadcast messageis checked through its field of source sequence number.The other type of exchanged routing information is theenergy cost report message from each node, which is

    broadcast to only its neighbors once. Any node receivingsuch an energy cost report message will not forward it.For each node Nin a WSN, to maintain such a neigh-

    borhood table with trust level values and energy cost val-ues for certain known neighbors, two components, Ener-gyWatcherand TrustManager, run on the node (Figure2).EnergyWatcher is responsible for recording the energycost for each known neighbor, based on Ns observationof one-hop transmission to reach its neighbors and theenergy cost report from those neighbors. A compromisednode may falsely report an extremely low energy cost tolure its neighbors into selecting this compromised nodeas their next-hop node; however, these TARF-enabled

    neighbors eventually abandon that compromised next-hop node based on its low trustworthiness as trackedbyTrustManager.TrustManageris responsible for trackingtrust level values of neighbors based on network loopdiscovery and broadcast messages from the base stationabout data delivery. Once N is able to decide its next-hop neighbor according to its neighborhood table, itsends out its energy report message: it broadcasts toall its neighbors its energy cost to deliver a packetfrom the node to the base station. The energy cost iscomputed as in Section 3.3 by EnergyWatcher. Such anenergy cost report also serves as the input of its receivers

    EnergyWatcher.

    Neighborhood

    Table

    TrustManager

    Base Station

    Broadcast

    Energy Cost

    Report

    Network Loop

    Discovery

    EnergyWatcher

    One-hop

    Delivery

    NeighborEnergy Cost

    Neighbor Trust

    Level

    Next-hop

    Selection

    Energy Cost

    Report

    Fig. 2. Each node selects a next-hop node based on its

    neighborhood table, and broadcast its energy cost within itsneighborhood. To maintain this neighborhood table, Energy-Watcher and TrustManager on the node keep track of relatedevents (on the left) to record the energy cost and the trust levelvalues of its neighbors.

  • 7/23/2019 Design and Implementation of TARF A

    5/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 5

    3.2 Routing Procedure

    TARF, as with many other routing protocols, runs as aperiodic service. The length of that period determineshow frequently routing information is exchanged andupdated. At the beginning of each period, the basestation broadcasts a message about data delivery duringlast period to the whole network consisting of a fewcontiguous packets (one packet may not hold all theinformation). Each such packet has a field to indicatehow many packets are remaining to complete the broad-cast of the current message. The completion of the basestation broadcast triggers the exchange of energy reportin this new period. Whenever a node receives such abroadcast message from the base station, it knows thatthe most recent period has ended and a new period has

    just started. No tight time synchronization is requiredfor a node to keep track of the beginning or ending of aperiod. During each period, theEnergyWatcheron a nodemonitors energy consumption of one-hop transmissionto its neighbors and processes energy cost reports fromthose neighbors to maintain energy cost entries in itsneighborhood table; its TrustManageralso keeps track ofnetwork loops and processes broadcast messages fromthe base station about data delivery to maintain trustlevel entries in its neighborhood table.

    To maintain the stability of its routing path, a nodemay retain the same next-hop node until the next fresh

    broadcast message from the base station occurs. Mean-while, to reduce traffic, its energy cost report couldbe configured to not occur again until the next freshbroadcast message from the base station. If a node doesnot change its next-hop node selection until the nextbroadcast message from the base station, that guaran-tees all paths to be loop-free, as can be deducted fromthe procedure of next-hop node selection. However, asnoted in our experiments, that would lead to slowimprovement in routing paths. Therefore, we allow anode to change its next-hop selection in a period whenits current next-hop node performs the task of receivingand delivering data poorly.

    Next, we introduce the structure and exchange ofrouting information as well as how nodes make routingdecisions in TARF.

    3.2.1 Structure and Exchange of Routing Information

    A broadcast message from the base station fits into atmost a fixed small number of packets. Such a messageconsists of some pairs of, , as well as several node

    id intervals of those without any delivery record in lastperiod. To reduce overhead to an acceptable amount,our implementation selects only a limited number ofsuch pairs to broadcast (Section 5.1) and proved effec-tive (Section5.3, 5.4). Roughly, the effectiveness can be

    explained as follows: the fact that an attacker attracts agreat deal of traffic from many nodes often gets revealedby at least several of those nodes being deceived with

    a high likelihood. The undelivered sequence interval [a,b] is explained as follows: the base station searches thesource sequence numbers received in last period, identi-fies which source sequence numbers for the source nodewith this id are missing, and chooses certain significantinterval [a, b] of missing source sequence numbers asan undelivered sequence interval. For example, the basestation may have all the source sequence numbers for thesource node 2 as {109, 110, 111, 150, 151}in last period.Then [112, 149] is an undelivered sequence interval;[109, 151] is also recorded as the sequence boundaryof delivered packets. Since the base station is usually

    connected to a powerful platform such as a desktop, aprogram can be developed on that powerful platform toassist in recording all the source sequence numbers andfinding undelivered sequence intervals.

    Accordingly, each node in the network stores a tableof about lastperiod. The data packets with the source node and thesequence numbers falling in this forwarded sequenceinterval [a, b] have already been forwarded by this node.When the node receives a broadcast message about datadelivery, its TrustManager will be able to identify whichdata packets forwarded by this node are not delivered to

    the base station. Considering the overhead to store sucha table, old entries will be deleted once the table is full.

    Once a fresh broadcast message from the base stationis received, a node immediately invalidates all the ex-isting energy cost entries: it is ready to receive a newenergy report from its neighbors and choose its newnext-hop node afterwards. Also, it is going to select anode either after a timeout is reached or after it hasreceived an energy cost report from some highly trustedcandidates with acceptable energy cost. A node imme-diately broadcasts its energy cost to its neighbors onlyafter it has selected a new next-hop node. That energy

    cost is computed by its EnergyWatcher (see Section 3.3).A natural question is which node starts reporting itsenergy cost first. For that, note that when the base stationis sending a broadcast message, a side effect is that itsneighbors receiving that message will also regard thisas an energy report: the base station needs 0 amountof energy to reach itself. As long as the original basestation is faithful, it will be viewed as a trustworthycandidate by TrustManager on the neighbors of the basestation. Therefore, those neighbors will be the first nodesto decide their next-hop node, which is the base station;they will start reporting their energy cost once thatdecision is made.

    3.2.2 Route Selection

    Now, we introduce how TARF decides routes in a WSN.Each nodeNrelies on its neighborhood table to select anoptimal route, considering both energy consumption and

  • 7/23/2019 Design and Implementation of TARF A

    6/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 6

    reliability. TARF makes good efforts in excluding thosenodes that misdirect traffic by exploiting the replay ofrouting information.

    For a node N to select a route for delivering datato the base station, N will select an optimal next-hopnode from its neighbors based on trust level and energycost and forward the data to the chosen next-hop nodeimmediately. The neighbors with trust levels below acertain threshold will be excluded from being consideredas candidates. Among the remaining known neighbors,Nwill select its next-hop node through evaluating eachneighbor b based on a trade-off between TNb and

    ENbTNb

    ,with EN b and TN b being bs energy cost and trust levelvalue in the neighborhood table respectively (see Sec-tion 3.3, 3.4). Basically, EN b reflects the energy cost of

    delivering a packet to the base station fromN

    assumingthat all the nodes in the route are honest; 1TNb

    approx-imately reflects the number of the needed attempts tosend a packet from N to the base station via multiplehops before such an attempt succeeds, considering thetrust level ofb. Thus, ENb

    TNbcombines the trustworthiness

    and energy cost. However, the metric ENbTNb

    suffers fromthe fact that an adversary may falsely reports extremelylow energy cost to attract traffic and thus resulting in alow value of ENb

    TNbeven with a low TN b. Therefore, TARF

    prefers nodes with significantly higher trust values; thispreference of trustworthiness effectively protects the net-work from an adversary who forges the identity of an

    attractive node such as a base station. For deciding thenext-hop node, a specific trade-off between TN band

    ENbTNb

    is demonstrated in Figure5 (see Section5.2).Observe that in an ideal misbehavior-free environ-

    ment, all nodes are absolutely faithful, and each nodewill choose a neighbor through which the routing pathis optimized in terms of energy; thus, an energy-drivenroute is achieved.

    3.3 EnergyWatcher

    Here we describe how a node Ns EnergyWatcher com-

    putes the energy cost EN b for its neighbor b in Nsneighborhood table and how Ndecides its own energycost EN. Before going further, we will clarify somenotations. EN b mentioned is the average energy costof successfully delivering a unit-sized data packet fromN to the base station, with b as Ns next-hop nodebeing responsible for the remaining route. Here, one-hopre-transmission may occur until the acknowledgementis received or the number of re-transmissions reachesa certain threshold. The cost caused by one-hop re-transmissions should be included when computing ENb .SupposeNdecides that A should be its next-hop nodeafter comparing energy cost and trust level. Then Ns

    energy cost is EN =EN A. Denote ENb as the averageenergy cost of successfully delivering a data packet fromN to its neighbor b with one hop. Note that the re-transmission cost needs to be considered. With the abovenotations, it is straightforward to establish the following

    relation:

    ENb = ENb+Eb

    Since each known neighbor b of N is supposed tobroadcast its own energy costEb to N, to compute EN b,Nstill needs to know the value ENb, i.e., the averageenergy cost of successfully delivering a data packet fromN to its neighbor b with one hop. For that, assumingthat the endings (being acknowledged or not) of one-hop transmissions from N to b are independent withthe same probability psucc of being acknowledged, wefirst compute the average number of one-hop sendingsneeded before the acknowledgement is received as fol-lows:

    i=1

    ipsucc(1psucc)i1 =

    1

    psucc

    Denote Eunit as the energy cost for node N to send aunit-sized data packet once regardless of whether it isreceived or not. Then we have

    EN b= Eunit

    psucc+Eb

    The remaining job for computingEN bis to get the proba-bilitypsuccthat a one-hop transmission is acknowledged.Considering the variable wireless connection amongwireless sensor nodes, we do not use the simplisticaveraging method to compute psucc. Instead, after eachtransmission fromN tob,NsEnergyWatcherwill updatepsucc based on whether that transmission is acknowl-edged or not with a weighted averaging technique. Weuse a binary variable Ack to record the result of currenttransmission:1 if an acknowledgement is received; oth-erwise,0. GivenAck and the last probability value of anacknowledged transmission pold succ, an intuitive way isto use a simply weighted average ofAck and pold succ asthe value ofpnew succ. That is what is essentially adoptedin the aging mechanism [29]. However, that method usedagainst sleeper attacks still suffers periodic attacks [30].To solve this problem, we update the psucc value usingtwo different weights as in our previous work [30], a

    relatively big wdegrade (0, 1) and a relatively smallwupgrade (0, 1) as follows:

    pnew succ =

    (1wdegrade)pold succ+wdegradeAck,ifAck= 0.(1wupgrade)pold succ+wupgrade Ack,ifAck= .1

    The two parameters wdegrade and wupgrade allow flexibleapplication requirements. wdegrade and wupgrade repre-sent the extent to which upgraded and degraded per-formance are rewarded and penalized, respectively. Ifany fault and compromise is very likely to be associatedwith a high risk, wdegrade should be assigned a relatively

    high value to penalize fault and compromise relativelyheavily; if a few positive transactions cant constitute ev-idence of good connectivity which requires many morepositive transactions, then wupgrade should be assigneda relatively low value.

  • 7/23/2019 Design and Implementation of TARF A

    7/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 7

    3.4 TrustManager

    A node Ns TrustManager decides the trust level ofeach neighbor based on the following events: discovery

    of network loops, and broadcast from the base stationabout data delivery. For each neighbor b of N, TNbdenotes the trust level of b in Ns neighborhood table.At the beginning, each neighbor is given a neutral trustlevel 0.5. After any of those events occurs, the relevantneighbors trust levels are updated.

    Note that many existing routing protocols have theirown mechanisms to detect routing loops and to reactaccordingly[31], [32], [28]. In that case, when integratingTARF into those protocols with anti-loop mechanisms,TrustManagermay solely depend on the broadcast fromthe base station to decide the trust level; we adopted

    such a policy when implementing TARF later (see Sec-tion 5). If anti-loop mechanisms are both enforced inthe TARF component and the routing protocol that in-tegrates TARF, then the resulting hybrid protocol mayoverly react towards the discovery of loops. Though so-phisticated loop-discovery methods exist in the currentlydeveloped protocols, they often rely on the comparisonof specific routing cost to reject routes likely leading toloops [32]. To minimize the effort to integrate TARF andthe existing protocol and to reduce the overhead, whenan existing routing protocol does not provide any anti-loop mechanism, we adopt the following mechanism todetect routing loops. To detect loops, the TrustManageron N reuses the table of (see Section3.2) in last period. IfNfinds that areceived data packet is already in that record table, notonly will the packet be discarded, but the TrustManageron N also degrades its next-hop nodes trust level. Ifthat next-hop node is b, then Told Nb is the latest trustlevel value ofb. We use a binary variable Loopto recordthe result of loop discovery: 0 if a loop is received; 1otherwise. As in the update of energy cost, the new trustlevel ofb is

    Tnew Nb=

    (1wdegrade)Told Nb+wdegradeLoop,

    ifLoop= 0.(1wupgrade)Told Nb+wupgrade Loop,ifLoop= 1.

    Once a loop has been detected by N for a few timesso that the trust level of the next-hop node is too low,N will change its next-hop selection; thus, that loop isbroken. Though N can not tell which node should beheld responsible for the occurrence of a loop, degradingits next-hop nodes trust level gradually leads to thebreaking of the loop. On the other hand, to detect thetraffic misdirection by nodes exploiting the replay ofrouting information, TrustManager on N compares Ns

    stored table ofrecordedin last period with the broadcast messages from thebase station about data delivery. It computes the ratioof the number of successfully delivered packets which

    are forwarded by this node to the number of thoseforwarded data packets, denoted asDeliveryRatio. ThenNs TrustManager updates its next-hop node bs trust

    level as follows:

    Tnew Nb=

    (1wdegrade)Told Nb+wdegradeDeliveryRatio,ifDeliveryRatio < Told Nb.

    (1wupgrade )Told Nb+wupgradeDeliveryRatio,ifDeliveryRatio >=Told Nb.

    3.5 Analysis on EnergyWatcher and TrustManager

    Now that a node N relies on its EnergyWatcher andTrustManager to select an optimal neighbor as its next-hop node, we would like to clarify a few importantpoints on the design ofEnergyWatcherand TrustManager.

    First, as described in Section3.1, the energy cost reportis the only information that a node is to passively receiveand take as fact. It appears that such acceptance of en-ergy cost report could be a pitfall when an attacker or acompromised node forges false report of its energy cost.Note that the main interest of an attacker is to preventdata delivery rather than to trick a data packet into a lessefficient route, considering the effort it takes to launchan attack. As far as an attack aiming at preventing datadelivery is concerned, TARF well mitigates the effect of

    this pitfall through the operation ofTrustManager. Notethat theTrustManageron one node does not take any rec-ommendation from the TrustManager on another node.If an attacker forges false energy report to form a falseroute, such intention will be defeated by TrustManager:when theTrustManageron one node finds out the manydelivery failures from the broadcast messages of the basestation, it degrades the trust level of its current next-hopnode; when that trust level goes below certain threshold,it causes the node to switch to a more promising next-hop node.

    Second, TrustManager identities the low trustworthi-

    ness of various attackers misdirecting the multi-hoprouting, especially those exploiting the replay of routinginformation. It is noteworthy thatTrustManagerdoes notdistinguish whether an error or an attack occurs to thenext-hop node or other succeeding nodes in the route.It seems unfair that TrustManager downgrades the trustlevel of an honest next-hop node while the attack occurssomewhere after that next-hop node in the route. Con-trary to that belief, TrustManager significantly improvesdata delivery ratio in the existence of attack attempts ofpreventing data delivery. First of all, it is often difficult toidentify an attacker who participates in the network us-ing an id stolen from another legal node. For example,

    it is extremely difficult to detect a few attackers colludingto launch a combined wormhole and sinkhole attack [4].Additionally, despite the certain inevitable unfairnessinvolved, TrustManager encourages a node to chooseanother route when its current route frequently fails to

  • 7/23/2019 Design and Implementation of TARF A

    8/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 8

    deliver data to the base station. Though only those legalneighboring nodes of an attacker might have correctlyidentified the adversary, our evaluation results indicate

    that the strategy of switching to a new route withoutidentifying the attacker actually significantly improvesthe network performance, even with the existence ofwormholeand sinkholeattacks. Fig3gives an example toillustrate this point. In this example, node A, B, C and Dare all honest nodes and not compromised. Node A hasnode B as its current next-hop node while node B has anattacker node as its next-hop node. The attacker dropsevery packet received and thus any data packet passingnode A will not arrive at the base station. After a while,node A discovers that the data packets it forwarded didnot get delivered. The TrustManageron node A starts to

    degrade the trust level of its current next-hop node Balthough node B is absolutely honest. Once that trustlevel becomes too low, node A decides to select node Cas its new next-hop node. In this way node A identifies abetter and successful route (A - C - D - base). In spite ofthe sacrifice of node Bs trust level, the network performsbetter. Further, concerning the stability of routing path,

    A

    B

    Base Station

    DC

    Attacker

    Fig. 3. An example to illustrate howTrustManager works.

    once a valid node identifies a trustworthy honest neigh-bor as its next-hop node, it tends to keep that next-hopselection without considering other seemingly attractivenodes such as a fake base station. That tendency iscaused by both the preference to maintain stable routesand the preference to highly trustable nodes.

    Finally, we would like to stress that TARF is designedto guard a WSN against the attacks misdirecting the

    multi-hop routing, especially those based on identitytheft through replaying the routing information. Othertypes of attacks such as the denial-of-service (DoS) [3]attacks are out of the discussion of this paper. Forinstance, we do not address the attacks of injectinginto the network a number of data packets containingfalse sensing data but authenticated (possibly throughhacking). That type of attacks aim to exhaust the networkresource instead of misdirecting the routing. However, ifthe attacker intends to periodically inject a few routingpackets to cause wrong route, such attacks can still bedefended by TARF through TrustManager.

    4 SIMULATION

    We have developed a reconfigurable emulator of wire-less sensor networks on a two-dimensional plane with

    Matlab to test TARF. We have conducted extensive sim-ulation experiments; however, due to the page limit,interested readers may refer to our technical report [33]

    and the conference version of paper [1] for detailedsimulation settings and experimental results. In our ex-periments, initially, 35 nodes are randomly distributedwithin a 300*300 rectangular area, with unreliable wire-less transmission. All the nodes have the same powerlevel and the same maximal transmission range of 100m.Each node samples 6 times in every period; the timinggap between every two consecutive samplings of thesame node is equivalent. We simulate the sensor networkin 1440 consecutive periods.

    Regarding the network topology, we set up three typesof network topologies. The first type is the static-location

    case under which all nodes stand still. The second typeis a customized group-motion-with-noise case based onReference Point Group Mobility (RPGM) model thatmimics the behavior of a set of nodes moving in oneor more groups [34], [35]. The last type of dynamicnetwork incorporated in the experiments is the additionof scattered RF-shielded areas to the aforementionedgroup-motion-with-noise case.

    The performance of TARF is compared to that of alink connectivity-based routing protocol adapted fromwhat is proposed by Alec Woo, Terence Tong andDavid Culler [28]. We denote the link connectivity-based routing protocol as Link-connectivity. With the

    Link-connectivityprotocol, each node selects its next-hopnode among its neighborhood table according to anlink estimator based on exponentially weighted movingaverage (EWMA). The simulation results show, in thepresence of misbehaviors, thethroughput in TARF is oftenmuch higher than that in Link-connectivity; the hop-per-delivery in the Link-connectivity protocol is generally atleast comparable to that in TARF.

    Under a misbehavior-free environment, the simula-tion results show that TARF and Link-connectivity havecomparable performance when there is no adversary.Both protocols are also evaluated under three common

    types of attacks: (1) a certain node forges the identity ofthe based station by replaying broadcast messages, alsoknown as thesinkholeattack; (2) a set of nodes colludes toform a forwarding loop; and (3) a set of nodes drops re-ceived data packets. These experiments were conductedin the static case, the group-motion-with-noise case, andthe addition of RF-shielded areas to the group-motion-with-noise case separately. Generally, under these com-mon attacks, TARF produces a substantial improvementoverLink-connectivityin terms of data collection and en-ergy efficiency. Further, we have evaluated TARF undermore severe attacks: multiple moving fake bases andmultiple Sybil attackers. As before, the experiments are

    conducted under all the three types of network topology.Under these two types of most severe attacks whichalmost devastates the Link-connectivity protocol, TARFsucceeds in achieving a steady improvement over theLink-connectivity protocol. Finally, we have conducted

  • 7/23/2019 Design and Implementation of TARF A

    9/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 9

    certain experiments to explore the choice of the periodlength and the trust updating scheme. Our experimentsreveal that a shorter period or a faster trust updating

    scheme may not necessarily benefit TARF.

    5 IMPLEMENTATION ANDEMPIRICAL EVALUA-TION

    In order to evaluate TARF in a real-world setting, weimplemented the TrustManager component on TinyOS2.x, which can be integrated into the existing routing pro-tocols for WSNs with the least effort. Originally, we hadimplemented TARF as a self-contained routing proto-col[1] on TinyOS 1.x before this second implementation.However, we decided to re-design the implementation

    considering the following factors. First, the first imple-mentation only supports TinyOS 1.x, which was replacedby TinyOS 2.x; the porting procedure from TinyOS 1.xto TinyOS 2.x tends to frustrate the developers. Second,rather than developing a self-contained routing protocol,the second implementation only provides a TrustMan-agercomponent that can be easily incorporated into theexisting protocols for routing decisions. The detectionof routing loops and the corresponding reaction areexcluded from the implementation ofTrustManagersincemany existing protocols, such as Collection Tree Proto-col [32] and the link connectivity-based protocol [28],

    already provide that feature. As we worked on the firstimplementation, we noted that the existing protocolsprovide many nice features, such as the analysis oflink quality, the loop detection and the routing decisionmainly considering the communication cost. Instead ofproviding those features, our implementation focuseson the trust evaluation based on the base broadcastof the data delivery, and such trust information canbe easily reused by other protocols. Finally, instead ofusing TinySec [13] exclusively for encryption and au-thentication as in the first implementation on TinyOS 1.x,this re-implementation let the developers decide whichencryption or authentication techniques to employ; theencryption and authentication techniques of TARF maybe different than that of the existing protocol.

    5.1 TrustManager Implementation Details

    The TrustManager component in TARF is wrappedinto an independent TinyOS configuration namedTrustManagerC. TrustManagerC uses a dedicatedlogic channel for communication and runs as a periodicservice with a configurable period, thus not interferingwith the application code. Though it is possible to im-plement TARF with a period always synchronized with

    the routing protocols period, that would cause much in-trusion into the source code of the routing protocol. Thecurrent TrustManagerC uses a period of 30 seconds;for specific applications, by modifying a certain headerfile, the period length may be re-configured to reflect the

    sensing frequency, the energy efficiency and trustworthi-ness requirement. TrustManagerCprovides two inter-faces (see Figure4), TrustControland Record, which

    are implemented in other modules. The TrustControlinterface provides the commands to enable and disablethe trust evaluation, while the Record interface providesthe commands for a root, i.e., a base station, to adddelivered message record, for a non-root node to addforwarded message record, and for a node to retrieve thetrust level of any neighboring node. The implementationon a root node differs from that on a non-root node: aroot node stores the information of messages received(delivered) during the current period into a record tableand broadcast delivery failure record; a non-root nodestores the information of forwarded messages during the

    current period also in a record table and compute thetrust of its neighbors based on that and the broadcast in-formation. Noting that much implementation overheadfor a root can always be transferred to a more powerfuldevice connected to the root, it is reasonable to assumethat the root would have great capability of processingand storage.

    configuration TrustManagerC {

    provides {

    interface TrustControl;

    interface Record;

    }

    implementation {

    ...........................................

    }}

    interface Record

    {

    //for a root to add delivered record

    command void addDelivered(am_addr_t src, uint8_t seq);

    //for a non-root node to add forwarded record

    command void addForwarded(am_addr_t src, uint8_t seq, am_addr_t next);

    //return the trust level of a node

    command uint16_t getTrust(am_addr_t id);

    }

    interface TrustControl

    {

    //enable trust evaluation

    command error_t start();

    //disable trust evaluation

    command error_t stop();

    }

    Fig. 4. TrustManagercomponent.

    A root broadcasts two types of delivery failure record:at most three packets of significant undelivered intervalsfor individual origins and at most two packets of the idsof the origins without any record in the current period.For each origin, at most three significant undeliveredintervals are broadcast. For a non-root node, consideringthe processing and memory usage overhead, the recordtable keeps the forwarded message intervals for up to 20source nodes, with up to 5 non-overlapped intervals foreach individual origin. Our later experiments verify thatsuch size limit of the table on a non-root node produces aresilient TARF with moderate overhead. The record tableon a node keeps adding entries for new origins until it

    is full.With our current implementation, a valid trust value is

    an integer between 0 and 100, and any node is assignedan initial trust value of 50. The weigh parameters are:wupgrade = 0.1, wdegrade = 0.3. The trust table of a

  • 7/23/2019 Design and Implementation of TARF A

    10/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 10

    non-root node node keeps the trust level for up to 10neighbors. Considering that an attacker may presentmultiple fake ids, the implementation evicts entries with

    a trust level close to the initial trust of any node. Sucheviction policy is to ensure that the trust table remembersthose neighbors with high trust and low trust; any otherneighbor not in this table is deemed to have the initialtrust value of 50.

    5.2 Incorporation of TARF into Existing Protocols

    To demonstrate how this TARF implementation can beintegrated into the exiting protocols with the least effort,we incorporated TARF into a collection tree routingprotocol (CTP) [32]. The CTP protocol is efficient, robust,and reliable in a network with highly dynamic linktopology. It quantifies link quality estimation in orderto choose a next-hop node. The software platform isTinyOS 2.x. To perform the integration, after properinterface wiring, invoke the TrustControl.startcommand to enable the trust evaluation; call theRecord.addForwarded command for a non-root nodeto add forwarded record once a data packet has beenforwarded; call the Record.addDeliveredcommandfor a root to add delivered record once a data packet hasbeen received by the root. Finally, inside the CTPs taskto update the routing path, call the Record.getTrustcommand to retrieve the trust level of each next-hop

    candidate; an algorithm taking trust into routing consid-eration is executed to decide the new next-hop neighbor(see Figure5).

    Similar to the original CTPs implementation, the im-plementation of this new protocol decides the next-hopneighbor for a node with two steps (see Figure5): Step1 traverses the neighborhood table for an optimal candi-date for the next hop; Step 2 decides whether to switchfrom the current next-hop node to the optimal candidatefound. For Step 1, as in the CTP implementation, anode would not consider those links congested, likelyto cause a loop, or having a poor quality lower than

    a certain threshold. This new implementation prefersthose candidates with higher trust levels; in certaincircumstances, regardless of the link quality, the rulesdeems a neighbor with a much higher trust level tobe a better candidate (see Figure5). The preference ofhighly trustable candidates is based on the followingconsideration: on the one hand, it creates the least chancefor an adversary to misguide other nodes into a wrongrouting path by forging the identity of an attractivenode such as a root; on the other hand, forwarding datapackets to a candidate with a low trust level would resultin many unsuccessful link-level transmission attempts,thus leading to much re-transmission and a potential

    waste of energy. When the network throughputbecomeslow and a node has a list of low-trust neighbors, thenode will exclusively use the trust as the criterion toevaluate those neighbors for routing decisions. As showin Figure5, it uses trust/cost as a criteria only when the

    candidate has a trust level above certain threshold. Thereason is, the sole trust/cost criteria could be exploitedby an adversary replaying the routing information from

    a base station and thus pretending to be an extremelyattractive node. As for Step 2, compared to the CTPimplementation, we add two more circumstances whena node decides to switch to the optimal candidate foundat Step 1: that candidate has a higher trust level, or thecurrent next-hop neighbor has a too low trust level.

    //Step 1. traverse the neighborhood table for an optimal candidate for the next hop

    optimal_candidate = NULL

    //the cost of routing via the optimal candidate provided by the existing protocol, initially infinity

    optimal_cost = MAX_COST

    //the trust level of the optimal candidate, initially 0

    optimal_trust = MIN_TRUSTforeach candidate in the neighborhood table

    iflink is congested, or may cause a loop, or does not pass quality threshold

    continuebetter = false

    ifcandidate.trust >= optimal_trust && candidate.cost < optimal_cost

    better = true//prefer trustworthy candidates

    ifcandidate.trust >= TRUST_THRESHOLD && optimal_trust < TRUST_THRESHOLD

    better = trueifcandidate.trust >= ESSENTIAL_DIFFERENCE_THRESHOLD + optimal_trust

    better = true

    //effective when all nodes have low trust due to network change or poor connectivity

    ifcandidate.trust >= 3 * optimal_trust / 2better = true

    //add restriction of trust level requirement

    ifcandidate.trust >= TRUST_THRESHOLD && candidate.trust / candidate.cost >optimal_trust / optimal_cost

    better = true

    ifbetter == trueoptimal_candidate = candidate

    optimal_cost = candidate.cost

    optimal_trust = candidate.trust

    //Step 2. decide whether to switch from the current next-hop node to the optimal candidate found:ifoptimal_trust >= currentNextHop.trust \

    || currentNextHop.trust

  • 7/23/2019 Design and Implementation of TARF A

    11/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 11

    5.3 Empirical Evaluation on Motelab

    We evaluated the performance of TARF against a com-bined sinkhole and wormhole attack on Motelab [36] at

    Harvard University. 184 TMote Sky sensor motes weredeployed across many rooms at three floors in the de-partment building (see Figure6), with two to four motesin most rooms. Around 97 nodes functioned properlywhile the rest were either removed or disabled. Eachmote has a 2.4GHz Chipcon CC2420 radio with anindoor range of approximately 100 meters. In Figure 6,the thin green lines indicate the direct (one-hop) wirelessconnection between motes. Certain wireless connectionalso exists between nodes from different floors.

    Fig. 6. Connectivity map of Motelab (not including the inter-floor connectivity), adapted from Motelab[Motelab].

    We developed a simple data collection application inTinyOS 2.x that sends a data packet every five seconds toa base station node (root) via multi-hop. This applicationwas executed on 91 functioning non-root nodes on Mote-lab. For comparison, we used CTP and the TARF-enabledCTP implementation as the routing protocols for the datacollection program separately. The TARF-enabled CTPhas a TARF period of 30 seconds. We conducted an attack

    with five fake base stations that formed a wormhole. Asin Figure 6, whenever the base station sent out anypacket, three fake base stations which overheard thatpacket replayed the complete packet without changingany content including the node id. Other fake basestations overhearing that replayed packet would alsoreplay the same packet. Each fake base station essentiallylaunched asinkholeattack. Note that there is a distinctionbetween such malicious replay and the forwarding whena well-behaved node receives a broadcast from the basestation. When a well-behaved node forwards a broadcastpacket from the base station, it will include its ownid in the packet so that its receivers will not recognize

    the forwarder as a base station. We conducted the firstexperiment by uploading the program with the CTPprotocol onto 91 motes (not including those 5 selectedmotes as fake bases in later experiments), and no attackwas involved here. Then, in another experiment, in

    addition to programming those 91 motes with CTP, wealso programmed the five fake base stations so that theystole the id the base station through replaying. In the

    last experiment, we programmed those 91 motes withthe TARF-enabled CTP, and programmed the five fakebase stations as in the second experiment. Each of ourprograms run for 30 minutes.

    As illustrated in Figure7(a), the existence of the fivewormhole attackers greatly degraded the performanceof CTP: the number of the delivered data packets inthe case of CTP with the five-node wormhole is no morethan 14% that in the case of CTP without adversaries.The TARF-enabled CTP succeeded in bringing animmense improvement over CTP in the presence ofthe five-node wormhole, almost doubling the throughput.That improvement did not show any sign of slowingdown as time elapsed. The number of nodes from eachfloor that delivered at least one data packet in eachsix-minute sub-period is plotted in Figure7(a), 7(b) and7(c) separately. On each floor, without any adversary,at least 24 CTP nodes were able to find a successfulroute in each six minute. However, with the five fakebase stations in thewormhole, the number of CTP nodesthat could find a successful route goes down to 9 forthe first floor; it decreases to no more than 4 for thesecond floor; as the worst impact, none of the nodes onthe third floor ever found a successful route. A furtherlook at the data showed that all the nine nodes from

    the first floor with successful delivery record were allclose to the real base station. The CTP nodes relativelyfar away from the base station, such as those on thesecond and the third floor, had little luck in makinggood routing decisions. When TARF was enabled oneach node, most nodes made correct routing decisionscircumventing the attackers. That improvement canbe verified by the fact that the number of the TARF-enabled nodes with successful delivery record underthe threat of the wormhole is close to that of CTP nodeswith no attackers, as shown in Figure7(a), 7(b) and 7(c).

    5.4 Application: Mobile Target Detection in the Pres-ence of an Anti-Detection Mechanism

    To demonstrate how TARF can be applied in networkedsensing systems, we developed a proof-of-concept re-silient application of target detection. This applicationrelies on a deployed wireless sensor network to detecta target that could move, and to deliver the detectionevents to a base station via multiple hops with the TARF-enabled CTP protocol. For simplification, the target is aLEGO MINDSTORM NXT 2.0 vehicle robot equippedwith a TelosB mote that sends out an AM (ActiveMessage) packet every three seconds. A sensor node

    receiving such a packet from the target issues a detectionreport, which will be sent to the base station with theaforementioned TARF-enabled CTP protocol.

    The experiment is set up within a clear floor space of90 by 40 inches with 15 TelosB motes (see Figure8(a)). To

  • 7/23/2019 Design and Implementation of TARF A

    12/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 12

    0 5 10 15 20 25 30

    0.5

    1

    1.5

    2

    2.5

    3x 10

    4

    Time in minutes

    Numberofdelivered

    packets

    CTP without adversaries

    CTP with 5-node wormhole

    TARF-enabled CTP with 5-node wormhole

    (a) All three floors.

    25 2526

    25 25

    9 9 9 9 9

    2624

    21 20

    24

    [0mi n, 6min ] [6min ,

    12min]

    [12min,

    18min]

    [18min,

    24min]

    [24min,

    30min]

    Time

    Numberofnodes

    with

    deliveryrecord

    CTP without adversaries

    CTP with 5-node wormhole

    TARF-enabled CTP with 5-node wormhole

    (b) First floor.

    36 36 36 37 36

    2 24 3 2

    3634

    3033 32

    [0mi n, 6min ] [6min ,

    12min]

    [12min,

    18min]

    [18min,

    24min]

    [24min,

    30min]

    Time

    Numberofnodeswith

    deliveryreco

    rd

    CTP without adversaries

    CTP with 5-node wormhole

    TARF-enabled CTP with 5-node wormhole

    (c) Second floor.

    25 25 25 2524

    2524

    2322

    23

    0000 0

    [0mi n, 6min ] [6min ,

    12min]

    [12min,

    18min]

    [18min,

    24min]

    [24min,

    30min]

    Time

    Numberofnodeswith

    deliveryrecord

    CTP without adversaries

    CTP with 5-node wormhole

    TARF-enabled CTP with 5-node wormhole

    (d) Third floor.

    Fig. 7. Empirical comparison of CTP and TARF-enabled CTPon Motelab: (a) number of all delivered data packets since thebeginning; number of nodes on (b) the first floor, (c) the second

    floor and (d) the third floor that delivered at least one data packetin sub-periods.

    make the multi-hop delivery necessary, the transmission

    power of all the Telosb motes except two fake basestations in the network is reduced through both softwarereduction and attenuator devices to within 30 inches. The

    target uses an anti-detection mechanism utilizing a fakebase station close to the real base station, and anotherremote base station close to the target and mounted onanother LEGO vehicle robot. The two fake base stations,with a transmission range of at least 100 feet, colludeto form a wormhole: the fake base station close to thebase station replays all the packets from the base stationimmediately; the remote fake base station, after receivingthose packets, immediately replays it again. This anti-detection mechanism tricks some network nodes intosending their event reports into these fake base stationsinstead of the real base station. Though the fake base

    station close to the real base station is capable of cheatingthe whole network alone by itself with its powerful radiofor a certain amount of time, it can be easily recognizedby remote nodes as a poor next-hop candidate soon bymost routing protocols based on link quality: that fakebase station does not acknowledge the packets sentto it from remote nodes with a weak radio via a singlehop since it can not really receive them. Thus, the anti-detection mechanism needs to create such a wormholetoreplay the packets from the base station remotely.

    (a) A snapshot of the network.

    (b) A closer look.

    Fig. 8. Deployment of a TARF-enabled wireless sensor network

    to detect a moving target under the umbrella of two fake basestations in awormhole.

    The target node 14 and the fake base station 13 close toit move across the network along two parallel tracks of22 inches back and forth (see Figure 8(b)); they travel

  • 7/23/2019 Design and Implementation of TARF A

    13/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 13

    on each forward or backward path of 22 inches inaround 10 minutes. The experiment lasts 30 minutes. Forcomparison, three nodes 9, 10 and 11 programmed with

    the CTP protocol are paired with another three nodes 6, 7and 8 programmed with the TARF-enabled CTP (see Fig-ure8(b)); each pair of nodes are physically placed closeenough. All the other nodes, except for the fake basestations and the target node, are programmed with theTARF-enabled CTP. To fairly compare the performancebetween CTP and the TARF-enabled CTP, we now focuson the delivered detection reports originating from thesethree pairs of nodes: pair (9, 6), (10, 7) and (11, 8). For thetimestamp of each detection report from these six nodes,we plot a corresponding symbol: a purple circle for thenodes with the TARF-enabled CTP; a black cross for the

    CTP nodes. The resulting detection report is visualizedin Figure 9(a). Roughly, the TARF nodes report theexistence of the target seven times as often as the CTPnodes do. More specifically, as shown in Figure 9(b), inthe pair (9, 6), no report from CTP node 9 is deliveredwhile 46 reports from TARF node 6 is delivered; in thepair (10, 7), no report from CTP node 10 is deliveredwhile 80 reports from TARF node 7 is delivered; in thepair (11, 8), 40 reports from CTP node 11 is deliveredwhile 167 reports from TARF node 8 is delivered. Takinginto account the spatial proximity between each pairof nodes, the TARF-enabled CTP achieves an enormousimprovement in target detection over the original CTP.

    0 5 10 15 20 25 30Time in minutes

    Deliveredreportofdetection

    Detection reported by TARF nodes

    Detection reported by CTP nodes

    (a) Detection report.

    4046

    80

    167

    0 0

    From node pair(9, 6) From node pair(10, 7) From node pair(11, 8)

    Numberofreporteddetections

    From CTP nodeFrom TARF-enabled node

    (b) Number of reported detections.

    Fig. 9. Comparison of CTP and the TARF-enabled CTP indetecting the moving target.

    The demonstration of our TARF-based target detectionapplication implies the significance of adopting a securerouting protocol in certain critical applications. The ex-

    perimental results indicate that TARF greatly enhancesthe security of applications involving multi-hop datadelivery.

    6 RELATED WORK

    We discuss more related work here in addition to theintroduction in Section 1.It is generally hard to protectWSNs from wormhole attacks, sinkhole attacks and Sybilattacks based on identity deception. The countermea-sures often requires either tight time synchronizationor known geographic information [4]. FBSR[37], a s afeedback-based secure routing protocol for WSNs , uses

    a statistics-based detection on a base station to dis-cover potentially compromised nodes. But the claim thatFBSR is resilient against wormhole and Sybil attacks isnever evaluated or examined; the Keyed-OWHC-basedauthentication used by FBSR also causes considerableoverhead. There also exists other work on trust-awaresecure routing that is evaluated only through computersimulation, such as [38].

    There are certain existing secure routing solutionsfor WSNs based on trust and reputation management;however, they rarely address the identity theft ex-ploiting the replay of routing information. Two such

    representative solutions are ATSR [22] and TARP [23].Neither ATSR nor TARP offers protection against theidentity deception through replaying routing informa-tion. ATSR [22] is a location-based trust-aware routingsolution for large WSNs. ATSR incorporates a distributedtrust model utilizing both direct and indirect trust,geographical information as well as authentication toprotect the WSNs from packet misforwarding, packetmanipulation and acknowledgements spoofing. Anothertrust-aware routing protocol for WSNs is TARP [23],which exploits nodes past routing behavior and linkquality to determine efficient paths.

    7 CONCLUSIONS

    We have designed and implemented TARF, a robusttrust-aware routing framework for WSNs, to securemulti-hop routing in dynamic WSNs against harmfulattackers exploiting the replay of routing information.TARF focuses on trustworthiness and energy efficiency,which are vital to the survival of a WSN in a hostileenvironment. With the idea of trust management, TARFenables a node to keep track of the trustworthiness of itsneighbors and thus to select a reliable route. Our maincontributions are listed as follows. (1) Unlike previousefforts at secure routing for WSNs, TARF effectively

    protects WSNs from severe attacks through replayingrouting information; it requires neither tight time syn-chronization nor known geographic information. (2) Theresilience and scalability of TARF is proved throughboth extensive simulation and empirical evaluation with

  • 7/23/2019 Design and Implementation of TARF A

    14/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 14

    large-scale WSNs; the evaluation involves both static andmobile settings, hostile network conditions, as well asstrong attacks such aswormholeattacks andSybilattacks.

    (3) We have implemented a ready-to-use TinyOS moduleof TARF with low overhead; as demonstrated in thepaper, this TARF module can be integrated into existingrouting protocols with the least effort, thus producingsecure and efficient fully-functional protocols. (4) Finally,we demonstrate a proof-of-concept mobile target detec-tion application that is built on top of TARF and isresilient in the presence of an anti-detection mechanism;that indicates the potential of TARF in WSN applications.

    REFERENCES

    [1] G. Zhan, W. Shi, and J. Deng, Tarf: A trust-aware routingframework for wireless sensor networks, in Proceeding of the 7thEuropean Conference on Wireless Sensor Networks (EWSN10) , 2010.

    [2] F. Zhao and L. Guibas, Wireless Sensor Networks: An InformationProcessing Approach. Morgan Kaufmann Publishers, 2004.

    [3] A. Wood and J. Stankovic, Denial of service in sensor networks,Computer, vol. 35, no. 10, pp. 5462, Oct 2002.

    [4] C. Karlof and D. Wagner, Secure routing in wireless sensornetworks: attacks and countermeasures, in Proceedings of the1st IEEE International Workshop on Sensor Network Protocols andApplications, 2003.

    [5] M. Jain and H. Kandwal, A survey on complex wormhole attackin wireless ad hoc networks, in Proceedings of International Con-ference on Advances in Computing, Control, and TelecommunicationTechnologies (ACT 09), 28-29 2009, pp. 555 558.

    [6] I. Krontiris, T. Giannetsos, and T. Dimitriou, Launching a sink-hole attack in wireless sensor networks; the intruder side, inProceedings of IEEE International Conference on Wireless and Mobile

    Computing, Networking and Communications(WIMOB 08), 12-142008, pp. 526 531.

    [7] J. Newsome, E. Shi, D. Song, and A. Perrig, The sybil attackin sensor networks: Analysis and defenses, in Proc. of the 3rdInternational Conference on Information Processing in Sensor Networks(IPSN04), Apr. 2004.

    [8] L. Bai, F. Ferrese, K. Ploskina, and S. Biswas, Performance analy-sis of mobile agent-based wireless sensor network, inProceedingsof the 8th International Conference on Reliability, Maintainability andSafety (ICRMS 2009), 20-24 2009, pp. 16 19.

    [9] L. Zhang, Q. Wang, and X. Shu, A mobile-agent-based middle-ware for wireless sensor networks data fusion, in Proceedingsof Instrumentation and Measurement Technology Conference (I2MTC09), 5-7 2009, pp. 378 383.

    [10] W. Xue, J. Aiguo, and W. Sheng, Mobile agent based movingtarget methods in wireless sensor networks, in IEEE InternationalSymposium on Communications and Information Technology (ISCIT2005), vol. 1, 12-14 2005, pp. 22 26.

    [11] J. Hee-Jin, N. Choon-Sung, J. Yi-Seok, and S. Dong-Ryeol, Amobile agent based leach in wireless sensor networks, inProceed-ings of the 10th International Conference on Advanced CommunicationTechnology (ICACT 2008), vol. 1, 17-20 2008, pp. 75 78.

    [12] J. Al-Karaki and A. Kamal, Routing techniques in wireless sensornetworks: a survey, Wireless Communications, vol. 11, no. 6, pp.628, Dec. 2004.

    [13] C. Karlof, N. Sastry, and D. Wagner, Tinysec: A link layer securityarchitecture for wireless sensor networks, inProc. of ACM SenSys2004, Nov. 2004.

    [14] A. Perrig, R. Szewczyk, W. Wen, D. Culler, and J. Tygar, SPINS:Security protocols for sensor networks,Wireless Networks Journal(WINET), vol. 8, no. 5, pp. 521534, Sep. 2002.

    [15] R. Watro, D. Kong, S. Cuti, C. Gardiner, C. Lynn, and P. Kruus,Tinypk: securing sensor networks with public key technology,

    in Proceedings of the 2nd ACM workshop on Security of ad hoc andsensor networks (SASN 04). New York, NY, USA: ACM, 2004, pp.5964.

    [16] A. Liu and P. Ning, Tinyecc: A configurable library for ellipticcurve cryptography in wireless sensor networks, in Proceedingsof the 7th international conference on Information processing in sensornetworks (IPSN 08). IEEE Computer Society, 2008, pp. 245256.

    [17] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci,A survey on sensor networks, IEEE Communications Magazine,vol. 40, no. 8, pp. 102114, Aug. 2002.

    [18] H. Safa, H. Artail, and D. Tabet, A cluster-based trust-aware

    routing protocol for mobile ad hoc networks,Wirel. Netw., vol. 16,no. 4, pp. 969984, 2010.

    [19] W. Gong, Z. You, D. Chen, X. Zhao, M. Gu, and K. Lam, Trustbased routing for misbehavior detection in ad hoc networks,Journal of Networks, vol. 5, no. 5, May 2010.

    [20] Z. Yan, P. Zhang, and T. Virtanen, Trust evaluation based securitysolution in ad hoc networks, in Proceeding of the 7th NordicWorkshop on Secure IT Systems, 2003.

    [21] J. L. X. Li, M. R. Lyu, Taodv: A trusted aodv routing protocolfor mobile ad hoc networks, inProceedings of Aerospace Conference,2004.

    [22] T. Zahariadis, H. Leligou, P. Karkazis, P. Trakadas, I. Papaefs-tathiou, C. Vangelatos, and L. Besson, Design and implementa-tion of a trust-aware routing protocol for large wsns, InternationalJournal of Network Security & Its Applications (IJNSA), vol. 2, no. 3,Jul. 2010.

    [23] A. Rezgui and M. Eltoweissy, Tarp: A trust-aware routing proto-col for sensor-actuator networks, in IEEE Internatonal Conferenceon Mobile Adhoc and Sensor Systems (MASS 2007), 8-11 2007.

    [24] A. Abbasi and M. Younis, A survey on clustering algorithms forwireless sensor networks, Comput. Commun., vol. 30, pp. 28262841, October 2007.

    [25] S. Chang, S. Shieh, W. Lin, and C. Hsieh, An efficient broadcastauthentication scheme in wireless sensor networks, inProceedingsof the 2006 ACM Symposium on Information, computer and communi-cations security (ASIACCS 06). New York, NY, USA: ACM, 2006,pp. 311320.

    [26] K. Ren, W. Lou, K. Zeng, and P. Moran, On broadcast authenti-cation in wireless sensor networks, IEEE Transactions on WirelessCommunications , vol. 6, no. 11, pp. 4136 4144, november 2007.

    [27] P. De, Y. Liu, and S. K. Das, Modeling node compromise spreadin wireless sensor networks using epidemic theory, in World ofWireless, Mobile and Multimedia Networks, 2006. WoWMoM 2006.

    International Symposium on a, 2006, pp. 7 pp. 243.[28] A. Woo, T. Tong, and D. Culler, Taming the underlying chal-

    lenges of reliable multihop routing in sensor networks, in Pro-ceedings of the First ACM SenSys03, Nov. 2003.

    [29] S. Ganeriwal, L. Balzano, and M. Srivastava, Reputation-basedframework for high integrity sensor networks, ACM Trans. Sen.Netw., 2008.

    [30] G. Zhan, W. Shi, and J. Deng, Poster abstract: Sensortrust - a re-silient trust model for wsns, in Proceedings of the 7th InternationalConference on Embedded Networked Sensor Systems (SenSys09), 2009.

    [31] C. Perkins and P. Bhagwat, Highly dynamic destination-sequenced distance-vector routing (dsdv) for mobile computers,SIGCOMM Comput. Commun. Rev., vol. 24, no. 4, pp. 234244,1994.

    [32] O. Gnawali, R. Fonseca, K. Jamieson, D. Moss, and P. Levis,Collection tree protocol, inProceedings of the 7th ACM Conferenceon Embedded Networked Sensor Systems (SenSys 09). New York,NY, USA: ACM, 2009, pp. 114.

    [33] G. Zhan, W. Shi, and J. Deng, Design, implementationand evaluation of tarf: A trust-aware routing framework fordynamic wsns, http://mine.cs.wayne.edu/guoxing/tarf.pdf,Wayne State University, Tech. Rep. MIST-TR-2010-003, Oct. 2010.

    [34] Q. Zheng, X. Hong, and S. Ray, Recent advances in mobilitymodeling for mobile ad hoc network research, in Proceedings ofthe 42nd Annual Southeast Regional Conference (ACM-SE 42). NewYork, NY, USA: ACM, 2004, pp. 7075.

    [35] X. Hong, M. Gerla, G. Pei, and C. Chiang, A group mobilitymodel for ad hoc wireless networks, in Proceedings of the 2ndACM International Workshop on Modeling, Analysis and Simulationof Wireless and Mobile Systems (MSWiM 99) . New York, NY, USA:ACM, 1999, pp. 5360.

    [36] Motelab,http://motelab.eecs.harvard.edu,2005.[37] Z. Cao, J. Hu, Z. Chen, M. Xu, and X. Zhou, Fbsr: feedback-

    based secure routing protocol for wireless sensor networks,International Journal of Pervasive Computing and Communications,2008.

    [38] T. Ghosh, N. Pissinou, and K. Makki, Collaborative trust-basedsecure routing against colluding malicious nodes in multi-hop adhoc networks, inLocal Computer Networks, 2004. 29th Annual IEEEInternational Conference on, Nov. 2004, pp. 224 231.

    http://mine.cs.wayne.edu/~guoxing/tarf.pdfhttp://mine.cs.wayne.edu/~guoxing/tarf.pdfhttp://mine.cs.wayne.edu/~guoxing/tarf.pdfhttp://motelab.eecs.harvard.edu/http://motelab.eecs.harvard.edu/http://mine.cs.wayne.edu/~guoxing/tarf.pdf
  • 7/23/2019 Design and Implementation of TARF A

    15/15

    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 15

    Guoxing Zhan Guoxing Zhan is currently aPh.D. candidate in the Department of ComputerScience at Wayne State University. He receiveda M.S. in Mathematics from Chinese Academy of

    Sciences in 2007 and another M.S in ComputerScience from Wayne State University in 2009.Mr. Zhan is interested in research on participa-tory sensing, wireless sensor network, mobilecomputing, networking and systems Security,trust Management, and information processing.Several of his research papers have been pre-

    sented at international conferences or published in journals. Additionally,Mr. Zhan has instructed a few computer science labs consisting ofinteractive short lectures and hands-on experience.

    Weisong Shi Dr. Weisong Shi is an AssociateProfessor of Computer Science at Wayne StateUniversity. He received his B.S. from XidianUniversity in 1995, and Ph.D. degree from theChinese Academy of Sciences in 2000, bothin Computer Engineering. His current researchfocuses on computer systems, mobile and cloudcomputing. Dr. Shi has published more than 100peer reviewed journal and conference papers.He is the author of the book Performance Opti-mization of Software Distributed Shared Memory

    Systems (High Education Press, 2004). He has served the programchairs and technical program committee members of several inter-national conferences. He is a recipient of the NSF CAREER award,one of 100 outstanding Ph.D. dissertations (China) in 2002, CareerDevelopment Chair Award of Wayne State University in 2009, and theBest Paper Award of ICWE04 and IPDPS05.

    Julia Deng Dr. Julia (Hongmei) Deng currentlyis a Principal Scientist at Intelligent Automa-tion Inc. Her primary research interests includeprotocol design, analysis and implementation inwireless ad hoc/sensor networks, network secu-rity, information assurance, and network man-agement. Dr Deng received her Ph.D. in theDepartment of Electrical Engineering from theUniversity of Cincinnati in 2004, majoring in com-munications and computer networks. At IAI, sheserves as the PI and leads many network and

    security related projects, such as secure routing for airborne Networks,network service for airborne Networks, DoS mitigation for tactical net-works, trust-aware querying for sensor networks, trusted routing forsensor networks, agent-based intrusion detection system, just to name

    a few.