Raccine A Simple Ransomware Vaccine
Raccine A Simple Ransomware Vaccine

Raccine: A Simple Ransomware Vaccine

A Simple Ransomware Protection


We see ransomware delete all shadow copies using vssadmin pretty often. What if we could just intercept that request and kill the invoking process? Let’s try to create a simple vaccine.

Why Raccine
Why Raccine

How it works

We register a debugger for vssadmin.exe (and wmic.exe), which is our compiled raccine.exe. Raccine is a binary, that first collects all PIDs of the parent processes and then tries to kill all parent processes.


  • The method is rather generic
  • We don’t have to replace a system file (vssadmin.exe or wmic.exe), which could lead to integrity problems and could break our raccination on each patch day
  • The changes are easy to undo
  • Should work on all Windows versions from Windows 2000 onwards
  • No running executable or additional service required (agent-less)

Disadvantages / Blind Spots:

  • The legitimate use of vssadmin.exe delete shadows (or any other blacklisted combination) isn’t possible anymore
  • It even kills the processes that tried to invoke vssadmin.exe delete shadows, which could be a backup process
  • This won’t catch methods in which the malicious process isn’t one of the processes in the tree that has invoked vssadmin.exe (e.g. via schtasks)

The Process

  1. Invocation of vssadmin.exe (and wmic.exe) gets intercepted and passed to raccine.exe as debugger (vssadmin.exe delete shadows becomes raccine.xe vssadmin.exe delete shadows)
  2. We then process the command line arguments and look for malicious combinations.
  3. If no malicious combination could be found, we create a new process with the original command line parameters.
  4. If a malicious combination could be found, we collect all PIDs of parent processes and the start killing them (this should be the malware processes as shown in the screenshots above). Raccine shows a command line window with the killed PIDs for 5 seconds and then exits itself.

Malicious combinations:

  • delete and shadows (vssadmin, diskshadow)
  • resize and shadowstorage (vssadmin)
  • delete and shadowstorage (vssadmin)
  • delete and shadowcopy (wmic)
  • delete and catalog and -quiet (wbadmin)
  • win32_shadowcopy or element from a list of encoded commands (powershell)
  • recoveryenabled (bcedit)
  • ignoreallfailures (bcedit)

Powershell list of encoded commands: 

JAB, SQBFAF, SQBuAH, SUVYI, cwBhA, aWV4I, aQBlAHgA and many more


Emotet without Raccine – Link

Emotet without Raccine
Emotet without Raccine

Emotet with Raccine – Link (ignore the process activity that is related to the Raccine installation)

Emotet with Raccine
Emotet with Raccine

The infection gets nipped in the bud.

Warning !!!


You won’t be able to run commands that use the blacklisted commands on a raccinated machine anymore until your apply the uninstall patch raccine-reg-patch-uninstall.reg. This could break various backup solutions that run that specific command during their work. It will not only block that request but kills all processes in that tree including the backup solution and its invoking process.

If you have a solid security monitoring that logs all process executions, you could check your logs to see if vssadmin.exe delete shadowsvssadmin.exe resize shadowstorage ... or the other blocked command lines are frequently or sporadically used for legitimate purposes in which case you should refrain from using Raccine.



  • A x64 archiutecture is required to allow the features: GUI and YARA scanning (only the basic Raccine with static filters is available as x86 executable)
  • VC++ Runtime for YARA scanning (Installer contains the setup package from https://aka.ms/vs/16/release/VC_redist.x64.exe)
  • Internet access for the YARA rule updates
  • Windows 7 / Windows 2008 R2 and higher (unconfirmed)

Automatic Installation

  1. Download Raccine.zip from the Release section
  2. Extract it
  3. Run raccine-installer.bat
Raccine Windows
Raccine Windows

The batch installer includes an “uninstall” option.

Manual Uninstall

As Administrator do:

  1. Run raccine-reg-patch-uninstall.reg
  2. Remove %ProgramFiles%\Raccine and `%ProgramData%\Raccine folders
  3. Run reg delete HKCU\Software\Raccine /F
  4. Run taskkill /F /IM RaccineSettings.exe
  5. Run
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "Raccine Tray" /F
  1. Run schtasks /DELETE /TN "Raccine Rules Updater" /F


Program Upgrade

We recommend an uninstall and reinstall to upgrade. An uninstall removes all registry keys with configurations.

Signature Update

Raccine has an integrated signature-updater since version 1.2. This program named RaccineRulesSync.exe is configured to run once a day via scheduled task. You can run a signature update manually using the option in the tray icon menu.

YARA Matching

Since version 1.0, Raccine additionally uses YARA rules to determine if a process command line or parent process is malicious or not. Raccine uses 2 sets of rules for two different purposes.

  1. ./yara – rules that get applied to the command line with all parameters, e.g. WMIC.exe delete justatest
  2. ./yara/in-memory – rules that get applied to process memory of the parent process of our intercepted process, e.g. ransomware.exe running our intercepted process vssadmin.exe

YARA External Variables

Since version 1.1 we pass a list of external variables into the YARA matching process to allow for much more complex and clever YARA rules that take attributes of the process and its parent into account.

VariableDescriptionExample Value
NameImage file nameWMIC.exe
ExecutablePathFull path to binaryC:\Windows\System32\wbem\WMIC.exe
CommandLineFull command line with parametersWMIC.exe delete justatest
PriorityProcess priority32
ParentNameParent image file namecmd.exe
ParentExecutablePathFull path to parent executableC:\Windows\System32\cmd.exe
ParentCommandLineFull parent command line with parametersC:\WINDOWS\system32\cmd.exe
ParentPriorityParent process priority32

The matching process looks like this on the command line:

"C:\Program Files\Raccine\yara64.exe" -d FromRaccine="true" -d Name="WMIC.exe" -d ExecutablePath="C:\Windows\System32\wbem\WMIC.exe" -d CommandLine="WMIC.exe delete justatest" -d  Priority=32 -d FromRaccine="true" -d ParentName="cmd.exe" -d ParentExecutablePath="C:\Windows\System32\cmd.exe" -d ParentCommandLine="'C:\WINDOWS\system32\cmd.exe' " -d ParentPriority=32 C:\ProgramData\Raccine\yarayara\mal_emotet.yar C:\ProgramData\Raccine\yara\Rac1C6A.tmp

The following listing shows an example YARA rule that makes use of the external variables in its coindition.

rule env_vars_test {
        Name contains "WMIC.exe"
        and CommandLine contains "delete justatest"
        and ParentPriority >= 8
        and (
            ParentCommandLine contains "cmd"
            or ParentCommandLine contains "powershell"

Deploy Configuration via GPO

The folder GPO includes Raccine.ADMX and Raccine.ADML. In deployment the Raccine.ADMX file goes in C:\Windows\PolicyDefinitions. The accompanying Raccine.ADML files goes in C:\Windows\PolicyDefinitions\en-US.

To use: Open GPEDIT.MSC > Computer Configuration > Administrative Templates > System > Raccine

After configuring the changes, you may need to bump gpo by running gpupdate.exe.


A logfile with all interceptions and actions taken is written to C:\ProgramData\Raccine\Raccine_log.txt


Windows Eventlog

An entry is generated by every blocking event in the Application eventlog.

Windows Eventlog
Windows Eventlog

Simulation Mode

Since version 0.10.0, Raccine can be installed in “simulation mode”, which activates all triggers, logs all actions but doesn’t kill anything. This mode should be used in environments in which backup solutions or other legitimate software for a reasonable amount of time to check if Raccine would interfere with other software. The idea is to install Raccine in simulation mode, let it log for a week or month and then check the logs to see if it would have blocked legitimate software used in the organisation.

Simulation Mode
Simulation Mode


Run raccine.exe and watch the parent process tree die (screenshot of v0.1)



Available with version 1. Can be disabled by an installer option or manually via Registry patches.

GUI Raccine
GUI Raccine


In case that the Ransomware that your’re currently handling uses a certain process name, e.g. taskdl.exe, you could just change the .reg patch to intercept calls to that name and let Raccine kill all parent processes of the invoking process tree.