EternalBlue was used in the propagtion of both WannyCry and Petya. It is believed that this exploit was developed by NSA and was leaked by Shadow Broker hacker group.
EternalBlue exploits a vulnerability in Microsoft Windows SMB v1 service which allowed to execute arbritary code from a remote system on the target computer. Microsoft did release a patch for all of its operating system which had this vulnerability including unsupported Microsoft XP.
More details of the vulnerability can be found at the CVE and its catalogued as CVE-2017-0144 (https://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0144)
It is believed that Petya spread through a vulnerability in a third party software M.E. Doc used in Ukraine, which explains why it impacted Ukraine the most. Unlike WannyCry, Petya used multiple techniques to propogate. These included EthernalBlue, a technique used by Mimikatz and other tools leveraging lsadump to dump passwords from memory and it also used PSEXEC and WMIC to spread across the network.
It is advised that you patch your windows system, if they are not already patched. Like WannyCry, block SMB ports on your firewalls, disable local Administrative rights for users, do not reuse the same passwords across different system. If best pratices are followed, not only attacks like Petya, WannaCry but also future attacks be limited.
GajShield Security Alert - https://www.gajshield.com