## 5 Empirical Results  
The proposed architecture has been simulated extensively to evaluate its behaviour in presence of attacks of very different nature.  
The most common attacks are detected and confined immediately with no other effect in the surroundings. Ill-behaved nodes will never get high reputation, but even for mole attacks, an attacker would need to add at least as many nodes as there are in the attacked area in order to have any influence in the decision. But even in that case, it would be easily detected by software agents analyzing the servers data. In our case, we use self-organizing maps (SOM) and genetic algorithms to detect anomalies in the system behavior. These agents can immediately confine the attack by changing the global reputation of the misbehaving nodes and correcting the affected neighbours'. As routes are non-deterministic, attacks to routing elements only delay the response time of the system by \(1/N_{r}\).  
One of the most significant results is the behavior of the system when a compromised node tries to impersonate many existing sensors (a sybil attack). Figure 3(a) shows the evolution of the reputation of every node when the sybil attack is introduced. The Y-axis represents time, while the X-axis represent the node identifiers, ordered by their projection in one dimension but not preserving distance proportions. Figure 3(b) is similar but preserving distance proportions between nodes (note that the compromised node is just one point in the X-axis with many associated identifiers). In this last case, the reputation of the nodes whose identity is being stolen would decrease at the same rate as the sybil identities, but they have been omitted from the graph for clarity purposes. The sybil attack uses 200 different identifiers out of 1400 total nodes in the system. The reputation server is located at the origin. This is an extreme case to better show the effects in the attack neighborhood.  
It is noteworthy that our algorithm allows very fast confinement of the attack, by reducing immediately the reputation of the neighbor elements. Figure 4 shows the evolution of the reputation of three different kinds of node identities during a sybil attack: the identities used by the attacked nodes, the identities of neighbor nodes, and identities from distant nodes. The system can not distinguish between the real IDs and the faked IDs, and therefore both are finally discarded from the reputation system. As far as the number of attacked nodes remain low compared to well-behaved nodes, this should not be a problem. As soon as the affected nodes are ignored (when they finally end with null reputation), the neighbor elements recover their initial reputation. Also, routing path analysis avoids significant reductions of the real nodes being impersonated.  
In our system, trust information is not shared directly between the sensor nodes, it is sent to the reputation server. Therefore, our trust framework is not vulnerable to attacks based on an inconsistent behavior in the time domain (on-off attacks, clone attacks, and thief attacks), or the user domain (conficting behavior attack). The attacked node can not influence directly on its neighbors unless there is a majority of badly-behaved nodes with high trust levels.  
Figure 3: Reputation evolution for a sybil attack.  
The node reputation is the only trust-related information that is shared by the network. This reputation is elaborated by the reputation server, which has more information than any individual node, and also has more resources to avoid local attacks. Attacks to the reputation messages, or even the generation of these messages, is avoided by the multiple routing paths, and because no information is trusted unless it is t-consistent and s-consistent.