<?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; Forensics</title>
	<atom:link href="http://praetorianprefect.com/archives/tag/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>WinPE 3.0 &amp; Forensics</title>
		<link>http://praetorianprefect.com/archives/2010/04/winpe-3-0-forensics/</link>
		<comments>http://praetorianprefect.com/archives/2010/04/winpe-3-0-forensics/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 22:46:49 +0000</pubDate>
		<dc:creator>Simon Price</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=3608</guid>
		<description><![CDATA[It is a common task for an investigator to boot a machine using bootable media in the form of DVD or USB and there are countless options available. This tutorial is not intended to replace your favorite Helix CD or preferred method, but you may find this analysis interesting if you are a Windows expert performing a forensics analysis.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/glass1.png"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/glass1-150x150.png" alt="glass1" title="glass1" width="150" height="150" class="alignleft size-thumbnail wp-image-3711" /></a></p>

<p>It is a common task for a computer forensics investigator to boot a machine using boot-able media in the form of DVD or USB and there are countless options available. This tutorial is not intended to replace your favorite Helix CD or preferred method, but you may find this analysis interesting if you are a Windows expert performing a forensics analysis.</p>

<p>Windows PE (Pre-installation Environment) is a minimal Win32 based operating system, typically used for automating deployments by booting into PE via local or PXE boot methods and then imaging or running installations of various operating systems. Version 3.0 of PE included in the latest Windows Automated Installation Kit (AIK) is based on the Windows 7 kernel.</p>

<h3>Getting Started</h3>

<p>To get started, you need the AIK which can be downloaded from <a href="http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&amp;displaylang=en">the Microsoft web site</a>. After the installation, you will need to begin working on creating and customizing a WinPE image for your forensics boot disc/drive.</p>

<h4>Make WinPE into WinFE</h4>

<p>If you used WinPE as is and booted it up, it would mount available disks and may lead you in the wrong direction in terms of preserving evidence by changing the state of the drives. WinFE, which stands for Windows Forensics Environment, is based on a document written by Troy Larson, a Forensics Specialist at Microsoft. When this <a href="http://www.twine.com/item/113421dk0-g99/windows-fe">document</a> was written, it was geared toward WinPE 2.1, so there are a few differences in some of the steps I will document in this post, which is intended for version 3.0.</p>

<p>The point of WinFE is that the PE environment boots without mounting physical disks. You can then use imaging tools to capture the disk or mount it in read-only mode to run some tools against the target OS immediately without modification to data in the environment, which in this case could be evidence.</p>

<h4>Let&#8217;s get to it</h4>

<div id="attachment_3623" class="wp-caption alignright" style="width: 185px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/copype.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/copype-150x150.jpg" alt="copype" title="copype" width="175" height="150" class="alignright size-thumbnail wp-image-3614" /></a><p class="wp-caption-text">CopyPE Command</p></div>

<p>Begin by launching the Deployment Tools Command Prompt (as an administrator). In the following examples, I am using c:\temp\winFE as the path where my PE image is processed, built, etc. The first step is to generate the basic structure and .wim file:</p>

<pre><code>copype.cmd x86 c:\temp\winFE
</code></pre>

<p>This command will create the Windows PE customization working directory. The next step is to mount the default image file so that you can then make some necessary changes: including changing the registry settings to ensure disks are not mounted at bootup and to add any tools or software you need. AIK Version 3.0 includes dism.exe, which replaces peimg.exe, and can be used to mount and unmount images like imagex.exe:</p>

<pre><code>Dism /Mount-Wim /WimFile:c:\temp\winFE\winpe.wim /index:1 /MountDir:c:\temp\winFE\mount
</code></pre>

<div id="attachment_3623" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/dism-mount.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/dism-mount-300x50.jpg" alt="Mounting Image" title="dism-mount" width="300" height="50" class="size-medium wp-image-3623" /></a><p class="wp-caption-text">Mounting Image</p></div>

<p>This command mounts the PE image in the c:\temp\winfe\mount directory. If you navigate there, you&#8217;ll see a Windows directory which is the instance of PE that will boot when you finish the process. We need to make some registry changes to the PE registry to prevent mounting disks on start up.</p>

<ul>
<li>Open up the registry editor, highlight HKEY_LOCAL_MACHINE and click on File, Load Hive. </li>
<li>Browse to the mounted PE image and in the Windows\System32\Config directory, choose the file SYSTEM (no extension). </li>
<li>Choose a friendly name such as PE-System.</li>
</ul>

<p>Now under HKEY_LOCAL_MACHINE there will be another hive called PE-System. Make the following changes in this hive:</p>

<ul>
<li>Add NoAutoMount key to \ControlSet001\Services\MountMgr\ with a DWORD value 1</li>
<li>Add SanPolicy key to \ControlSet001\Services\partmgr\Parameters with a DWORD value 3</li>
</ul>

<p>Unload the hive by selecting it and clicking on File, Unload Hive.</p>

<h4>Branding</h4>

<p>Now with our registry changes made, we can make any additional customizations prior to closing up the image. You can &#8220;brand&#8221; your forensics boot with custom wallpaper by adding winpe.bmp to the mount\Windows\System32 directory.</p>

<h4>Required Tools</h4>

<p>With the image mounted, anything you add to c:\temp\winFE\mount (or if you modified it, the directory you used for the mount) will be a part of the image and boot with your PE boot. For example, I like to create a Tools directory under mount, and in there place tools such as FTK Imager Lite, dd, and netcat. You can of course add any tools of your choice.</p>

<p>If you are familiar with <a href="http://www.regripper.net/">Regripper</a>, this would be a good place to have it as you can get some information from the registry before starting any imaging process. You can add a portable version of Perl, such as <a href="http://strawberryperl.com/releases.html">Strawberry Perl</a> to the tools directory, and add the Regripper tools. I&#8217;ll show Regripper in an example later when booting WinFE.</p>

<p>For tools that require a CYGWIN environment, you can add <a href="http://sourceforge.net/projects/cygwinportable/">use this</a> portable version of CYGWIN and have this environment available in PE.</p>

<h4>Custom Scripts</h4>

<p>Being that this is a Windows environment, you can write some VBS/WMI scripts to gather some information as well. Since WMI is not added by default to the base WinPE image, you have to add this package:</p>

<pre><code>dism.exe /image:c:\temp\winFE\mount /add-package
/packagepath:"c:\Program Files\Windows AIK\Tools\PETools\x86\winpe-wmi.cab"
</code></pre>

<div id="attachment_3640" class="wp-caption aligncenter" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/wmi-add.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/wmi-add-300x73.jpg" alt="Adding WMI Package" title="wmi-add" width="300" height="73" class="size-medium wp-image-3640" /></a><p class="wp-caption-text">Adding WMI Package</p></div>

<p>I also added hta and scripting support:</p>

<pre><code>dism.exe /image:c:\temp\winFE\mount /add-package
/packagepath:"c:\Program Files\Windows AIK\Tools\PETools\x86\winpe-hta.cab"
/packagepath:"c:\Program Files\Windows AIK\Tools\PETools\x86\winpe-scripting.cab"
</code></pre>

<div id="attachment_3656" class="wp-caption aligncenter" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/scripting-hta-add.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/scripting-hta-add-300x95.jpg" alt="Add Scripting and HTA packages" title="scripting-hta-add" width="300" height="95" class="size-medium wp-image-3656" /></a><p class="wp-caption-text">Add Scripting and HTA packages</p></div>

<p>Here are two examples of some WMI queries you can use in your forensics boot:</p>

<ul>
<li><a href='http://praetorianprefect.com/wp-content/uploads/2010/04/BIOS.txt'>BIOS.vbs</a> &#8211; Retrieves information about the system BIOS.</li>
<li><a href='http://praetorianprefect.com/wp-content/uploads/2010/04/disk.txt'>disk.vbs</a> &#8211; Retrieves information about disks.</li>
</ul>

<h4>Powershell?</h4>

<p>A major issue I have with WinPE is Microsoft&#8217;s failure to provide a supported dotNet option. This removes any possibility of using powershell or creating custom applications with VB.Net. This leaves us with vbs/wmi/VB6 until dotNet support is available.</p>

<h4>Finalize the Image</h4>

<p>Once the registry changes are made and you&#8217;ve added all your tools and software into the mounted directory, you write and close the image:</p>

<div id="attachment_9999" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/dism-unmount.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/dism-unmount-300x78.jpg" alt="Unmount the Image" title="Unmount the Image" width="300" height="78" class="alignright size-medium wp-image-3667" /></a><p class="wp-caption-text">Unmount the Image</p></div>

<pre><code>Dism /Unmount-Wim /MountDir:C:\winpe_x86\mount\ /Commit
</code></pre>

<p>Note that this isn&#8217;t final, you can always mount the image again, make changes, add new analysis software, etc. using the same steps above, then commit the changes and create a new ISO file.</p>

<p>Copy the resulting winpe.wim file (c:\temp\winfe) into ISO\Sources\boot.wim:</p>

<pre><code>copy c:\temp\winfe\winpe.wim c:\temp\winfe\iso\sources\boot.wim /Y
</code></pre>

<h3>Generate the ISO</h3>

<p>With our image ready, it&#8217;s time to generate the ISO. First, we don&#8217;t want the usual &#8220;Hit any key to boot from CD message&#8221; as we don&#8217;t want to risk booting from the local disks. To eliminate this message, delete the file bootfix.bin from the ISO\boot directory (c:\temp\winFE\ISO\boot).</p>

<pre><code>oscdimg -n -bc:\temp\winFE\etfsboot.com c:\temp\winFE\ISO c:\temp\winFE\forensics-boot.iso
</code></pre>

<p>This ISO file can now be burned to CD/DVD or used in a VM environment to test it out. If you intend to use a USB drive, you can prepare it by doing the following:</p>

<ul>
<li>In a command prompt, run diskpart

<ul>
<li>select disk #  (the # should refer to the USB disk, use &#8220;list disk&#8221; to determine)</li>
<li>clean</li>
<li>create partition primary</li>
<li>select partition 1</li>
<li>active</li>
<li>format fs=fat32</li>
<li>assign</li>
</ul></li>
<li>Then, copy the contents of the ISO directory to the USB disk

<ul>
<li>xcopy c:\temp\winFE&#92;iso&#92;&#42;.&#42; /s /e /f e:\ (change e: to reflect the drive of your USB key)</li>
</ul></li>
</ul>

<h3>Let&#8217;s Boot</h3>

<div id="attachment_3673" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/booting.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/booting-300x233.jpg" alt="Booting WinFE" title="booting" width="300" height="233" class="size-medium wp-image-3673" /></a><p class="wp-caption-text">Booting WinFE</p></div>
<br /></p>

<p>Take your WinFE boot-ready device and boot a workstation, VM, or machine of your choice. I had a Windows XP VMWare instance which was my target device to investigate. I configured VMWare to use the ISO for the CD-ROM device and rebooted it.</p>

<p>At first glance, it will look just like Windows 7 booting. Remember, WinPE 3.0 is based on the Windows 7 kernel. When booted, your custom wallpaper configured earlier in the post will display with a command prompt and you will be in the \Windows\System32 directory. This directory is part of the PE operating system, not the target OS which we will analyze. Change to the root directory and will you will see any directories created (such as Tools) when we customized the PE. 
<br /><br /><br /><br /></p>

<p><div id="attachment_3675" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/diskpart-list.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/diskpart-list-300x116.jpg" alt="Checking drives in Diskpart" title="diskpart-list" width="300" height="116" class="size-medium wp-image-3675" /></a><p class="wp-caption-text">Checking drives in Diskpart</p></div>
<br /><br /></p>

<p>We can double check that the registry key worked and did not mount our target drive. Run diskpart, then type &#8220;list vol&#8221;. You will see a Volume which is Offline and has no drive letter, perhaps more than one. These are drives we may want to mount read-only and analyze. My VM has a single 8GB drive which is Volume 1, so that is my target.
<br /><br /></p>

<p><div id="attachment_3681" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/diskpart-readonly.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/diskpart-readonly-300x191.jpg" alt="Set your disk to Read-only" title="diskpart-readonly" width="300" height="191" class="size-medium wp-image-3681" /></a><p class="wp-caption-text">Set your disk to Read-only</p></div>

<p>Let&#8217;s get this mounted in read-only mode so we can poke around and get some preliminary information prior to imaging. In diskpart, select the target volume (select vol), then set it to readonly (att vol set readonly). Now we can double check with the &#8220;detail vol&#8221; command where &#8216;Read-only&#8217; should specify &#8216;Yes&#8217;. We can mount this by assigning a drive letter (let&#8217;s assign letter=F). The F: drive is not available in read-only mode, preserving the evidence but giving access to the data that can be beneficial. In testing this process, try to write to the mounted drive (see screenshot for example). The message will come back &#8220;The media is write protected&#8221; if everything is set up properly.</p>

<h3>Analyze This</h3>

<p>Depending on how you customized your WinFE image, and what tools you added, you have many options to gather some information that can be useful prior to the potential time consuming imaging process. I mentioned RegRipper before, this tool can be used to get valuable information from the registry of our target. You could use other varieed tools to gather initial data or go straight to imaging software such as FTK Imager Lite. Here are some screenshots of the various tools running in WinFE:</p>

<div id="attachment_3689" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/rr.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/rr-300x234.jpg" alt="RegRipper in WinFE w/ Strawberry Perl" title="rr" width="300" height="234" class="size-medium wp-image-3689" /></a><p class="wp-caption-text">RegRipper in WinPE w/ Strawberry Perl</p></div>
<div id="attachment_3692" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/ftk.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/ftk-300x235.jpg" alt="FTK Imager Lite" title="ftk" width="300" height="235" class="size-medium wp-image-3692" /></a><p class="wp-caption-text">FTK Imager Lite</p></div>
<br /><br /></p>

<p><div id="attachment_3694" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/cygwin.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/cygwin-300x234.jpg" alt="CygWin in WinFE" title="cygwin" width="300" height="234" class="size-medium wp-image-3694" /></a><p class="wp-caption-text">CygWin in WinFE</p></div>

<div id="attachment_3697" class="wp-caption alignright" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/04/fau.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/04/fau-300x234.jpg" alt="VolumeDump from George M. Garner Jr&#039;s FAU" title="fau" width="300" height="234" class="size-medium wp-image-3697" /></a><p class="wp-caption-text">VolumeDump from George M. Garner Jr's FAU</p></div>

<h3>Finally</h3>

<p>Ultimately, this was an exercise in reviewing ways that WinPE can be used for forensic purposes. It is another option to be aware of, and for those who are more apt to a Microsoft environment this may be your preferred boot method. Hopefully, Microsoft will create a dotNet cab file that can be added as a package to WinPE, as this would create further options for creating Win32 dotNet programs to run within the WinFE environment and opening up Powershell for scripting within WinPE.</p>

<hr />

<h3>UPDATES</h3>

<p>16 April 2010 &#8211; Brett Shavers shared a <a href="http://www.forensicfocus.com/downloads/WinFE.pdf">link</a> with us that includes a great instructional PDF and even a batch file to create the WinFE ISO for you.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/">Reactivating DECAF in Two Minutes</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/2010/04/winpe-3-0-forensics/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<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>
		<item>
		<title>The Perfect Crime, the perfect alibi: My Facebook Status</title>
		<link>http://praetorianprefect.com/archives/2009/11/the-perfect-crime-the-perfect-alibi-my-facebook-status/</link>
		<comments>http://praetorianprefect.com/archives/2009/11/the-perfect-crime-the-perfect-alibi-my-facebook-status/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 13:44:22 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Law]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[I fought the law]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[WTF]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1618</guid>
		<description><![CDATA[The NY Times brings us the story of Rodney Bradford. He&#8217;s the 19 year old Brooklyn man whose lawyer, Robert Reuland, invoked one of the first known &#8220;Facebook alibis&#8221; in his defense of the 19 year old Bradford on what were a second set of robbery charges he was facing. Since the Facebook defense is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/facebook_kid.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/facebook_kid-150x150.jpg" alt="facebook_kid" title="facebook_kid" width="150" height="150" class="alignleft size-thumbnail wp-image-1676" /></a>The <a href="http://fort-greene.blogs.nytimes.com/2009/11/11/his-facebook-status-now-charges-dropped">NY Times</a> brings us the story of Rodney Bradford. He&#8217;s the 19 year old Brooklyn man whose lawyer, Robert Reuland, invoked one of the first known &#8220;Facebook alibis&#8221; in his defense of the 19 year old Bradford on what were a second set of robbery charges he was facing. Since the Facebook defense is now on the record, I&#8217;m going to lay out my plans for knocking over a liquor store without consequences.</p>

<p>At 11:49am on October 17th an update was made to Bradford&#8217;s Facebook profile: &#8220;WHERE MY IHOP?&#8221;, a message to his pregnant girlfriend. This update was one minute before two men were robbed at gun point in the Farragut Houses in Brooklyn where Bradford lives. At the time of this robbery, the robbery he faced charges for, Bradford claims he was sitting at the computer at his father&#8217;s apartment in Harlem making this Facebook update despite his being identified by a witness at the Farragut Houses.</p>

<blockquote>
  <p>&#8220;If it wasn&#8217;t for Facebook I&#8217;d still be on Rikers Island.&#8221; <br />Rodney Bradford</p>
</blockquote>

<p>So like any good defense attorney would, Reuland pointed out to Brooklyn District Attorney Lindsay Gerdes that his client could not possibly be in two places at the same time, and look, here is the evidence on Facebook that he was sitting at the computer at his father&#8217;s place. The DA subpoenaed Facebook to verify the location where the status update was made from, Facebook verified it, and the charges were dropped.</p>

<p><div id="attachment_1677" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/facebook_kid_homepage.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/facebook_kid_homepage-300x245.jpg" alt="The newly donned &quot;Facebook Kid&#039;s&quot; Facebook page." title="facebook_kid_homepage" width="300" height="245" class="size-medium wp-image-1677" /></a><p class="wp-caption-text">The Facebook Kids Facebook page.</p></div>
<br /><br />
Mr. Reuland does acknowledge that anyone who knew Bradford&#8217;s user name and password could make the updates. But he responds: “This implies a level of criminal genius that you would not expect from a young boy like this; he is not Dr. Evil,” and notes the Facebook alibi was just “the icing on the cake,”. But making the effort to subpoena Facebook and comments by Jonah Bruno, a spokesman for the Brooklyn Assistant DA&#8217;s office acknowledging that the Facebook component was a key reason for dropping the charges, indicate that the Facebook status update time played a predominant role in the decision by the district attorney&#8217;s office to drop the charges. Also remember that with the existing elements of the alibi, Bradford remained in jail on Rikers Island, it was when the Facebook piece came in that he was released.
<br /></p>

<h3>Facebook Magic</h3>

<pre><code>The district attorney subpoenaed Facebook to verify that the status update had actually been typed from 
a computer located at 71 West 118th Street in Harlem.
</code></pre>

<p>Source: <i><a href="http://fort-greene.blogs.nytimes.com/2009/11/11/his-facebook-status-now-charges-dropped/">NY Times</a></i></p>

<blockquote>
  <p>&#8220;Facebook saved my son.&#8221; Ernestine Bradford</p>
</blockquote>

<p>The above is interesting. It is interesting because there is no way Facebook could tell with certainty that an update was made from the computer at 71 West 118th Street. In fact they could only reasonably make such an educated guess through forensic evaluation of the computer in Harlem itself. They didn&#8217;t do that, they looked at their own information (likely some combination of site cookies read and web server logs) and decided that the update came from there. While IP (internet protocol) addresses used from the home are not technically static, they can remain the same assignment for days from an ISP providing cable, FIOS, or similar. So Facebook can say that the IP address of the party making the request to its web servers is the same as previous accesses and can approximate the geo-location of the IP. That assumes no use of a proxy or anonymizer.</p>

<h3>Technologists Lurking in the NYT Comments</h3>

<p>The comments from NY Times blog readers are telling. While some are ridiculous &#8211; <i>he probably just used his phone to make the update</i> (the phone browsers can usually be fingerprinted in the web server logs, the IP would show a phone network)- some are legitimate. Why couldn&#8217;t a friend have updated Facebook for him, maybe he used RDP to login (its built into Windows XP, just needs to be enabled), maybe VNC, maybe an SSH tunnel, and so on are all listed possibliities.</p>

<blockquote>
  <p>&#8220;This was just a very strong alibi&#8230;It reflects the pervasiveness that Web sites and social networking has on our lives.&#8221; <br />Bradford&#8217;s lawyer, Robert Reuland</p>
</blockquote>

<p>The problem (for a non-technical user) with VNC or RDP is that they need to be installed on most phones, and the SSH tunnel while not complicated would not be a readily available option to a non-computer literate person. RDP is on Windows XP, but it would have to be enabled, and his lawyer is telling us that his client is not a computer guy. The friend updating Facebook? That&#8217;s low tech and easy, but for my money I don&#8217;t want to involve any extra parties, collusion makes crime harder.</p>

<h3>The Perfect Crime</h3>

<p>So now that I know I can invoke the Facebook defense, how do I want to approach it? Let&#8217;s say I decide I want to knock over a liquor store. I have my mask and so forth, but I also want to establish my alibi, that I was 30 miles away at my computer doing some social networking on Facebook. I could get in remotely from my mobile device (VNC, RDP, etc.) but I don&#8217;t want to be worrying about that while I&#8217;m emptying the register. As I mentioned before, my buddies can&#8217;t keep a secret, so I&#8217;m not letting them update Facebook either.</p>

<p>So I started with the following PHP script using curl (JD McCloud, python guru, is groaning at the desk next to me over the use of PHP). I fired up <a href="http://www.owasp.org/index.php/OWASP_WebScarab_Project">WebScarab</a>, the great intercepting proxy from <a href="http://www.owasp.org">OWASP, the Open Web Application Security Project</a>, and captured the full HTTP header that is part of a Facebook status update request. Snagging the request URL, Facebook cookies, and POST options sent with the request, I setup the PHP script below to essentially replay a Facebook status update request.</p>

<p>Note that I&#8217;ve removed the content specific to my profile. I don&#8217;t have the script logging in to Facebook. If I needed to I would have, but fortunately Facebook has a &#8220;Keep me logged in&#8221; radial button on its homepage, so I didn&#8217;t bother.</p>

<pre><code>&lt;?php

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5)
 Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)");

curl_setopt($ch, CURLOPT_COOKIE, 'datr=; s_vsn_facebookpoc_1=; __utma=; __utmz=.utmccn=
(referral)|utmcsr=|utmcct=|utmcmd=; s_vsn_facebookpocads_1=; locale=en_US; __qca=; x-referer=; 
cur_max_lag=; lsd=; h_user=; __utmc=; c_user=; lxe=; lxr=; sid=; xs=; presence=');

curl_setopt($ch, CURLOPT_POSTFIELDS,'action=PROFILE_UPDATE&amp;profile_id=&amp;status=I said where are my 
pancakes!&amp;target_id=&amp;app_id=&amp;&amp;composer_id=&amp;display_context=profile&amp;post_form_id=&amp;fb_dtsg=&amp;
_log_display_context=profile&amp;ajax_log=1&amp;post_form_id_source=AsyncRequest&amp;__a=1');

curl_setopt($ch, CURLOPT_URL, 'http://www.facebook.com:80/ajax/updatestatus.php');
curl_exec($ch);
?&gt;
</code></pre>

<p>Now I just add a Scheduled Task (Programs > Accessories > System Tools > Scheduled Tasks) or use <a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/at.mspx">At</a> to run the program at the time I&#8217;m scheduled to do the stick up, and I&#8217;m all set. Facebook will note dutifully that a status update request came to them using the FireFox browser from an IP roughly around where I claimed to be. As long as no one actually checks my PC&#8230;</p>

<h3>Oh C&#8217;mon Now</h3>

<p>Yes I know what you&#8217;re thinking. I said that accessing the PC remotely was probably too complex (in reality I have no idea) for Mr. Bradford, and now I&#8217;m pitching writing scripts. I agree, if you are not a computer person, this would be out of reach. So how about another approach?</p>

<p><a href="http://coscripter.researchlabs.ibm.com/coscripter">CoSripter</a>, now owned by IBM, is pretty non-technical. Download a Firefox plugin, record your activities as you login to Facebook and update your status, and save the script that is generated. And if a person can&#8217;t follow those instructions, they can always watch the <a href="http://coscripter.researchlabs.ibm.com/coscripter/browse/video">video tutorial</a>. Here is the script that is automatically generated as I go through a login and status update on Facebook:</p>

<pre><code>    * go to “http://www.facebook.com/index.php”
    * pause 3600 seconds
    * enter your “e-mail address” into the “Email” textbox
    * enter your password into the “Keep me logged in Forgot your password?” textbox
    * click the “Login” button
    * click the “Profile” link
    * enter "I said where the hell are my pancakes" in the “What’s on your mind?” textbox
    * click the first “Share” button
</code></pre>

<p>Its fairly easy to see what we&#8217;re doing above, I&#8217;ve set up variable names for my e-mail and password, but even that is very straight forward, and its only if you want to protect your credentials. Since you have recorded everything that generates the script, you only have to do one manual change, the line &#8220;pause 3600 seconds&#8221;. Remember, my robbery is 30 miles away, so I&#8217;m running my script, but giving myself an hour to get myself over to the liquor store. At exactly one hour from the time I kicked this off in Firefox I&#8217;m grabbing twenties from the tray and Facebook is seeing an update from FireFox in their logs for user &#8220;me&#8221; with the status update above. Facebook dutifully reports that I couldn&#8217;t have committed the robbery, I was still wondering where my pancakes where.</p>

<h3>Facebook et al. and the Law</h3>

<p>As social networking has taken hold as a cultural phenomenon, so too will its use in the proceedings of the legal system. There have been other uses of Facebook and other social networking sites in legal proceedings that have a great deal more legitimacy. There is <a href="http://www.journal-news.net/page/content.detail/id/525232.html">the jackass in Pennsylvania who checked his Facebook status during a robbery</a> on the victim&#8217;s computer and left the page open. There&#8217;s the Indiana murder case where <a href="http://www.ediscoverylaw.com/2009/10/articles/case-summaries/indiana-supreme-court-rules-trial-court-properly-admitted-evidence-of-defendants-myspace-page-in-murder-trial/">a MySpace description</a> was used as character evidence. The things people write online can be used against them in employment or divorce cases.</p>

<p>But with all that said, nativity with social networking tools like Facebook must not be misinterpreted as an actual understanding of the way web applications and computers work. I hope Facebook with their technical understanding of the boundaries of their network responded to that subpoena with a voluminous explanation that what they were providing was in fact proof of very little, proof only that their web servers had received a request looking like this at a certain time. I hope that Robert Reuland is the only defense attorney who is able to pull a fast one (exactly what he is paid to do) presenting Facebook status updates as forensically sound and acceptable evidence of a person&#8217;s location. Finally, I hope Mr. Bradford gets his pancakes.</p>

<h3>What&#8217;s your approach?</h3>

<p>There are plenty of other ways to approach this, and thus go on a consequences free international crime spree thanks to Facebook. How are you going to approach it?</p>

<h3>Update</h3>

<p>Bradford hired a civil attorney, Herbert L. Schmell, who says that they&#8217;re &#8220;99.9 percent sure&#8221; that they will sue the city for a false arrest/imprisonment.</p>

<h3>References</h3>

<ul>
<li><a href="http://fort-greene.blogs.nytimes.com/2009/11/11/his-facebook-status-now-charges-dropped/">His Facebook Status Now? ‘Charges Dropped’</a></li>
<li><a href="http://www.nypost.com/p/news/local/brooklyn/facebook_alibi_saves_jailed_teen_FCfvxWbwZOC4CCcgmG8RbI#ixzz0WhEfVDNl">Facebook alibi saves jailed teen</a></li>
</ul>

<p><strong>Related Posts:</strong></p>
<ul>
<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>
<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>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/11/the-perfect-crime-the-perfect-alibi-my-facebook-status/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Taxonomy of Forensics Geeks</title>
		<link>http://praetorianprefect.com/archives/2009/11/taxonomy-of-forensics-geeks/</link>
		<comments>http://praetorianprefect.com/archives/2009/11/taxonomy-of-forensics-geeks/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 22:12:25 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Forensics]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1601</guid>
		<description><![CDATA[Have you met these types in the forensics forums, lurking in your blog comments, or anywhere else on the Intertubes: The Back-Door Man who knows that MSFT has stealth back doors in Windows, or the Man of Few Words with his pithy &#8220;One word: TrueCrypt&#8221; style comments?  Happy as a Monkey breaks it all [...]]]></description>
			<content:encoded><![CDATA[<p>Have you met these types in the forensics forums, lurking in your blog comments, or anywhere else on the Intertubes: The Back-Door Man who knows that MSFT has stealth back doors in Windows, or the Man of Few Words with his pithy &#8220;One word: TrueCrypt&#8221; style comments?  <a href="http://happyasamonkey.wordpress.com/2009/11/11/computer-forensics-in-the-geek-press-a-taxonomy/">Happy as a Monkey</a> breaks it all down for us.</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/2010/03/microsoft-ie-6-7-zero-day-aside/">Microsoft IE 6 &#038; 7 Zero-day (Aside)</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/microsoft-posts-advanced-notification-for-out-of-band-patch/">Microsoft Posts Advanced Notification for Out of Band Patch</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/smb-bug-wont-be-patched-in-january/">SMB Bug won&#8217;t be patched in January</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/12/reactivating-decaf-in-two-minutes/">Reactivating DECAF in Two Minutes</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/11/taxonomy-of-forensics-geeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More COFEE Please, on Second Thought&#8230;</title>
		<link>http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/</link>
		<comments>http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 17:24:49 +0000</pubDate>
		<dc:creator>Simon Price</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/archives/2009/11/more-cofee-please-on-second-thought/</guid>
		<description><![CDATA[The forensics tool provided to law enforcement officials created by Microsoft called COFEE&#160; (Computer Online Forensic Evidence Extractor) has been leaked on torrents last week, and this has caused quite a bit of excitement.&#160; Let’s see if the big deal is warranted.]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption" style="float: right;margin: 5px;margin-left: 60px;margin-right: 21px;"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/938024.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="938-024" border="0" alt="938-024" align="right" src="http://praetorianprefect.com/wp-content/uploads/2009/11/938024_thumb.jpg" width="113" height="166" /></a></div> The forensics tool provided to law enforcement officials created by Microsoft called COFEE&#160; (Computer Online Forensic Evidence Extractor) has been leaked on torrents last week, and this has caused quite a bit of excitement.&#160; Let’s see if the big deal is warranted.</p>

<p>The software is made up of three components or phases: </p>

<ul>   <li>The tool generation phase which is meant for the more tech-savvy forensics examiner to setup a profile which is exported to a USB disk. This is a simple decision making process of which tools and parameters should be setup to run from the USB drive. </li>    <li>The data acquisition phase which is meant for the non-technical law enforcement folks who arrive on the scene to collect evidence. They use the USB disk configured in the tool generation phase which runs through a set of common tools to gather volatile data, such as running processes, etc and saves the output from each command. </li>    <li>The report generation phase is once again meant for the tech-savvy.&#160; It uses the same GUI console as the tool generation phase, but this time to view the reports which are generated from the output of the tools run from the USB disk. </li> </ul>

<p>I’ve been reading some of the news articles, blogs, and related comments on the issue of the software being leaked and how the hackers now have more ammunition, by seeing how COFEE works they can improve malicious code to avoid or misrepresent data.&#160; However, COFEE is not very special.&#160; Aside from being provided by Microsoft, it really doesn’t do much more than the other forensics toolkits out there.&#160; For example, IRCR (Incident Response Collection Report) by John McLeod, the Windows Forensics Toolchest by Monty McDougal, Harlan Carvey’s FSP (Forensic Server Project) , and a forensics toolkit called PTN-FT that I’ve written myself, all operate on the same basis of providing a forensics framework which allows you to configure a list of commands used to collect volatile data and save the output for use in some reporting format or a format that can be uploaded to a database for analysis. </p>

<p><a rel="lightbox" href="http://praetorianprefect.com/wp-content/uploads/2009/11/ScreenHunter_01Nov.0911.30.gif"><img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ScreenHunter_01 Nov. 09 11.30" border="0" alt="ScreenHunter_01 Nov. 09 11.30" align="right" src="http://praetorianprefect.com/wp-content/uploads/2009/11/ScreenHunter_01Nov.0911.30_thumb.gif" width="244" height="194" /></a> Microsoft provides a GUI for tool selection (see figure) whereas most toolkits use a config file or batch file to modify tool selection and parameters.&#160; It appears even the configuration of the USB disk comes with an easy to use interface.&#160; In addition to the tools preconfigured, you can add tools from your own collection.</p>

<p>One feature I found to be useful from COFEE is the random generation of the tool name.&#160; While most toolkits out there will use tools from a good source (such as the Helix CD), Microsoft goes a step further in renaming the tools to random generated names, causing no doubt that the intended version of the tool is running.&#160; </p>

<p><br /></p>

<p><a rel="lightbox" href="http://praetorianprefect.com/wp-content/uploads/2009/11/ScreenHunter_02Nov.0911.46.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ScreenHunter_02 Nov. 09 11.46" border="0" alt="ScreenHunter_02 Nov. 09 11.46" src="http://praetorianprefect.com/wp-content/uploads/2009/11/ScreenHunter_02Nov.0911.46_thumb.gif" width="244" height="190" /></a></p>

<p>The output format is in XML and when loaded&#160; into the GUI, gives a view to the information as seen in the figure on the left. As mentioned, this is not ground-breaking forensics technology as many toolkits give a nice view into the output data by framing it in HTML.</p>

<p>More of the same in terms of forensics toolkits, COFEE keeps hashes of the tools in a checksum file and also has multiple directories for OS specific tools (\winxp, \win2k03, etc). According to the documentation, it is not supported on Vista and Windows 7, but apparently a new version is planned for those operating systems. </p>

<div id='extendedEntryBreak' name='extendedEntryBreak'></div>

<p></p>

<h3>Conclusion</h3>

<p>The conclusion is that the excitement is not warranted.&#160; There is nothing groundbreaking in COFEE that has not been seen in other toolkits.&#160; It may even come short in some areas as I did not see any methods of memory dumps or capturing of the prefetch directory.&#160; The excitement is rather because this piece of software has been difficult to obtain, even by law enforcement, and that both forensics experts and the anti-forensics communities has been curious to see what Microsoft themselves had to provide in this space.&#160; Personally, I will pass on this cup of COFEE and continue using my own forensics framework along with the others I mentioned earlier.</p>

<p>&#160;</p>

<p>&#160;</p>

<hr />

<p>Default tools &amp; parameters launched by COFEE:</p>

<p><pre><code>arp.exe ‐a&#160; <br />at.exe&#160;&#160;&#160; <br />autorunsc.exe&#160;&#160;&#160; <br />getmac.exe&#160;&#160;&#160; <br />handle.exe ‐a&#160; <br />hostname.exe&#160;&#160;&#160; <br />ipconfig.exe&#160; /all&#160; <br />msinfo32.exe&#160; /report %OUTFILE%&#160; <br />nbtstat.exe ‐n&#160; <br />nbtstat.exe ‐A 127.0.0.1&#160; <br />nbtstat.exe ‐S&#160; <br />nbtstat.exe ‐c&#160; <br />net.exe&#160; share&#160; <br />net.exe&#160; use&#160; <br />net.exe&#160; file&#160; <br />net.exe&#160; user&#160; <br />net.exe&#160; accounts<br />net.exe&#160; view&#160; <br />net.exe&#160; start&#160; <br />net.exe&#160; Session&#160; <br />net.exe&#160; localgroup administrators /domain&#160; <br />net.exe&#160; localgroup&#160; <br />net.exe&#160; localgroup administrators&#160; <br />net.exe&#160; group&#160; <br />netdom.exe&#160; query DC&#160; <br />netstat.exe ‐ao&#160; <br />netstat.exe ‐no&#160; <br />openfiles.exe&#160; /query/v&#160; <br />psfile.exe&#160;&#160;&#160; <br />pslist.exe&#160;&#160;&#160; <br />pslist.exe ‐t&#160; <br />psloggedon.exe&#160;&#160;&#160; <br />psservice.exe&#160;&#160;&#160; <br />pstat.exe&#160;&#160;&#160; <br />psuptime.exe&#160;&#160;&#160; <br />quser.exe&#160;&#160;&#160; <br />route.exe&#160; print&#160; <br />sc.exe&#160; query&#160; <br />sc.exe&#160; queryex&#160; <br />sclist.exe&#160;&#160;&#160; <br />showgrps.exe&#160;&#160;&#160; <br />srvcheck&#160; &#92;127.0.0.1&#160; <br />tasklist.exe&#160; /svc&#160; <br />whoami.exe&#160;&#160; </code></pre></p>

<div id='extendedEntryBreak' name='extendedEntryBreak'></div>

<p></p>

<h3>Update &#8211; 11/10/09</h3>

<p>There is speculation that the version released only has 45 commands and is therefore not the full &#8220;150 command&#8221; version that Microsoft reported releasing. The released version is 1.1.2 which corresponds to the version information in the documentation. The documentation does not list 150 discrete commands (really separate programs). Therefore the 150 command statement may be incorrect or may just be inflation of what&#8217;s there (for example treating &#8216;netstat + option&#8217; as its own command).</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/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/11/more-cofee-please-on-second-thought/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
