<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Praetorian Prefect &#187; anti-forensics</title>
	<atom:link href="http://praetorianprefect.com/archives/tag/anti-forensics/feed/" rel="self" type="application/rss+xml" />
	<link>http://praetorianprefect.com</link>
	<description>Information security, a little slower...a little deeper</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:38:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Regular or Decaf? Tool launched to combat COFEE</title>
		<link>http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/</link>
		<comments>http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 01:21:34 +0000</pubDate>
		<dc:creator>Simon Price</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Incident Response]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[anti-forensics]]></category>
		<category><![CDATA[cofee]]></category>
		<category><![CDATA[decaf]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=2250</guid>
		<description><![CDATA[

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 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_07-Dec.-14-16.32.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_07-Dec.-14-16.32.gif" alt="ScreenHunter_07 Dec. 14 16.32" title="ScreenHunter_07 Dec. 14 16.32" width="150"  class="alignleft size-full wp-image-2265" /></a></p>

<p>About a month ago, there was much news about the release of COFEE into the torrent wild. I even gave <a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">my two cents</a> 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.</p>

<p>&#8220;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,&#8221; one of the two hackers behind Decaf <a href="http://www.theregister.co.uk/2009/12/14/microsoft_cofee_vs_decaf">told The Register</a> in explaining the objective of the project.</p>

<h3>DECAF Details</h3>

<p>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&#8217;s profile directory for each user&#8217;s specific settings).</p>

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

<p>Key: <code>HKU\SOFTWARE\DECAFme</code><br />
Value: <code>AcceptedEULA</code><br />
Data: <code>true</code></p>

<p>The program then connects via HTTP to 208.68.237.165 to check the current version number and receives the following response:
<code>1.0.0|http://www.decafme.org/|</code></p>

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

<pre><code>EventType clr20r3, P1 decaf.exe, P2 1.0.2.0, P3 4b2679b7, P4 decaf,
 P5 1.0.2.0, P6 4b2679b7, P7 115, P8 14d, P9 
system.invalidoperationexception, P10 NIL.
</code></pre>

<div id="attachment_2277" class="wp-caption alignright" style="width: 130px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_11-Dec.-14-18.34.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_11-Dec.-14-18.34.gif" alt="Decaf Menu" title="ScreenHunter_11 Dec. 14 18.34" width="120" height="148" class="size-full wp-image-2277" /></a><p class="wp-caption-text">Decaf Menu</p></div>

<p>I produced this initially when I had my virtual host&#8217;s network interface disabled.</p>

<p>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:</p>

<p><code>SELECT * FROM __InstanceOperationEvent WITHIN 10 WHERE TargetInstance ISA "Win32_DiskDrive"</code></p>

<p>And since the thumb drive has the COFEE label, finding its presence should not be an issue. <br /><br /></p>

<div id="attachment_2302" class="wp-caption aligncenter" style="width: 510px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_12-Dec.-14-18.43.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_12-Dec.-14-18.43.gif" alt="Notification finding COFEE" title="ScreenHunter_12 Dec. 14 18.43" width="500" class="size-full wp-image-2302" /></a><p class="wp-caption-text">Notification finding COFEE</p></div>

<p>When COFEE is found, a notification is sent over to decafme.org (note I changed the rip field to invalid IP addresses):</p>

<p><code>GET /decaf.php?&amp;rip=299.297.141.45&amp;rtime=12142009_050704PM-5&amp;sim=false HTTP/1.1</code></p>

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

<p><code>GET /decaf.php?&amp;rip=299.297.141.45&amp;rtime=12142009_051522PM-5&amp;sim=true HTTP/1.1</code></p>

<h3>The Configuration Menu</h3>

<div id="attachment_2312" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/lockdown_mode.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/lockdown_mode-300x252.png" alt="Lockdown Settings" title="lockdown_mode" width="300" height="252" class="size-medium wp-image-2312" /></a><p class="wp-caption-text">Lockdown Settings</p></div>

<p>In the configuration menu, there are checkboxes in the Monitor section to &#8220;Monitor USB&#8221; and &#8220;Monitor COFEE&#8221;. 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:
<br /></p>

<ul>
<li>Shutdown the system</li>
<li>Kill selected processes</li>
<li>Disable Network, USB, CD-ROM, ports, floppy</li>
<li>Clear event viewer</li>
<li>Erase Data</li>
</ul>

<p><br />
<br /></p>

<p>The configuration settings are stored per user in an XML file located in:</p>

<p><code>%USERPROFILE%\local settings\application data\DECAFme.org\Decaf.exe_Url_5fokqfogt1qso5vyeabunvhsigozqvpo\1.0.2.0&gt;</code></p>

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

<h3>Conclusion</h3>

<p>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&#8217;s intentions are not to derail just any collection suite, but for law enforcement to expand beyond using what Microsoft provides them.</p>

<p>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.</p>

<h3>Updates</h3>

<p>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 <a href="http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/">following post</a>.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/iphone-4-ordering-and-session-switching/">iPhone 4 Ordering and Session Switching</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/05/mays-patch-tuesday/">May&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/04/winpe-3-0-forensics/">WinPE 3.0 &#038; Forensics</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/3473/">March&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/press-f1-for-help-pwned/">Press F1 for Help, pwned.</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
