Short Bytes:A security researcher has found a fix for the latest Petya Ransomware attack. For now, you can vaccinate your system in seconds by creating a particular file. If Petya finds that file on the disk, it stops the encryption business. Please note that users need to create this file independently on each computer and it doesn’t fix things globally like WannaCry killswitch.

Earlier it was believed that the current malware is a variant of the older Petya ransomware, which made headlines last year. However, after further analysis, Kaspersky confirmed that it’s a new infection and they labeled it as “NotPetya.”

petya ransomware vaccine fix

The latest from@kasperskyresearchers on#Petya: it’s actually#NotPetyapic.twitter.com/uTVBUul8Yt

— Kaspersky (@kaspersky)July 13, 2025

The working of Petya is a lot different from its other ransomware counterparts. This malware waits for about 10-60 minutes after the infection and then reboots the system using “at” or “schtasks” and “shutdown.exe” utilities. After the reboot, Petya starts encrypting MFT table in NTFS partitions and overwrites the MBR with the folder that contains ransom notes.

you’re able to read more about Petya ransomware’s working here at Kaspersky’sSecurelist blog.

How to enable Petya ransomware fix/vaccine?

Security researcher Amit Serper has found a way to prevent the Petya/NotPetya ransomware, according to a report fromBleeping Computer.

As this ransomware has made an appearance around WannaCry’s timeline, the researchers believed that there might be some killswitch domain to take care of Petya’s wrath. However, after analyzing its inner working, Serper found that Petya ransomware would cease its encryption routine if it finds a local file on disk. His finding has been confirmed by other security researchers too.

To make sure that your computer is vaccinated against Petya, you should create a file called perfc in C:\Windows folder and make it read only. Here’s how to do it —

That’s all you need to do for making sure that you’re protected against Petya ransomware. Please note that it isn’t like a WannaCry killswitch that took care of the ransomware globally. This vaccine is applicable to a single computer on which it’s applied.

So, did you find this article on Petya ransomware vaccine helpful? Share your views in the comments.

Also Read:8 Best Anti Ransomware Tools You Must Be Using In 2017