| Algorithm 2: SN-Inherited WHA Scenario | |
| 1. | Input: wormhole attack building block |
| 2. | Output: attacked RPL network |
| 3. | Begin |
| 4. | True: malicious nodes form tunnel via probing using DIS |
| 5. | If |
| 6. | Receive route requests, |
| 7. | Broadcast high-level capability, |
| 8. | Neighbor nodes overhear fake credentials, |
| 9. | Join the node as child nodes, |
| 10. | Drop the child node packets, then |
| 11. | Nodes = malicious |
| 12. | Else |
| 13. | False: node = benign |
| 14. | Until wormhole attack launched |
| 15. | Network = attacked |
| 16. | End |