Skip to content

Instantly share code, notes, and snippets.

@Belorum
Created November 11, 2017 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Belorum/733176f7c7c183ad1ec746a877cfbae6 to your computer and use it in GitHub Desktop.
Save Belorum/733176f7c7c183ad1ec746a877cfbae6 to your computer and use it in GitHub Desktop.
@echo off
REM Prevents Bad Rabbit Ransomware
REM Vaccine by Amit Serper @0xAmit
REM I added a line that removes inheritance from the command line instead of editing via the GUI
REM Creates infpub.dat and cscc.dat in the C:\Windows directory
echo This file is a vaccine for Bad Rabbit Ransomware, please do not remove. > C:\Windows\infpub.dat && echo This file is a vaccine for Bad Rabbit Ransomware, please do not remove. > C:\Windows\cscc.dat
REM Removes inheritance from previously created files
icacls C:\Windows\infpub.dat /inheritance:r /remove Administrators && icacls C:\Windows\cscc.dat /inheritance:r /remove Administrators
echo.
echo Bad Rabbit Vaccination Complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment