<?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; cofee</title>
	<atom:link href="http://praetorianprefect.com/archives/tag/cofee/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>Reactivating DECAF in Two Minutes</title>
		<link>http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/</link>
		<comments>http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 02:51:33 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[cofee]]></category>
		<category><![CDATA[decaf]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=2574</guid>
		<description><![CDATA[The misinformation on DECAF being shut down and a hoax is alarming and the quality of reporting on this security topic actually worse than usual. Earlier tonight we noticed <a href="http://twitter.com/slashdot/status/6805917206">this update</a> from @slashdot on Twitter: "DECAF Was Just a Stunt, Now Over", along with this: "Anti-COFEE tool taken down &#38; d/l'ed copies disabled.". Ok, fair enough, releasing DECAF was a stunt according to its two creators. But then we saw <a href="http://blog.seattlepi.com/microsoft/archives/188706.asp">this train wreck of an article by Nick Eaton</a>, the Microsoft Reporter over at the Seattle PI Blogs. So now we're going to respond, because the incorrect DECAF as a big hoax story, a tool that supposedly never worked, is propagating through the Intertubes. DECAF was a working tool that can be easily re-enabled, because the shut down appears to only be a call back to decafme.org that is now disabled, but is easily spoofed, and we'll demonstrate how.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_07-Dec.-14-16.321.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_07-Dec.-14-16.321-150x150.gif" alt="ScreenHunter_07-Dec.-14-16.32" title="ScreenHunter_07-Dec.-14-16.32" width="150" height="150" class="alignnone size-thumbnail wp-image-2575" /></a></p>

<p>The misinformation on DECAF being shut down and a hoax is alarming and the quality of reporting on this security topic actually worse than usual. Earlier tonight we noticed <a href="http://twitter.com/slashdot/status/6805917206">this update</a> from @slashdot on Twitter: &#8220;DECAF Was Just a Stunt, Now Over&#8221;, along with this: &#8220;Anti-COFEE tool taken down &amp; d/l&#8217;ed copies disabled.&#8221;. Ok, fair enough, releasing DECAF was a stunt according to its two creators. We listened to this <a href="http://cyberspeak.libsyn.com/index.php?post_id=561335">bizarre podcast</a> where the developer was asked to take DECAF down. Finally we saw <a href="http://blog.seattlepi.com/microsoft/archives/188706.asp">this train wreck of an article by Nick Eaton</a>, the Microsoft Reporter over at the Seattle PI Blogs. So now we&#8217;re going to respond, because the incorrect DECAF as a big hoax story, a tool that supposedly never worked, is propagating through the Intertubes. DECAF was a working tool that can be easily re-enabled, because the shut down appears to only be a call back to decafme.org that is now disabled, but is easily spoofed, and we&#8217;ll demonstrate how.</p>

<p>The story is this, users visiting the <a href="http://www.decafme.org/">http://www.decafme.org/</a> were treated to the screenshot shown below stating that DECAF &#8220;no longer works&#8221; because the release &#8220;was a stunt to raise awareness for&#8230;the need for better forensic tools&#8221;. The thought process isn&#8217;t terrible, DECAF is a simple, clearly quickly written, and unsophisticated Visual Basic 2005 application designed to show the simplicity of thwarting the COFEE forensics tool. You can also see where Microsoft and others have a problem with the application. The application is designed to detect the presence of the Microsoft released forensic tool (largely a wrapper around known utilities) called COFEE and be able to then execute certain actions as specific by the user.</p>

<p>We&#8217;ve covered both topics in full, and aside from being good security theater, both the COFEE leak and DECAF release are much ado about nothing:</p>

<ul>
<li><a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">Regular or Decaf? Tool launched to combat COFEE</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/">More COFEE Please, on Second Thought…</a></li>
</ul>

<h3>Repent, and you shall be Saved</h3>

<p>So things started out ok, a proof of concept tool to combat unreasonable hype, until crazy came to town. Users visiting the site are presented with this bizarre message about Jesus:</p>

<div id="attachment_2576" class="wp-caption alignnone" style="width: 710px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/decafme_message.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/decafme_message.jpg" alt="A message of peace." title="decafme_message" width="700" height="321" class="size-full wp-image-2576" /></a><p class="wp-caption-text">A message of peace.</p></div>

<h3>How to Reactivate DECAF in Two Minutes</h3>

<p><a href="http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/">Remember that DECAF calls home</a> when launched via HTTP to 208.68.237.165.</p>

<p>If it doesn&#8217;t receive this response, it crashes.</p>

<pre><code>1.0.0|http://www.decafme.org/|
</code></pre>

<p>The crash returns this error:</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>

<p>So not serving this page is what appears to be &#8220;the deactivation&#8221;, the URL does not return the right response, and the application crashes. To counter this we:</p>

<p>Set up a virtual host in Apache:</p>

<pre><code>&lt;VirtualHost *:80&gt;
ServerName decafeme.org
ServerAlias www.decafeme.org
RewriteEngine On
RewriteRule ^.*$ /index.php [L]
DocumentRoot "/var/www/decafeme/
&lt;Directory "/var/www/decafeme/"&gt;
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
&lt;/Directory&gt;
&lt;IfModule mpm_peruser_module&gt;
ServerEnvironment apache apache
&lt;/IfModule&gt;
&lt;/VirtualHost&gt;
</code></pre>

<p>Add this php file as &#8216;index.php&#8217;:</p>

<pre><code>&lt;?php
echo("1.0.0|http://www.decafme.org/|");
?&gt;
</code></pre>

<p>Modify your hosts file by adding this entry (swapping out the IP for wherever you put the virtual host):</p>

<pre><code>127.0.0.1 www.decafme.org
</code></pre>

<p>And we&#8217;re back to kicking off a set of processes when COFEE is detected on a system such as:</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>We verified this by performing all the steps above, re-running DECAF, and doing a system shutdown upon detection of COFEE.</p>

<div id="attachment_2584" class="wp-caption alignnone" style="width: 417px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/lockdown_mode1.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/lockdown_mode1.png" alt="Lockdown Settings" title="lockdown_mode" width="407" height="342" class="size-full wp-image-2584" /></a><p class="wp-caption-text">Lockdown Settings</p></div>

<h3>Reporting that is an Epic Fail</h3>

<p>Looking at what sites were misreporting such as <a href="http://www.crunchgear.com/2009/12/18/decaf-the-anti-microsoft-cofee-pulled-it-was-a-stunt-designed-to-rally-yall/">CrunchGear</a> and <a href="http://tech.slashdot.org/story/09/12/18/1810250/DECAF-Was-Just-a-Stunt-Now-Over">Slashdot</a> the story seems to all flow back to this <a href="http://blog.seattlepi.com/microsoft/archives/188706.asp">Seattle pi blogs article by Nick Eaton</a>. Nick reports that DECAF &#8220;is fake&#8221;, that numerous media outlets were &#8220;duped&#8221; and that we were all manipulated. Except whatever the two developers reasons were for creating DECAF, publicity stunt or tool release followed by threat of legal action and quick pull back, DECAF was released as a working tool that still works.</p>

<p>Nick goes on:</p>

<p><i>There was something suspicious about the DECAF Web site before it switched to spoof mode Friday morning. The developers posted an explanatory video, highlighted DECAF&#8217;s supposed features, promised pie-in-the-sky updates (such as the ability to send DECAF a text message to trigger &#8220;Lockdown Mode&#8221;) and appealed to expert developers for help in making better forensics tools. It all seemed a little too legitimate and focused for an anti-policing tool.</i></p>

<p>Then there is this <a href="http://cyberspeak.libsyn.com/index.php?post_id=561335">podcast</a>, devoid of actual information about COFEE and DECAF but that fills in the blanks with nonsense about child molesters and terrorists. In their defense, we&#8217;re told this show is usually pretty good, so we&#8217;ll call this a bad night.</p>

<p>So never let the facts get in the way of a good story.</p>

<h3>DECAF vs. COFEE debate from the Developer (Video)</h3>

<p>We couldn&#8217;t get through the whole thing, but here it is:</p>

<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/lF-g1Pb1tGM&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/lF-g1Pb1tGM&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>

<h3>Finally</h3>

<p>DECAF is not the most sophisticated piece of software, but it did work, and still works. COFEE is not used by legitimate forensic investigators.  <i>&#8220;But pedophiles will use DECAF to thwart law enforcement!&#8221;</i>. We can all only hope that they do because the time they spend trying to get DECAF to work properly will be time spent away from committing felonies and hopefully it will give them a false sense of confidence such that they do not use more effective methods to hide their crimes like encryption. That would actually benefit investigators, as in <i>&#8220;hey, this moron thought that having DECAF installed was going to stop us from being able to find out what he was up to&#8221;</i>. The fact is <a href="http://cyberspeak.libsyn.com/index.php?post_id=561335">bringing up wild child molester, pedophile, and terrorist scenarios</a> is a cheap, dramatic tactic, designed to rile people up emotionally preventing us from having a dispassionate discussion about the facts of the situation.</p>

<p>If you have a serious computer crime to deal with, get a serious computer forensics investigator, who uses sets of real computer forensics tools based on the situation he or she is faced with.</p>

<p><i>But Microsoft may never build another COFEE, and transparency will stop!</i> Be serious, part of the unnecessary nonsense generated around the leak of COFEE and all that followed was the inappropriate way it was originally released and marketed as &#8220;only for law enforcement&#8221;. Forensics tools must be well known, analyzed by experts, and their effects on target systems well documented. Thus releasing a closed source tool to a small community meant that COFEE could never be used seriously to present evidence in court. That is if it did anything novel, but it doesn&#8217;t, COFEE allows the user <a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">to run existing tools, system utilities</a>, from a USB stick.</p>

<p>The promise of COFEE, how it was marketed, has sold a number of people on why its so important that it was leaked and subverted. Standardization of incident response tools (as in only a couple are used) would be a nice idea, but would be an effort faced with serious challenges because heterogeneous non-complex IT environments are a thing of the distant past.  Having less skilled people &#8220;run a tool&#8221; that allows them to perform data capture is a nice idea, albeit even a little more dubious. What lawyer could not get evidence from a computer thrown out that&#8217;s collected by someone who doesn&#8217;t understand a computer? The reasons why it would be a positive is clear, forensic data would not be lost even if an investigator lacks computer forensics skills, and frankly there are not that many good computer forensic investigators to go around.</p>

<p>But COFEE does not deliver on either of these aspirations, as much as some might wish it does. And it was easily countered, meaning any bad actor could have done it. And tools aren&#8217;t evil, the people who use them are.</p>

<p>Now if you have time, have a read of an article about the evolving state of <a href="http://praetorianprefect.com/archives/2009/12/forensics-beverages-aside-a-look-at-incident-response-tools/">real forensics tools</a>.</p>

<h3>Update</h3>

<h4>12/23/2009 &#8211; SoldierX</h4>

<p>The guys over at Soldierx.com have taken <a href="http://www.soldierx.com/news/DECAF-hacked-and-re-enabled-SX">the next logical step and removed the phone home component</a> (that now crashes) from the DECAF program and re-released it.</p>

<p>Note also per our original analysis that when COFEE is found, DECAF sends a request back to decafme.org as follows (our IP address is changed):</p>

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

<p>It appears to basically be a tracking mechanism, however the SoldierX guys didn&#8217;t like that it was doing that from a privacy perspective, and removed that piece also.</p>

<p>DECAF developers have also posted new messages, including the newest one indicating that a version 2 is now on the way:</p>

<h4>12/23/2009 &#8211; DECAFme.org</h4>

<p><i>Well, with Christmas right around the corner we felt it was an opportunity for DECAF to bring an application back on the scene. DECAF v2 is in the kitchen cookin&#8217; as we speak. As you know, DECAF v1 did do what it said it would do even though some people seemed to report it didn&#8217;t. Some might not use V2, some might. We really don&#8217;t care either way. If you are scared to use V2, thats ok; run it through a VM.</p>

<p>Now that we let the cat out the bag, be sure to keep checking back and look for V2 within the next few days. This is the start of something big&#8230; </i></p>

<h4>12/21/2009</h4>

<p><i>DECAF was not a spoof, it was a &#8220;stunt&#8221;. We have got an amazing amount of positive feedback. We have had MANY requests for the source code of DECAF but do not feel its release would promote a positive move.</p>

<p>We have not been able to settle with our buyer for DECAF and DECAFme.org. If there is anyone seriously interested in purchasing, send an email to mike@DECAFme.org. Serious inquiries only.</i></p>

<h4>12/19/2009</h4>

<p><i>With all the recent buzz about DECAF lately, there have been many requests for the visibility of DECAF source code. These have been from the early days of its release to the current &#8220;stunt&#8221; news. My purpose of DECAF is over. There are many out there who think we are feds <em>cough</em> John Young <em>cough</em> and some who think we are lunatic, religious nuts <em>cough</em> John Young <em>cough</em>. But then again we still have 95% of the other readers who encourage and compliment us. Oh ya.. and we finally heard that Microsoft seems to have finally broke the silence about the hype. I am not quite sure where they stand as I was expecting to hear from Richard Boscovich myself but didn&#8217;t. Anyhow, on to my point&#8230;</p>

<p>We have heard from both sides of the argument regarding DECAF source code being released.</p>

<p>We have reason to believe DECAF source code and domain will be purchased this week by an unnamed buyer. We can&#8217;t be sure of the plans or really make sense of their motive but we are considering it. If this does happen, we will not be able to release the source to the community. Feel free to stay tuned as these next 48 hours pan out.</i></p>

<p><strong>Related Posts:</strong></p>
<ul>
<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/2009/12/forensics-beverages-aside-a-look-at-incident-response-tools/">Forensics: Beverages Aside, A Look at Incident Response Tools</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/">Regular or Decaf? Tool launched to combat COFEE</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/taxonomy-of-forensics-geeks/">Taxonomy of Forensics Geeks</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">More COFEE Please, on Second Thought&hellip;</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Forensics: Beverages Aside, A Look at Incident Response Tools</title>
		<link>http://praetorianprefect.com/archives/2009/12/forensics-beverages-aside-a-look-at-incident-response-tools/</link>
		<comments>http://praetorianprefect.com/archives/2009/12/forensics-beverages-aside-a-look-at-incident-response-tools/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 00:57:57 +0000</pubDate>
		<dc:creator>Simon Price</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[cofee]]></category>
		<category><![CDATA[decaf]]></category>
		<category><![CDATA[FTK]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=2333</guid>
		<description><![CDATA[In November, Microsoft's forensics tool called COFEE (Computer Online Forensic Evidence Extractor) was leaked on torrents for download. The news coverage was <a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">much hype about nothing</a>, as many free tools already out there exceed COFEE in features and functionality.]]></description>
			<content:encoded><![CDATA[<h3>There Was COFEE</h3>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/cofee_pod.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/cofee_pod-191x300.gif" alt="cofee_pod" title="cofee_pod" width="85" height="150" class="alignright size-medium wp-image-2336" /></a>
In November, Microsoft&#8217;s forensics tool called COFEE (Computer Online Forensic Evidence Extractor) was leaked on torrents for download. The news coverage was <a href="http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/">much hype about nothing</a>, as many free tools already out there exceed COFEE in features and functionality. However, that did not stop statements such as &#8220;now that COFEE has leaked, hackers can reverse engineer to see what it does.&#8221; Well, I can save them time and tell them it launches OS commands and sysinternals tools to collect information, using a simple method that law enforcement can easily launch from a thumb drive. <end rant> I also hesitate to call it Microsoft&#8217;s tool, as I believe it has more development coming from The National White Collar Crime Center (NW3C.org) than from Microsoft. Ok, let&#8217;s move on to DECAF.</p>

<h3>Then There Was DECAF</h3>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/brushed.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/brushed-150x150.png" alt="brushed" title="brushed" width="75" height="75" class="alignleft size-thumbnail wp-image-2339" /></a>
Just recently, with the COFEE hype behind us, a tool <a href="http://praetorianprefect.com/archives/2009/12/regular-or-decaf-tool-launched-to-combat-cofee/">called Decaf was released</a> to combat the use of COFEE. A VB.Net application which detects for the use of COFEE and then reacts by ways configurable by the user, such as shutting down the system, clearing event logs, or disabling the network, USB, CDROM, and more. The authors of Decaf shared my distaste for COFEE and its hype, and though the press coined them hackers, they informed me that they are developers who have a passion for security, forensics, privacy, and free flow of information online.</p>

<h3>Let&#8217;s Talk Tools</h3>

<p>I want to put aside the media hoopla of COFEE and DECAF and discuss some great tools for forensic analysis out there worth discussing. I want to try and focus on volatile data collection (grabbing important information from a live running system) but many of the tools mentioned can be used in offline analysis as well. If you are familiar with digital forensics, you most likely have used these tools in many cases, and if you are new to this area I hope this provides some groundwork for you to try some of these tools out.</p>

<h4>The List</h4>

<p>Before getting into it, I want to share <a href="http://praetorianprefect.com/wp-content/uploads/2009/12/tools.zip">this Excel spreadsheet</a> that contains a good amount of various tools that can be used in the forensic analysis process. Any prices listed have either been found online or are estimates from VARs, but please check with the specific vendors for exact pricing. The tools discussed throughout the article are in this spreadsheet along with links to their respective websites. Also note this is Windows focused and this is by no means a complete list, but I feel its a good start for anyone interested in forensic analysis.</p>

<blockquote>
  <p>Don&#8217;t use a Sledgehammer to Hang a Picture &#8211; Use this <a href="http://praetorianprefect.com/wp-content/uploads/2009/12/tools.zip">comprehensive list of tools</a> for reference</p>
</blockquote>

<p>One last note before discussing the tools, it is important to know your situation and choose the right tool for the task at hand. You may grab the <a href="https://www.e-fense.com/store/index.php?_a=viewProd&amp;productId=11">Helix CD</a>, test it, and become very familiar with it where it becomes your tool of choice; but, know that it may not be suitable for all situations and you should have as many options as possible and be familiar with all that is available so you can be prepared with the right instruments. For instance, inserting the Helix CD may autorun the GUI menu system, then clicking through the menus to run acquisition tools generates many changes to the contents of memory, whereas a method to immediately run a memory acquisition tool would be less of an impact.</p>

<h3>Frameworks</h3>

<p>Let&#8217;s start by talking about what I refer to as forensics frameworks. These are programs or scripts that are wrappers to commands used to collect data. They organize a collection of common tools, handle the output of the tools, verify the tools are trusted, and provide some basic reporting. The Helix collection from e-fense includes several frameworks to choose from, including The Incident Response Collection Report (IRCR) by John McLeod, <a href="http://www.foolmoon.net/security/wft/">Windows Forensics Toolchest</a> (WFT) by Foolmoon Software and more. Another popular framework is by Harlan Carvey, author of Windows Forensic Analysis (Syngress Publishing) and the <a href="http://windowsir.blogspot.com/">Windows IR blog</a>, called the Forensic Server Project (FSP) which uses a client (FRUC) that runs the collection of tools and sends the output to a listening server (FSU).</p>

<p>I&#8217;ve also written a framework based on collating various features from the tool sets mentioned above as well as including some of my own ideas. The common theme in these, as in COFEE, is that they collect data using a suite of tools including commands available with the OS (such as netstat, net, systeminfo), Sysinternal utilities (such as pslist, listdlls, handle), and well-known utilities available freely (such as fport, autorunsc, pmdump, etc).</p>

<h3>Dealing with Memory</h3>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/compfor.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/compfor-150x150.jpg" alt="compfor" title="compfor" width="110" height="110" class="alignright size-thumbnail wp-image-2362" /></a>
Any actions on a system generated by the operating system or the user constantly change the contents of memory. Thus if the first thing you do on a live system is running tools, you will be significantly modifying the memory contents. A good detailed primer on physical memory analysis by Mariusz Burdach can be <a href="http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Burdach.pdf">found here</a>. An important fact to note is the possible hardware methods available to collect the contents of memory without interacting with the operating system. The tools I list in the spreadsheet for this purpose are software based, thus their execution and their changes to memory will be in the image that is captured.</p>

<h4>Acquisition</h4>

<p>To acquire an image containing the contents of memory, start by looking at the following two tools: <a href="http://www.shakacon.org/talks/NFI-Shakacon-win32dd0.3.pdf">WinDD by Matthieu Suiche</a> and <a href="http://www.mantech.com/MSMA/mdd.asp">MDD by ManTech International</a>. Both provide a CLI tool that can be incorporated into your preferred framework which can be used to create an image of the contents of physical memory prior to running additional tools. WinDD will create a raw dump or a crash dump file which can be analyzed with standard debugging tools like WinDbg from Microsoft. A commercial tool with a nice price point from HBGary called FastDump Pro acquires memory and includes probing features for malware analysis. The folks at HBGary state that <a href="https://www.hbgary.com/products-services/memory-forensics/fastdump/">Fastdump</a> has a lighter footprint than other tools and acquires the contents of <em>all</em> physical memory (a community version is available which works on 32-bit systems only).</p>

<h4>Analysis</h4>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_02-Dec.-15-19.54.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_02-Dec.-15-19.54.gif" alt="ScreenHunter_02 Dec. 15 19.54" title="ScreenHunter_02 Dec. 15 19.54" width="107" height="106" class="alignleft size-full wp-image-2371" /></a>Memory analysis has come a long way since running &#8220;strings&#8221; against an image created from a memory dump. <a href="http://www.certconf.org/presentations/2006/files/RB3.pdf">This presentation</a> notes how strings can produce 50 to 80 megabytes of unusable text from a 512MB memory dump. One exciting project, founded by 
<a href="https://www.volatilesystems.com/default/management">Aaron Walters</a>, is The Volatility Framework, an amazing collection of tools written in Python and used for analyzing memory dumps. With it, you can extract very specific data from the memory dump files obtained using the tools mentioned earlier (MDD, WinDD, etc). The screenshot shows how volatility pulls the process list from a memory dump called mal.dmp. Notice the last process on the list is actually MDD. <br /></p>

<div id="attachment_2375" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_03-Dec.-16-14.43.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_03-Dec.-16-14.43-300x241.gif" alt="Volatility Example" title="ScreenHunter_03 Dec. 16 14.43" width="300" height="241" class="size-medium wp-image-2375" /></a><p class="wp-caption-text">Volatility Example</p></div>

<p>Volatility can extract the following information:</p>

<ul>
<li>Image date and time</li>
<li>Running processes</li>
<li>Open network sockets</li>
<li>Open network connections</li>
<li>DLLs loaded for each process</li>
<li>Open files for each process</li>
<li>Open registry handles for each process</li>
<li>A process&#8217; addressable memory</li>
<li>OS kernel modules</li>
<li>Mapping physical offsets to virtual addresses (strings to process)</li>
<li>Virtual Address Descriptor information</li>
<li>Scanning examples: processes, threads, sockets, connections,modules</li>
<li>Extract executables from memory samples</li>
</ul>

<p>The framework is open source, fully written in python, and also modular in the use of plugins. <a href="http://mnin.blogspot.com/2009/12/new-and-updated-volatility-plug-ins.html">Michael Hale Ligh has produced some great plugins</a> including malfind2 which helps detect hidden/injected code in usermode processes. Here are some <a href="http://www.cc.gatech.edu/~brendan/volatility/">more plugins</a>, and <a href="http://jessekornblum.livejournal.com/246616.html">here is a plugin</a> that can help find TrueCrypt passphrases and suspicious processes.</p>

<h3>Registry</h3>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_04-Dec.-16-15.58.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_04-Dec.-16-15.58-150x150.gif" alt="ScreenHunter_04 Dec. 16 15.58" title="ScreenHunter_04 Dec. 16 15.58" width="75" height="75" class="alignleft size-thumbnail wp-image-2381" /></a>You wouldn&#8217;t spend time poking around in the registry during live analysis (many CLI tools, such as autorunsc.exe, will pull pertinent information automatically from the registry), but I wanted to include this section to talk about another great tool out there. This one is also by Harlan Carvey and is called <a href="http://regripper.net/">RegRipper</a>. RegRipper is intended for use against offline registry hive files to extract information from the registry helpful to your analysis. For example, you can extract data from the registry to determine USB disks previously used on the system or wireless networks joined. The examples are numerous and the use of plugins to extract particular keys and values for information make the tool very extensible. Harlan and many others have written various plugins for RegRipper.</p>

<h3>F-Response</h3>

<p><div id="attachment_2359" class="wp-caption alignleft" style="width: 74px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_01-Dec.-15-17.37.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/ScreenHunter_01-Dec.-15-17.37.gif" alt="F-Response" title="ScreenHunter_01 Dec. 15 17.37" width="64" height="58" class="size-full wp-image-2359" /></a><p class="wp-caption-text">F-Response</p></div>
A tool that I&#8217;m giving a section on its own to is F-Response which comes in several flavors (Enterprise, Consultant, Field Kit, and Tactical Editions). F-Response in a nutshell provides a client executable to be launched on the target machine which is then connected to using Microsoft&#8217;s iSCSI Initiator, providing read-only access to physical drives across the network. On 32-bit Windows systems, physical memory can be captured as well. This is very beneficial in that you can run any tools which analyze data on the hard drive remotely and in a read-only mode. <a href="http://forensicir.blogspot.com/2008/04/ripping-registry-live.html">This video</a> demonstrates how a target was inspected using F-Response and RegRipper.</p>

<h3>Disk Imaging</h3>

<p>There are many options for disk imaging, both live and offline. Here are some of the <br />popular commercial suites:
<a href="http://praetorianprefect.com/wp-content/uploads/2009/12/Picture1.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/Picture1.jpg" alt="Picture1" title="Picture1" width="148" height="113" class="alignright size-full wp-image-2400" /></a></p>

<ul>
<li><a href="http://www.accessdata.com/forensictoolkit.html">FTK</a></li>
<li><a href="http://www.guidancesoftware.com/encase-portable.htm">EnCase</a></li>
<li><a href="http://www.techpathways.com/prodiscoverdft.htm">ProDiscover</a></li>
<li><a href="http://www.x-ways.net/forensics/">X-Ways Forensics</a></li>
<li>and more&#8230;</li>
</ul>

<p>Choose the platforms that suit you as each package has its benefits, however I will go over a method that utilizes the freely available dd.exe with netcat. Yes, this is free, but this option may not suit you in many situations, such as attempting to image large disks in a certain time frame.</p>

<p>You need a computer which will have netcat listening and retrieve the disk image. On this machine, run netcat with the following options:</p>

<p><code>nc.exe -l -p 8888 -w 5 &gt; diskimage.dd</code></p>

<p>The <code>-l</code> puts netcat in listen mode, <code>-p</code> specifies the port number (8888 in the example) and <code>-w</code> specifies the timeout for connects and final net reads. Be sure that if this host has a firewall enabled, the port you specify is open for incoming connections.</p>

<p>On the workstation which you are taking a disk image from, you need to have dd.exe and nc.exe, which can be stored on a CD (such as Helix) or a USB thumb drive for use. If you are imaging an entire disk, you need the physical drive number for the dd command. In this example, we are imaging the OS drive, which is physical drive 0, and sending to a listening netcat instance created in the previous step, which has an IP address of 192.168.100.25:</p>

<p><code>dd if=\\.\PHYSICALDRIVE0 conv=noerror bs=1024 | nc.exe 192.168.100.25 8888</code></p>

<p>The <code>if</code> parameter specifies the input file to be imaged, in this case it is PHYSICALDRIVE0. The <code>conv=noerror</code> parameters tells dd to continue processing after read errors and the <code>bs=1024</code> specifies a buffer size of 1 megabyte. Since no output file is specified (<code>of</code>) we are piping to netcat and sending the data to the IP address listening on port 8888.</p>

<h3>Evidence Handling</h3>

<p>An <a href="http://gcn.com/articles/2004/08/16/justice-issues-guidelines-for-handling-digital-evidence.aspx">excerpt from Government Computer News</a> specifies that because digital data is easily altered and it is difficult to distinguish between original data and copies, extracting, securing and documenting digital evidence requires special attention. The guidelines lay out the following general principles for handling digital evidence:</p>

<ol>
<li>The process of collecting digital evidence should not alter it or raise questions about its integrity.</li>
<li>Examination of digital evidence should be done by trained personnel.</li>
<li>All actions in processing the evidence should be documented and preserved for review.</li>
<li>Examination should be conducted on a copy of the original evidence. The original should be preserved intact.</li>
</ol>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/Mission-Statement-Image.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/Mission-Statement-Image-150x150.jpg" alt="Mission Statement Image" title="Mission Statement Image" width="150" height="150" class="alignleft size-thumbnail wp-image-2405" /></a></p>

<p>The numbering above is not meant to signify priority, but rather for discussing each bullet point. Starting with number one, I&#8217;ve been a part of many discussions related to which tools are permissible in a court of law, and the answer is that evidence collected in a reliable manner and obtained legally is permissible. The reliable manner is where the tool becomes important. For example, if you are a hobbyist developer and wrote a tool to list processes with Visual Studio, you can be challenged on the accuracy of the processes running which you&#8217;ve collected. If you used pslist.exe from Sysinternals, verified the MD5 hash of the executable, and properly tagged, timestamped, labeled, and handled its output, you would have a better case in proving your process list is accurate and reliable.</p>

<p>Point number two specifies that trained personnel should be responsible for evidence examination. The point here is that systems administrators or related expertise on the operating system is not equivalent to &#8220;trained in forensic examinations&#8221;. Additionally, such internal IT resources may have difficulty being questioned and cross-examined in a court of law. One who is experienced specifically in digital forensics is better able to handle evidence and participate in the litigation.</p>

<p>Points three and four are related and involve documentation, and the processing and handling of the evidence. Every step taken in the analysis must be meticulously documented and timestamped. You should have a standard and repeatable process for this. A UK based firm has an editor type <a href="http://www.qccis.com/?section=casenotes">application</a> called Forensic CaseNotes to assist in documenting and tracking your case notes. In addition to careful documentation, an examination and analysis should be performed on duplicates. It is not dramatic step to take the original hard disk, and one additional hard disk containing an untouched block by block copy, and seal them in plastic bags marked with time, date, who collected the drives, and identification numbers. A third hard disk with a block by block copy can be used for further examination.</p>

<p>Proof of preservation can be maintained with MD5 hashing. In the exercise where we acquired an image of the hard disk, we can obtain an MD5 hash of the image file created and log that in our case notes. If that image is tampered with, the MD5 hash will change and the evidence is not reliable and thus can be dismissed. Output logs from the various tools run during an analysis should be hashed as well.</p>

<h3>Conclusion</h3>

<p>There is no conclusion to learning about digital forensics as the world of analysis techniques evolves and continuously changes. New operating system releases (Windows 7 and 2008 R2), progress in anti-forensics technologies, and sophistication of malware and rootkits continue to challenge forensic investigators. My purpose for this primer is to hopefully detract the sensationalism of COFEE being released, and DECAF to counter it, and take a look at some great aspects of forensic tools that are out there and continue to grow.</p>

<h3>Updates</h3>

<p>The intention of this article was to reflect on some of the great tools out there that have been around and growing before any word of COFEE. I feel its important to understand what is available and how it works, but one thing I did not touch on was that the tools are a just a subset of the overall <em><strong>process</strong></em>, and it is the process you use in your investigation that is critical to your analysis. Harlan provides some good examples of this in his latest <a href="http://windowsir.blogspot.com/2009/12/when-tool-is-just-tool-pt-i.html">blog entry</a>.</p>

<h3>References</h3>

<ul>
<li><a href="http://www.forensicfocus.com/">Forensic Focus</a></li>
<li><a href="https://www.volatilesystems.com/">Volatile Systems</a></li>
<li><a href="http://windowsir.blogspot.com/">Windows IR Blog</a></li>
<li><a href="http://www.forensicswiki.org/wiki/Main_Page">Forensics Wiki</a></li>
</ul>

<p><strong>Related Posts:</strong></p>
<ul>
<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/01/the-aurora-ie-exploit-in-action/">The &#8220;Aurora&#8221; IE Exploit Used Against Google in Action</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/scareware-purveyors-spammers-and-crooks-take-advantage-of-haiti-earthquake/">Scareware Purveyors, Spammers, and Crooks Take Advantage of Haiti Earthquake</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/baidu-com-the-latest-victim-of-iranian-cyberarmy/">Baidu.com the Latest Victim of Iranian CyberArmy</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/junos-juniper-flaw-exposes-core-routers-to-kernal-crash/">JUNOS (Juniper) Flaw Exposes Core Routers to Kernel Crash</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/12/forensics-beverages-aside-a-look-at-incident-response-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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>
