WannaCry ransomware comes in 2 parts. The first part – the EternalBlue exploit kit which was created by the US National Security Agency in order to use Windows operating system vulnerabilities. The second part – an encryptor that is downloaded to a computer after it has been infected.
More at https://handcodedstudio.co.uk/blog/wannacry-ransomware-patches-save-lives