WannaCry is a type of malicious software that encrypts files on infected computers, demanding a ransom in Bitcoin for their decryption. The attack leveraged a vulnerability in Microsoft Windows, known as EternalBlue, which had been previously exposed by the Shadow Brokers hacking group.