**1. Introduction**

The issue of secure routing[1] in wireless and mobile computing is a major challenging design factor in different networking aspects. However, the problem gets more complicated when considering infrastructure-less networks that exhibit even more constraints and new types of attacks. Wireless sensor networks (WSN), which is an ad-hoc type of networks, is a clear representative case.

In the continuously and rapidly evolving area of wireless communication, the field of wireless sensor networks (WSN) comes into the picture as a very hot area of research in all its aspects. WSN is a multi-hop network that is actually one type of ad hoc networks. However, WSN draws the special attention of researchers due to the fact that it exhibits more constraints and critical conditions than normal ad hoc networks in terms of power sources, computing capabilities, memory capacity and other factors. This requires different approaches and protocol engineering directions from those applied to normal ad hoc networks.

One special aspect in WSN is the provision of secure routing. As mentioned previously, the nature of WSN complicates the security requirements and adds difficulties in solving security problems. In fact, secure routing in WSN is actually still not captured well in the research field. One main reason is that the design of a routing protocol is biased towards solving the problem of power limitations and reducing communication overhead, while keeping security concerns in a later phase to be integrated with the current routing solutions.

One specific class of security problems in routing aspects in WSN is the exposure to attacks that are related to nodes' activities and behavior in the network. Such attacks cannot be recognized by verifying nodes' identities because most of these attacks are launched by

© 2012 Naseer, licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. © 2012 Naseer, licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

compromised nodes or insider attacks; i.e. nodes belong to the same network community. Among different approaches in solving this problem, reputation system based solution is one technique that has generated enough interest among WSN research community. Reputation systems attempt to provide security by allowing different nodes to rate each other based on their routing activities and behavior analysis. When a node has an experience profile about its neighbors, it may select the node that it trusts more, and, hence, achieve a secure routing operation.

In this chapter, a reputation system solution for behavioral based attacks at the network layer as a provision of secure routing in WSN is presented.
