Advertisement
gen8bit

ANTI-Wannacry script Windows

Jun 27th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rem
  2. rem @Author: CCN-CERT Team
  3. rem @E-mail: info@ccn-cert.cni.es
  4. rem @Website: www.ccn-cert.cni.es
  5. rem @Description:
  6. rem Script to avoid further execution of malware Wannacry
  7. rem The malware creates several files at the beginning of its execution. If it can't get a valid handle to some of those files it will finish the execution without infecting the computer
  8. rem This script creates an empty file with the same name of one of the files created by the malware and without any permissions inside several folders for the purpose explained before
  9. rem Please note, that this script will only stop the execution of the ransomware if it's run from one of the folders included in this script
  10. rem Please, feel free to add more folders if it's needed
  11. rem
  12. copy /y nul t.wnry
  13. icacls t.wnry /deny Everyone:W /T
  14. copy /y nul "C:\Users\%USERNAME%\AppData\local\Temp\t.wnry"
  15. icacls C:\Users\%USERNAME%\AppData\local\Temp\t.wnry /deny Everyone:W /T
  16. copy /y nul "%USERPROFILE%\Downloads\t.wnry"
  17. icacls %USERPROFILE%\Downloads\t.wnry /deny Everyone:W /T
  18. copy /y nul "%USERPROFILE%\Desktop\t.wnry"
  19. icacls %USERPROFILE%\Desktop\t.wnry /deny Everyone:W /T
  20. copy /y nul "%USERPROFILE%\Documents\t.wnry"
  21. icacls %USERPROFILE%\Documents\t.wnry /deny Everyone:W /T
  22. copy /y nul "%USERPROFILE%\Music\t.wnry"
  23. icacls %USERPROFILE%\Music\t.wnry /deny Everyone:W /T
  24. copy /y nul "%USERPROFILE%\Pictures\t.wnry"
  25. icacls %USERPROFILE%\Pictures\t.wnry /deny Everyone:W /T
  26. copy /y nul "%USERPROFILE%\Videos\t.wnry"
  27. icacls %USERPROFILE%\Videos\t.wnry /deny Everyone:W /T
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement