Let us see how it works.
When a WhatsApp user changes their phone, he/she will have to verify that the new device is linked to his/her mobile number. This is done through WhatsApp verification code. The hacker knows the user’s mobile number and this whole series of attacks begins with one person (Mr P). If Mr P shares his WhatsApp verification code, he allows the hacker to gain access to his account.
Once Mr P’s account is hacked, the hacker gets access to all his contacts as well as groups. A chain reaction begins after this. Knowing that Mr K is the most contacted person from Mr P’s list, the hacker impersonates Mr P and convinces Mr K that his WhatsApp verification code is not reaching him, so he has sent the code to Mr K’s phone. Mr K falls for the trap without realising that it is his own verification code. As he shares the code, the hacker hijacks his account also.
Once Mr P’s account is hacked, the hacker gets access to all his contacts as well as groups. A chain reaction begins after this. Knowing that Mr K is the most contacted person from Mr P’s list, the hacker impersonates Mr P and convinces Mr K that his WhatsApp verification code is not reaching him, so he has sent the code to Mr K’s phone. Mr K falls for the trap without realising that it is his own verification code. As he shares the code, the hacker hijacks his account also.