Research Article

[Retracted] Self-Adaptive Framework for Rectification and Detection of Black Hole and Wormhole Attacks in 6LoWPAN

Algorithm 2

Incorporation of attack and hash function assignment.
1. A malicious node is taken, which is defined as a macro with its ID as well as rank.
2. Hash function is used to randomly generate the rank for the malicious node.
3. In NETWORK_IN_EVENT, the random rank generated is assigned to the malicious node.
4. If randomly generated rank is 1, then the value is incremented.
5. If data packets are coming on malicious node, then those packets are dropped, thus decreasing the flow network rate of the system.
6. If the randomly generated value is divisible by 2, then packet was not allowed to be forwarded.
7. Otherwise, it was forwarded normally.
8. Whenever a NETWORK_IN_EVENT takes place at malicious node, it keeps on forwarding DIO messages for a finite number of time.
9. In that time will be added to the neighbor list of other nodes.
10. A node is made malicious node and whenever a network-in event takes place at this node, the ID of this malicious node is cloned with an another node.
11. This attack creates confusions in the network. This attack results in the changing of rank of both malicious node and with whom the malicious node is being cloned.