Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. @echo off
  2. REM Administrative check from here: https://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights
  3. REM Vaccination discovered by twitter.com/0xAmit/status/879778335286452224
  4. REM Batch file created by Lawrence Abrams of BleepingComputer.com. @bleepincomputer @lawrenceabrams
  5.  
  6. echo Administrative permissions required. Detecting permissions...
  7. echo.
  8.  
  9. net session >nul 2>&1
  10.  
  11. if %errorLevel% == 0 (
  12. if exist C:\Windows\perfc (
  13. echo Computer already vaccinated for NotPetya/Petya/Petna/SortaPetya.
  14. echo.
  15. ) else (
  16. echo This is a NotPetya/Petya/Petna/SortaPetya Vaccination file. Do not remove as it protects you from being encrypted by Petya. > C:\Windows\perfc
  17. echo This is a NotPetya/Petya/Petna/SortaPetya Vaccination file. Do not remove as it protects you from being encrypted by Petya. > C:\Windows\perfc.dll
  18. echo This is a NotPetya/Petya/Petna/SortaPetya Vaccination file. Do not remove as it protects you from being encrypted by Petya. > C:\Windows\perfc.dat
  19.  
  20. attrib +R C:\Windows\perfc
  21. attrib +R C:\Windows\perfc.dll
  22. attrib +R C:\Windows\perfc.dat
  23.  
  24. echo Computer vaccinated for current version of NotPetya/Petya/Petna/SortaPetya.
  25. echo.
  26. )
  27. ) else (
  28. echo Failure: You must run this batch file as Administrator.
  29. )
  30.  
  31. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement