A vaccine, not a killswitch, has been discovered to prevent the Petya/NotPetya ransomware from infecting machines.

https://www.darkreading.com/attacks-breaches/researchers-find-vaccine-for-global-ransomware-attack/d/d-id/1329242?_mc=RSS_DR_EDT