| Step 1: Start: cloud MANET enabled IoT Network without attacker nodes |
| Step 2: Add two attacker nodes in the cloud MANET enabled IoT network. |
| Step 3: Set First attacker node as FirstEndOfWormTunnel and second attacker node SecondEndOfWormTunnel |
| Step 4: Source Node transmits Rout Request (RREQ) message to every neighbor (cloud MANET Enabled IoT) node. |
| Step 5: if (EnableWrmAttack is TRUE andand Node is FirstEndOfWormTunnel?) |
| Set hop count to 1. |
| Set ScondEndOfWormTunnel as receiving node and form a fast tunnel |
| ScondEndOfWormTunnel transmits Rout Request (RREQ) message to its neighbor nodes. |
| Destination node transmits Route Reply (RREP) message to source node using prearranged Path. |
| Source node send packets to destination node using prearranged path. |
| When packets reach at FirstEndOfWormTunnel, it forwards it to SecondEndOfWormTunnel |
| Else if (EnableWrmAttack is TRUE andand Node is SecondEndOfWormTunnel?) |
| Set hop count to 1. |
| Set FirstEndOfWormTunnel as receiving node and form a Fast tunnel. |
| FirstEndOfWormTunnel transmits Route Request (RREQ) message to its neighbors’ nodes. |
| Destination node transmit Route Reply (RREP) message to source node using predefined Path. |
| Source node Forward data packets to destination node using prearranged path. |
| When packets reach at SecondEndOfWormTunnel, it forwards it to FirstEndOfWormTunnel, and start reiterating this process |
| All Packets drops or change by wormhole nodes. |
| Else |
| AODV Routing Protocol execute its tasks as usual. |
| End if |
| End if |
| Step 6: Stop |