<?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>Forensics &#8211; Phocean.net</title>
	<atom:link href="/tag/forensics/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Computer Security Blog</description>
	<lastBuildDate>Fri, 24 Feb 2017 21:17:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
	<item>
		<title>A relative got hacked for scamming activities</title>
		<link>/2013/01/20/a-relative-got-hacked-for-scamming-activities.html</link>
		<pubDate>Sun, 20 Jan 2013 16:40:03 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Forensic]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[scam]]></category>
		<category><![CDATA[scammer]]></category>
		<category><![CDATA[scamming]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=1474</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=1474</guid>
		<description><![CDATA[One of my relative got hacked. After a phone conversation with him, I realized that his computer was hacked a few days before. He told me that he saw the mouse moving by itself, but what happened then was not clear to him. Anyway, he did not feel the urge to call me immediately. Needless to...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2013/01/20/a-relative-got-hacked-for-scamming-activities.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>One of my relative got hacked.</p>
<p>After a phone conversation with him, I realized that his computer was hacked a few days before. He told me that he saw the mouse moving by itself, but what happened then was not clear to him. Anyway, he did not feel the urge to call me immediately. Needless to say that his knowledge on computers is low.<br />
I immediately started to investigate.</p>
<h2>How the computer was hacked</h2>
<p>The computer is running Ubuntu . I suspected a vulnerability, but I soon realized that it was much simpler than that: by mistake, a VNC session was left opened!</p>
<p><em><strong>x11vnc</strong></em> with <strong><em>no authentication</em></strong> and <em><strong>no logging</strong></em>&#8230; Damned!</p>
<h2>What the attacker did</h2>
<p>What he tried first was to create a user to maintain access. But the scammer was probably low tech and soon abandonned.</p>
<p>Here is his sequence in the shell history:</p>
<pre>261 adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M xxxcx
262 useradd -d /home/xxxcx -m nokia00
263 passwd xxxcx</pre>
<p>Command <strong>#261</strong> failed, because of unproper syntax. I guess he meant useradd, as adduser on Debian/Ubuntu has totally different options. Note that what he was trying to do is create a new root user named xxxcx (with no home directory).</p>
<p>He probably did not realize his mistake, but yet tried this time useradd with fewer options in command <strong>#262</strong>. This time, he would create the home directory and name the user nokia00&#8230; Why not. Alas, the command can&#8217;t work as a standard user!</p>
<p>Then, command <strong>#263</strong>: he tried to change the current password, but again he failed as it is required to know it before updating it&#8230;</p>
<p>And that&#8217;s it. Pretty lame, isn&#8217;t it? He got quickly discouraged and started to use exclusively <em><strong>Firefox</strong></em>.</p>
<h2>On-line shopping</h2>
<p>With support of <a title="forensicswiki.org" href="http://www.forensicswiki.org/wiki/Mozilla_Firefox">forensicswiki.org</a>, I dumped the full Firefox profile on my computer and started to analyze it with the <a title="Sqlite Manager" href="https://addons.mozilla.org/fr/firefox/addon/sqlite-manager/">Sqlite Manager</a> extension.</p>
<blockquote><p>Sorry but I will be hiding private info and sensitive data that could be used for a legal action.</p></blockquote>
<p>I got most info from the files <em><strong>cookies.sqlite</strong></em> and <em><strong>places.sqlite</strong></em>.</p>
<div id="attachment_1482" style="width: 590px" class="wp-caption alignnone"><a href="/2013/01/20/a-relative-got-hacked-for-scamming-activities.html/cookies" rel="attachment wp-att-1482"><img class="size-medium wp-image-1482" alt="cookies.sqlite: a lot of info: email and billing info used by the attacker" src="/wp-content/uploads/2013/01/cookies-580x345.png" width="580" height="345" srcset="/wp-content/uploads/2013/01/cookies-580x345.png 580w, /wp-content/uploads/2013/01/cookies-940x560.png 940w, /wp-content/uploads/2013/01/cookies-500x298.png 500w, /wp-content/uploads/2013/01/cookies.png 1394w" sizes="(max-width: 580px) 100vw, 580px" /></a><p class="wp-caption-text">cookies.sqlite: a lot of info: email and billing info used by the attacker</p></div>
<div id="attachment_1483" style="width: 590px" class="wp-caption alignnone"><a href="/2013/01/20/a-relative-got-hacked-for-scamming-activities.html/places" rel="attachment wp-att-1483"><img class=" wp-image-1483 " title="places.sqlite" alt="places" src="/wp-content/uploads/2013/01/places-580x345.png" width="580" height="345" srcset="/wp-content/uploads/2013/01/places-580x345.png 580w, /wp-content/uploads/2013/01/places-940x560.png 940w, /wp-content/uploads/2013/01/places-500x298.png 500w, /wp-content/uploads/2013/01/places.png 1394w" sizes="(max-width: 580px) 100vw, 580px" /></a><p class="wp-caption-text">places.sqlite: attacker&#8217;s browsing history, with interesting purchase references in GET parameters</p></div>
<p>The guy didn&#8217;t loose time, he knew precisely what he wanted and what to do.</p>
<ol>
<li>He first visited two websites to localize the computer: <a title="ip2location.com" href="http://ip2location.com">ip2location.com</a> and <a title="ip-tracker.org" href="http://www.ip-tracker.org">ip-tracker.org</a>. You may think that it is a strange first move, but I will come back on that later as I have a theory.</li>
<li>Now that he knew in what country he was (country XXX), he started to do online shopping.</li>
</ol>
<p>It is interesting that his online shopping was all linked to web hosting:</p>
<ul>
<li>templates from dreamtemplates.com</li>
<li>a .net domain name (with however part of the prefix being localized accordingly to the country suffix).</li>
<li>hosting at netfirms.com and mg1host.com</li>
</ul>
<p>Note that the criminal used a online payment platform that I never heard about before: 2checkout.com aka 2co.com.</p>
<p>Unfortunately, when I investigated, all cookies were expired so I could not connect to the criminal&#8217;s account.</p>
<p>Yet, it still had some valuable info. The most interesting info I found was from a cookie from dreamtemplates.com. I got all the billing info used by the attacker:</p>
<ul>
<li>attacker&#8217;s gmail address (probably compromised or anonymous)</li>
<li>Name and address for the billing, that sounded real&#8230;</li>
</ul>
<p>Also, GET parameters in URLs were very interesting.</p>
<p>In some of them, you can guess the amount of the purchase he did. He for sure bought stuff for at least a total of 500$. But it is without counting the stuff that I cannot guess from URLs, so it is probably sensibly much more in reality.</p>
<p>But, even better, some had order ids. Hey, wait! Let&#8217;s have a look on the 2co website:</p>
<div id="attachment_1487" style="width: 474px" class="wp-caption alignnone"><a href="/2013/01/20/a-relative-got-hacked-for-scamming-activities.html/2co_order_review" rel="attachment wp-att-1487"><img class=" wp-image-1487 " alt="2co order review = order number + email" src="/wp-content/uploads/2013/01/2co_order_review-580x362.png" width="464" height="290" srcset="/wp-content/uploads/2013/01/2co_order_review-580x362.png 580w, /wp-content/uploads/2013/01/2co_order_review-480x300.png 480w, /wp-content/uploads/2013/01/2co_order_review.png 781w" sizes="(max-width: 464px) 100vw, 464px" /></a><p class="wp-caption-text">2co order review = order number + email</p></div>
<p>Hmmm&#8230; we have the email address and the order number&#8230; bingo!</p>
<p><a href="/2013/01/20/a-relative-got-hacked-for-scamming-activities.html/order" rel="attachment wp-att-1488"><img class="alignnone  wp-image-1488" alt="order" src="/wp-content/uploads/2013/01/order-580x911.png" width="406" height="638" srcset="/wp-content/uploads/2013/01/order-580x911.png 580w, /wp-content/uploads/2013/01/order-190x300.png 190w, /wp-content/uploads/2013/01/order.png 676w" sizes="(max-width: 406px) 100vw, 406px" /></a></p>
<p>Now, we have at least all info of the credit card owner, certainly the biggest victim in this mess.</p>
<h2>Conclusion</h2>
<p>That&#8217;s it for now. We are still in the process of transmitting the info to the police and alerting the victim.</p>
<p>Here are a few thoughts by the way:</p>
<ul>
<li>Logging, always logging! It is a pity that we know literally nothing about the scammer source ip address. All his actions were made from within a VNC session and it leaves no trace. He may have came from another proxy, but who knows&#8230; I still have a little hope that under legal request, the Internet provider of my relative will be able to provide some logs.</li>
</ul>
<ul>
<li>Nowadays, it is still difficult to report such a case to the police and to help the victim. The local police is at loss and does not really know what to do. The cyber section is slow to answer, probably crawling under requests (mostly spam stuff?).</li>
</ul>
<ul>
<li>Not every one has a computer specialist among friends or relatives. It must be a terrible experience to see the police coming to you for a fraud one hasn&#8217;t committed directly. Few people, even sometimes among IT professionals, understand that.</li>
</ul>
<ul>
<li>The criminal seemed low tech, but very organized at the same time.<br />
Here is my theory: he probably has a precise goal and is not loosing time.<br />
He follows a process: geo-localize the victim or target a country and choose accordingly financial data in his database.<br />
Then, he purchases stuff from a list of items he needs or he is requested.<br />
Finally, if he could not find a way to maintain access in seconds, he leaves. Mission done: this scammer is probably doing it full time, as a professional activity. Lame but efficient for the crime industry.</li>
</ul>
<ul>
<li>The credit card info was accompanied with private info: real name and address. We all know that but it is always shocking to think how it can easily obtained: compromised computer, hacked online shop or database, dishonest employee (e.g. at the hotel), etc.</li>
</ul>
<ul>
<li>The websites  will probably be used for more scamming and illegal activities. I am going to monitor the domain I got for a while.</li>
</ul>
<p>Keep wired for updates.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Soktspy</title>
		<link>/2012/06/20/soktspy.html</link>
		<pubDate>Wed, 20 Jun 2012 20:45:54 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Defense]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Forensic]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[Soktpy]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=1254</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=1254</guid>
		<description><![CDATA[Soktspy is a small script that may be helpful for some investigation. Sometimes, you may detect that some suspicious network traffic coming out from a machine. In general, it is easy to spot the process from which the packets originate. You somehow connect to the PC and look for open sockets. But sometimes, the behavior...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2012/06/20/soktspy.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Soktspy is a small script that may be helpful for some investigation.</p>
<p>Sometimes, you may detect that some suspicious network traffic coming out from a machine. In general, it is easy to spot the process from which the packets originate. You somehow connect to the PC and look for open sockets.</p>
<p>But sometimes, the behavior may be very sneaky, consisting of one or two packets, at rare and random intervals. Unless you spend all the day before the screen, it may be very difficult to trace.</p>
<p>Especially with stock tools or without installing any intrusive hardware, which is also the reason why I did this tool. On a production server, you want to install as little dependencies as possible, right?</p>
<p>So here is the Soktspy, a python script that easily build into a portable and standalone executable to deploy on the target machine.</p>
<p>Once launched, it just loops in the background and log sockets that are created for some given peers (the IP addresses you found involved in the suspicious network activity).</p>
<p>Maybe, some other tool exist, but I could not find anything similar. Let me know if you have any suggestion. Anyway, it was a nice exercise to do :)</p>
<p><img class="aligncenter size-full wp-image-1257" title="soktspy01" src="/wp-content/uploads/2012/06/soktspy01.png" alt="" width="668" height="427" srcset="/wp-content/uploads/2012/06/soktspy01.png 668w, /wp-content/uploads/2012/06/soktspy01-300x191.png 300w" sizes="(max-width: 668px) 100vw, 668px" /></p>
<p><strong>Download</strong></p>
<p><a href="/wp-content/uploads/2012/06/soktSpy-v1.2.zip">soktSpy v1.2</a></p>
<p><strong>Pre-requisites</strong></p>
<ul>
<li>Install Visual C++ Runtime libraries with v<strong>credist_x86.exe </strong>(not necessary if the target machine happens to have Python already installed)</li>
</ul>
<div>So far, I tested it successfully on Windows XP, Windows 2003, Ubuntu 11.10 and Mac OS Lion. But as it is a simple Python script, it is supposed to work on all platform.</div>
<div>
<p><strong>Compiling</strong></p>
<p>You may recompile the program as a Windows binary executable by issuing this command:</p>
<p><strong>&gt; setup.py py2exe</strong></p>
</div>
<p><strong>How to use</strong></p>
<ul>
<li>Copy <strong>soktSpy.exe </strong>and its configuration file <strong>config.cfg</strong>.</li>
<li>Edit <strong>config.cfg </strong>with the IP you want to monitor</li>
<li>Start <strong>soktSpy.exe</strong>.</li>
</ul>
<p>Then, as soon as the sneaky process will send out a packet toward the monitored IP, a log record will be triggered:</p>
<p><a href="/wp-content/uploads/2012/06/soktspy02.png" rel="lightbox[1254]"><img class="aligncenter size-large wp-image-1255" title="soktspy02" src="/wp-content/uploads/2012/06/soktspy02-1024x327.png" alt="" width="1024" height="327" srcset="/wp-content/uploads/2012/06/soktspy02-1024x327.png 1024w, /wp-content/uploads/2012/06/soktspy02-300x96.png 300w, /wp-content/uploads/2012/06/soktspy02.png 1118w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The log file contains the following info, in that order:</p>
<ul>
<li>Detection time (based on the system local time)</li>
<li>Process creation time</li>
<li>PID</li>
<li>Process Name</li>
<li>Protocol Family (2 = IPv4, 23 = IPv6)</li>
<li>Process Owner</li>
<li>Source socket (IP, port)</li>
<li>Destination socket (IP, port)</li>
<li>Socket Status</li>
</ul>
<p><strong>Future Plans</strong></p>
<p>Please tell me if you have any idea on how to improve it.</p>
<p>For now, I plan to add a feature that will dump the memory of the suspicious processes when it is executing.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Debugging the MBR with IDA Pro and Bochs</title>
		<link>/2011/01/20/debugging-the-mbr-with-ida-pro-and-bochs.html</link>
		<comments>/2011/01/20/debugging-the-mbr-with-ida-pro-and-bochs.html#comments</comments>
		<pubDate>Thu, 20 Jan 2011 19:57:46 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Forensic]]></category>
		<category><![CDATA[Reversing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Assem]]></category>
		<category><![CDATA[Bochs]]></category>
		<category><![CDATA[Bootkit]]></category>
		<category><![CDATA[Debugger]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[IDA Pro]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[MBR]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=980</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=980</guid>
		<description><![CDATA[Analyzing the MBR is sometimes required during a forensic process, if you suspect a malicious activity that is not detected on-line. With static analysis, you may see if an obvious corruption happened, but you will need to debug to learn more. Prerequisite : IDA Pro (6.0) with the IDA Python plug-in (1.4.3) Steps : Prepare...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2011/01/20/debugging-the-mbr-with-ida-pro-and-bochs.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Analyzing the MBR is sometimes required during a forensic process, if you suspect a malicious activity that is not detected on-line. With static analysis, you may see if an obvious corruption happened, but you will need to debug to learn more.</p>
<h2>Prerequisite :</h2>
<ul>
<li>IDA Pro (6.0) with the IDA Python plug-in (1.4.3)</li>
</ul>
<h2>Steps :</h2>
<ol>
<li>Prepare your forensic disk image.<br />
In general, it is that simple :</p>
<pre>$ dd if=&lt;source&gt; of=disk.img bs=65536 conv=noerror</pre>
<p>Or :</p>
<pre>$ ddrescue -n &lt;source&gt; &lt;dest&gt; file.log</pre>
<p>Check the disk geometry using :</p>
<pre>$ fdisk -luc disk.img</pre>
<p>These values will be useful for step 5.<br />
However, if you have an exotic disk, it may be much trickier. For example, I got some geometry errors with a flash disk when using Bochs at step 11. Special thanks to Gene Cumm from the bochs-developpers mailing list who gave me the tip to specify the geometry to dd :</p>
<pre>$ dd if=input of=output bs=2064384 count=507</pre>
</li>
<p>Refer to <a title="CHS" href="http://en.wikipedia.org/wiki/Cylinder-head-sector" target="_blank">CHS</a> if you wonder how to get these values.</p>
<li>Extract the MBR from the disk or from the image you just took.
<pre>$ dd if=&lt;source&gt; of=mbr.dump bs=512 count=5</pre>
</li>
<li>Download and install the <a title="Bochs emulator" href="http://bochs.sourceforge.net/" target="_blank">Bochs x86-64 emulator</a>, which comes with a debugger that will work nicely with IDA.</li>
<li>Download <a title="MBR Bochs scripts" href="http://hexblog.com/ida_pro/files/mbr_bochs.zip" target="_self">this archive</a> from Hexblog (IDA Pro&#8217;s blog). We will use two files from there : <em>bochrc</em>, wich is the configuration file for Bochs, and <em>mbr.py</em> which a python file helpful from preparing the debugging environment.</li>
<li> Copy <em>bochrc</em> in your working directory and edit the following line to match your disk image geometry :
<pre>ata0-master: type=disk, path="sdb.img", mode=flat, cylinders=507, heads=64, spt=63</pre>
<p>Before going on, you may test that Bochs can use the image with these settings :</p>
<pre>C:\&gt;"c:\Program Files\Bochs-2.4.5\bochsdbg.exe" -f bochsrc -q</pre>
</li>
<li>In the same directory, copy <em>mbr.py</em> and edit the following settings :
<pre># Some constants
SECTOR_SIZE = 512
BOOT_START  = 0x7C00
BOOT_SIZE   = 0x7C00 + SECTOR_SIZE * 4
BOOT_END    = BOOT_START + BOOT_SIZE
SECTOR2     = BOOT_START + SECTOR_SIZE
MBRNAME    = "mbr.img"
IMGNAME     = "sdb.img"</pre>
</li>
<li>Now open a console and type :
<pre>C:\&gt; mbr update</pre>
</li>
<li>With IDA Pro, open the <em>boshrc</em> file. IDA should recognize the format and set the proper settings.</li>
<li>From the menu, open <em>File/Script File</em> and select <em>mbr.py</em>. It will close IDA after execution.</li>
<li>Open again your <em>*.idb</em> file, set a breakpoint at <em>0x7C00</em>.</li>
<li>Start the debugger.</li>
</ol>
<p>You should now be able to go ahead and debug the MBR step by step.</p>
<p><img class="aligncenter size-full wp-image-996" title="ida-mbr" src="/wp-content/uploads/2011/01/ida-mbr.png" alt="" width="600" height="546" srcset="/wp-content/uploads/2011/01/ida-mbr.png 600w, /wp-content/uploads/2011/01/ida-mbr-300x273.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<h2>References :</h2>
<ul>
<li>Hexblog : <a title="Develop your master boot record and debug it with IDA Pro and the Bochs debugger " href="http://www.hexblog.com/?p=103" target="_blank">Develop your master boot record and debug it with IDA Pro and the Bochs debugger plugin</a></li>
<li>MISC Magazine #53 : Votre MBR pris en otage ! &#8211; Nicolas Brulez (Kaspersky labs)</li>
<li>Bochs User Manual : <a title="Bochs tips and techniques" href="http://bochs.sourceforge.net/doc/docbook/user/howto.html#AEN2776" target="_blank">Chapter 8, Tips and Techniques</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>/2011/01/20/debugging-the-mbr-with-ida-pro-and-bochs.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
