Regular or Decaf? Tool launched to combat COFEE

ScreenHunter_07 Dec. 14 16.32

About a month ago, there was much news about the release of COFEE into the torrent wild. I even gave my two cents about the much hyped forensics toolkit which is provided to law enforcement for the purposes of easily capturing volatile data from personal computers during evidence collection. A tool to counter COFEE, aptly named DECAF, has been released as an anti-forensics tool to prevent the use of COFEE for data collection.

“We want to promote a healthy unrestricted free flow of internet traffic and show why law enforcement should not solely rely on Microsoft to automate their intelligent evidence finding,” one of the two hackers behind Decaf told The Register in explaining the objective of the project.

DECAF Details

DECAF is written in Visual Basic 2005 and consists of a single executable and an XML configuration file called decaf.exe.config which contains the application settings (an XML is also created in the user’s profile directory for each user’s specific settings).

When launched, it displays the user license agreement and asks for confirmation. When agreed, it writes the following registry entry:

Value: AcceptedEULA
Data: true

The program then connects via HTTP to to check the current version number and receives the following response: 1.0.0||

If the application does not have a network connection, it will crash upon starting up with the following event:

EventType clr20r3, P1 decaf.exe, P2, P3 4b2679b7, P4 decaf,
 P5, P6 4b2679b7, P7 115, P8 14d, P9 
system.invalidoperationexception, P10 NIL.
Decaf Menu

Decaf Menu

I produced this initially when I had my virtual host’s network interface disabled.

Starting the monitor puts the application in detection mode, looking for the presence of COFEE. It waits for the launch of runner.exe, the launcher in COFEE, and will perform an action based on the configuration settings. It appears the tool checks the MD5 hash of runner.exe (ab9e68c7e71ebb2d6a5b8d17e9bd6b33). In addition to detecting the launch of runner.exe, the tool performs a WMI query to detect the COFEE USB thumb drive. The WMI query used for this type of action is:

SELECT * FROM __InstanceOperationEvent WITHIN 10 WHERE TargetInstance ISA "Win32_DiskDrive"

And since the thumb drive has the COFEE label, finding its presence should not be an issue.

Notification finding COFEE

Notification finding COFEE

When COFEE is found, a notification is sent over to (note I changed the rip field to invalid IP addresses):

GET /decaf.php?&rip= HTTP/1.1

When clicking Simulate, it mimics what would happen if coffee is found, and the sim field is set to true:

GET /decaf.php?&rip= HTTP/1.1

The Configuration Menu

Lockdown Settings

Lockdown Settings

In the configuration menu, there are checkboxes in the Monitor section to “Monitor USB” and “Monitor COFEE”. As discussed, these options enable checking for runner.exe and detection of the USB thumb drive. The Notification section contains options for notifying the user when detection occurs. The Actions section is the interesting part, especially editing the Lockdown Mode. Here, you can set what happens when detection occurs. Some of the options are:

  • Shutdown the system
  • Kill selected processes
  • Disable Network, USB, CD-ROM, ports, floppy
  • Clear event viewer
  • Erase Data

The configuration settings are stored per user in an XML file located in:

%USERPROFILE%\local settings\application data\\Decaf.exe_Url_5fokqfogt1qso5vyeabunvhsigozqvpo\>

If the config for the user does not exist, the default in the launch directory is used.


When I first heard of the tool, I assumed it would also include detection of the default OS commands and Sysinternal utilities that COFEE typically runs, such as pslist.exe or tcpvcon.exe, however, in its current version this is not the case. An anti-forensics tool which expands into detecting the typical collection tools will affect investigations that use various toolkits (Helix, IRCR, etc), not just COFEE. However, as quoted by The Register, the DECAF brewer’s intentions are not to derail just any collection suite, but for law enforcement to expand beyond using what Microsoft provides them.

This version of decaf is still very bitter and has quite a ways to go in its development. The authors of Decaf are promising a more light-weight version or a windows service in the next release and text message and email triggers to enter lockdown mode remotely in future versions. However, Decaf provides a good example of how anti-forensic tools continue to evolve and can become serious roadblocks for digital forensic investigators.


The authors of Decaf have shut down the project and have said they are starting a forum for those interested in further discussing related matters. Considered a spoof, stunt, hoax, and many other names in the media, we have discussed the matter in the following post.

Filed Under: ForensicsIncident ResponseSecurityToolsWindows

Tags: , , , , , , ,

Comments (9)

Trackback URL | Comments RSS Feed

  1. says:

    Very nice. Very nice. The new version will be out soon. :) Stay Tuned!

  2. [...] Tweets about this great post on [...]

  3. [...] recently, with the COFEE hype behind us, a tool called Decaf was released to combat the use of COFEE. A VB.Net application which detects for the use of COFEE and then reacts [...]

  4. [...] More COFEE Please, on Second Thought… [...]

  5. [...] ses développeurs ont désactivé l’outil… En effet, il avait besoin d’une connexion Internet à son lancement et vérifiait la présence d’informations sur le site des développeurs. Il est évidemment [...]

  6. Frank says:

    Unfortunately DECAF has now been removed from the website and the developers claim that “do not feel its release would promote a positive move.”

    Their website seems now to be on sale, or so it says.

  7. Prefect says:

    The tool is still out there on other sources, and is easily re-enabled as laid out in this post:

  8. [...] en el blog Praetorian Prefect (Prefecto Pretoriano) describen el funcionamiento y algunos hacks que hicieron al instalar y probar [...]

  9. suspect citizen says:

    what happens if your using Linux ?