I have a friend (X) who hacked the whatsapp account of someone (Y) using iphone. He told me that he sent a packet to the iphone of Y that appears as a normal whatsapp message but now he can see all the chat of Y. My question is how did he do it exactly and what's the name of this technique? Don't iphone or other machines have any security against such attacks (maybe encryption)? Does this technique apply universally to any computer?