<?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/"
	>

<channel>
	<title>Acunetix Web Application Security Blog</title>
	<atom:link href="http://www.acunetix.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acunetix.com/blog</link>
	<description>Acunetix Web Application Security Blog</description>
	<pubDate>Thu, 08 Jan 2009 21:07:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Image upload forms used to hijack websites</title>
		<link>http://www.acunetix.com/blog/web-security-articles/image-upload-forms-used-to-hijack-websites/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/image-upload-forms-used-to-hijack-websites/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 11:46:34 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[asp backdoor]]></category>

		<category><![CDATA[backdoor]]></category>

		<category><![CDATA[cdx file]]></category>

		<category><![CDATA[china hacker]]></category>

		<category><![CDATA[chinese hackers]]></category>

		<category><![CDATA[gifar]]></category>

		<category><![CDATA[ie 0day]]></category>

		<category><![CDATA[infected website]]></category>

		<category><![CDATA[malware]]></category>

		<category><![CDATA[spyware]]></category>

		<category><![CDATA[sql injection]]></category>

		<category><![CDATA[trojan]]></category>

		<category><![CDATA[upload security]]></category>

		<category><![CDATA[upload vulnerability]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=250</guid>
		<description><![CDATA[In the past days I came across a stimulating blog post titled &#8220;Dissecting a Multistage Web Attack that uses the recent IE7 0day&#8221;. The authors described how a vulnerable web application was then able to infect web browsers visiting the infected website. The attackers, who used an IP that originates from China, made a lot [...]]]></description>
			<content:encoded><![CDATA[<p>In the past days I came across a stimulating blog post titled <a href="http://blog.attackresearch.com/?q=node/5" target="_blank">&#8220;Dissecting a Multistage Web Attack that uses the recent IE7 0day&#8221;</a>. The authors described how a vulnerable web application was then able to infect web browsers visiting the infected website. The attackers, who used an IP that originates from China, made a lot of attempts (presumably using automated tools) to inject SQL statements (SQL Injection) through the web application. The attacker&#8217;s favorite method of penetration appears to be SQL injection probably since it is so prevalent. However this particular web application was not vulnerable to SQL injection and therefore they had to move on to a different attack vector.</p>
<p>The attackers looked around for vulnerable ASP pages and identified a library that allows users to upload images. Attackers are known to exploit upload forms by uploading CGI scripts such as EXE, PHP or ASP files to the web server. When these files are accessed through the web server, the web server tries to interpret or execute these files as legitimate CGI or ASP. This means that code is executed on the server side and this code can be anything from a normal web application to a backdoor allowing remote access to the server. In this case, this library had taken precautions to only allow certain file types to be uploaded. The image library made sure to only allow files with certain file extensions (.gif, .jpeg etc) and possibly checked the contents of the files to make sure that it is indeed an image.</p>
<p><strong>So how were the attackers able to execute remote code on the victim web server? </strong></p>
<p>The attackers made use of a filename with the extension .CDX. Such files can refer to various file types, one of which is a graphics file type used by Corel Draw. Additionally, by default IIS interprets CDX files as ASP scripts. This image library allowed users to upload files with this extension and store it on the web server. However the image library could also check if the contents of the file contain an image or not. To bypass that check, the attackers included the contents of a real GIF file and embedded some VBScript code. The image library would detect the GIF file and allow the upload to take place, while the IIS server would interpret the VBScript code just similar to any other ASP script on the server. This combination keeps everyone (both IIS and the image library) happy, and therefore the attacker gets execute his or her custom VBScript code on the IIS server just as if he had uploaded an ASP file!</p>
<p>Once the CDX file was uploaded, the attacker then started sending it commands. In this particular case, the attacker uploaded a variation of a well known ASP backdoor that is typically used by Chinese speakers. From this point on the web pages were modified to include code that exploited a security hole in Internet Explorer. This meant that visitors who went to the infected website could end up running arbitrary code on their desktop computers. Such code usually installs backdoors and spyware on the victim machines. To keep tabs on this story and how it develops visit the <a href="http://blog.attackresearch.com/?q=forum/2" target="_blank">Attack research blog</a> which should be posting a juicy update soon.</p>
<p><strong>How does one prevent similar attacks?</strong></p>
<p>Since filtering by file extension was bypassed, it might appear that an appropriate fix would be as simple as making sure that CDX files are not successfully uploaded to the server. However this fix is not hacker proof and it alone does not provide a complete solution. Such a solution will only be sufficient until attackers find another way of bypassing this security mechanism.</p>
<p>To solve this issue we should be looking at the source of the problem. Allowing files in the &#8220;images&#8221; or &#8220;uploads&#8221; directory to be executed by the server is probably the main culprit. Setting the correct permissions on the web server to only read such files would be a good solution to this issue. Additionally, if anonymous uploads are not needed, then it is a good idea to avoid providing that functionality in the first place.</p>
<p><em>Note that this solution does not do much to <a href="http://www.infoworld.com/article/08/08/01/A_photo_that_can_steal_your_online_credentials_1.html" target="_blank">prevent the GIFAR</a> attacks that target the client-side rather than the server-side. But that will be for another post.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/image-upload-forms-used-to-hijack-websites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How can any web page log you off all other websites?</title>
		<link>http://www.acunetix.com/blog/web-security-articles/how-can-any-web-page-log-you-off-all-other-websites/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/how-can-any-web-page-log-you-off-all-other-websites/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 15:16:24 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[csrf]]></category>

		<category><![CDATA[full disclosure]]></category>

		<category><![CDATA[logoff]]></category>

		<category><![CDATA[logout]]></category>

		<category><![CDATA[session destroyer]]></category>

		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=237</guid>
		<description><![CDATA[A recent post on &#8220;Full-Disclosure&#8221; mailing list referenced a web page called &#8220;Session Destroyer&#8221;. This web page is a demonstration by Kristian Erik Hermansen that promises to make logging off various popular websites very easy.
How does it work? This static html page simply contains IMG tags that link to the logout url for various websites [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://seclists.org/fulldisclosure/2008/Dec/0568.html" target="_blank">recent post</a> on &#8220;Full-Disclosure&#8221; mailing list referenced a web page called &#8220;Session Destroyer&#8221;. This web page is a demonstration by <span>Kristian Erik Hermansen that </span>promises to make logging off various popular websites very easy.</p>
<p>How does it work? This static html page simply contains IMG tags that link to the logout url for various websites including Facebook, Gmail, Ebay, Youtube and Yahoo. If an unwary user visit this web page then he or she will instantly get logged out of these popular websites. While this is a nuisance, it is not considered a serious security hole and knowledge of this issue is widespread throughout the security community.</p>
<p>In fact this sort of issue has a name - Cross Site Request Forgery or CSRF / XSRF, and can have very serious repurcussions. This security flaw relies on the fact that web browsers will happily go to any URL that is referenced by any website, even if the URL refers to a totally different website. If the URL performs an action, (eg. logs out the user or transfers some money to another bank account) AND the URL&#8217;s parameters are predictable, then that web application is typically vulnerable to a CSRF attack. Major sites such as Gmail were previously found to be vulnerable to CSRF. In the case of Gmail, <a href="http://www.gnucitizen.org/blog/google-gmail-e-mail-hijack-technique/" target="_blank">attackers were able to add an email filter</a> that forwarded the victim&#8217;s emails to their own email address.</p>
<p>To solve this issue, web developers usually create a secret that the attacker cannot predict and that is known between the web application and the legitimate user. Making use of POST requests is not a solution to CSRF since attackers can force web browsers to submit forms. The solution is to make use of a challenge token for each request - or at least those requests that execute a sensitive action.</p>
<p style="center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/12/snapshot-2008-12-27-20-06-19.jpg"><img class="size-medium wp-image-242 aligncenter" src="http://www.acunetix.com/blog/wp-content/uploads/2008/12/snapshot-2008-12-27-20-06-19-300x197.jpg" alt="" width="300" height="197" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/how-can-any-web-page-log-you-off-all-other-websites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>American Express website vulnerable&#8230; again!</title>
		<link>http://www.acunetix.com/blog/websecuritynews/american-express-website-vulnerability-again/</link>
		<comments>http://www.acunetix.com/blog/websecuritynews/american-express-website-vulnerability-again/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 16:28:52 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[Web Security News]]></category>

		<category><![CDATA[automated scanner]]></category>

		<category><![CDATA[cross site scripting]]></category>

		<category><![CDATA[periodic scan]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=226</guid>
		<description><![CDATA[A few days ago a Cross-site-scripting vulnerability was discovered and reported on the American Express Site. A XSS vulnerability can allow attackers to steal user authentication cookies from americanexpress.com, thus leading to an account hijack.
As web-security consultant Joshua D.Abraham said, web developers addressed only one instance of the problem. They did not fully assess the [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago a <a href="http://www.acunetix.com/websitesecurity/cross-site-scripting.htm" target="_self">Cross-site-scripting</a> vulnerability was discovered and reported on the American Express Site. A XSS vulnerability can allow attackers to steal user authentication cookies from americanexpress.com, thus leading to an account hijack.</p>
<p>As web-security consultant Joshua D.Abraham said, web developers addressed only one instance of the problem. They did not fully assess the whole application to check for similar issues!</p>
<p>This shows the importance of using an automated web vulnerability scanner. Web vulnerability scanners have an important role to play in the security testing of web applications. Not only do scanners make the process of testing Web Applications more efficient but they can also serve to double check the website developer&#8217;s work. Since most large websites are constantly changing, it makes sense to schedule a periodic scan to make sure that any vulnerabilities are detected before they hit customers or your website&#8217;s reputation.</p>
<p>By making use of an automated web vulnerability scanner such as <a href="http://www.acunetix.com/vulnerability-scanner/" target="_self">Acunetix</a>, a developer or security professional could have found these high profile vulnerabilities. It would possibly have prevented American Express the embarrassment of having to deal with a second security flaw after just a few days!</p>
<p>Read more about the reported vulnerability in this <a href="http://www.theregister.co.uk/2008/12/20/american_express_website_bug_redux/" target="_blank">article</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/websecuritynews/american-express-website-vulnerability-again/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why upgrade PHP to 5.2.8? Part 2</title>
		<link>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-2/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-2/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 16:07:43 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[apache security]]></category>

		<category><![CDATA[CVE-2008-2371]]></category>

		<category><![CDATA[directory traversal]]></category>

		<category><![CDATA[mod_php]]></category>

		<category><![CDATA[overflow]]></category>

		<category><![CDATA[php buffer overflow]]></category>

		<category><![CDATA[php directory traversal]]></category>

		<category><![CDATA[php extractto]]></category>

		<category><![CDATA[php memory corruption]]></category>

		<category><![CDATA[php security]]></category>

		<category><![CDATA[php update]]></category>

		<category><![CDATA[php ziparchive]]></category>

		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=223</guid>
		<description><![CDATA[To read part 1 of this article please refer to the previous post.
Note: a large number of vulnerabilities described in this post can be exploited to bypass safe_mode. It is not recommended to rely on this PHP functionality for the security of your web servers. Only use safe_mode as a supplement to PHP code that [...]]]></description>
			<content:encoded><![CDATA[<p>To read part 1 of this article please refer to the <a href="http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-1/">previous post</a>.</p>
<p><em>Note: a large number of vulnerabilities described in this post can be exploited to bypass safe_mode. It is not recommended to rely on this PHP functionality for the security of your web servers. Only use safe_mode as a supplement to PHP code that has been truly audited (with <a href="http://www.acunetix.com/blog/category/acusensor-technology/">AcuSensor technology</a> of course).</em></p>
<p><strong>Not all vulnerabilities described are simply a safe_mode bypass. The IMAP toolkit crash is more than just a crash!</strong></p>
<p><strong>Incorrect php_value order for Apache configuration</strong></p>
<p>This vulnerability affects sysadmins that rely on the safety features of safe_mode to protect their servers against users executing malicious php code on the server. This security flaw was reported by <a href="http://securityreason.com/achievement_securityalert/57" target="_blank">SecurityReason</a>. In their advisory, SecurityReason show how it can be exploited by attackers who can modify the PHP configuration by editing the Apache configuration (httpd.conf) or .htaccess. In the case that error_log directive is already set to a php script, if the php script can be edited by the attacker, then the attacker can also bypass PHP&#8217;s safe_mode feature. This is a local exploit.</p>
<p><strong>Fixed a crash inside gd with invalid fonts (CVE-2008-3658)</strong></p>
<p>GD handles image processing in PHP. It can also be used to read font files through the imageloadfont() function. This particular function suffers from a buffer overflow which can be used to execute arbitrary code or cause a denial of service. This vulnerability would affect any PHP code that calls this function and supplies it with user defined font files (normally *.gdf files).</p>
<p><strong>Fixed a possible overflow inside memnstr (CVE-2008-3659)</strong></p>
<p>An attacker can execute arbitrary code if he or she can specify the delimiter in the explode() php function. Although usage of the explode() function is very common, it is not common behavior nor recommended to make use of user defined delimiters. Therefore most applications should not be vulnerable to this. However this vulnerability can be locally exploitable to bypass safe_mode restrictions.</p>
<p><strong>Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666</strong></p>
<p>CVE-2008-2665 detailed another vulnerability that can be used to bypass safe_mode. The vulnerability is a directory traversal issue in the PHP function posix_access() which allows one to check permissions of a file. CVE-2008-2666 describes an even more subtle bypass where chdir and ftok functions can allow access to files that should not be accessible through safe_mode if the directory starts with the string &#8220;http:&#8221;.</p>
<p><strong>Crash with URI/file..php (filename contains 2 dots) (CVE-2008-3660) </strong></p>
<p>If you are making use of FastCGI module then users accessing your webserver could cause a Denial of Service by simply supplying two or more dots in front of the php extension. This vulnerability could easily be triggered unintentionally so it is highly recommended to update if the web server is making us of FastCGI.</p>
<p><strong>IMAP toolkit crash: rfc822.c legacy routine buffer overflow). (Fixes CVE-2008-2829)</strong></p>
<p>PHP made use of old code written in 1988 which did not handle large buffers, thus leading to a classic buffer overflow. How can this be exploited? If you are making use of PHP code that reads messages from an IMAP server, then that code is exposed to a buffer overflow. By exploiting this security hole attackers can crash the HTTP server and execute arbitrary code and gain access to the server. Emails exploiting this vulnerability will typically consist of large address lists in the <strong>To</strong> or <strong>CC</strong> email header. This vulnerability is described in the <a href="http://bugs.php.net/bug.php?id=42862" target="_blank">PHP bug report</a> and could easily be triggered unintentionally and intentionally if one is making use of PHP applications that use the PHP IMAP functionality such as <a href="http://informationgateway.org/" target="_blank">TWIG</a>.</p>
<p><strong>When <a href="http://www.php.net/downloads.php" target="_blank">upgrading</a> make sure that you go for version 5.2.8 (or greater) which was issued to fix a flaw that was introduced in version 5.2.7. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What do American Express and Facebook have in common?</title>
		<link>http://www.acunetix.com/blog/websecuritynews/what-do-american-express-and-facebook-have-in-common/</link>
		<comments>http://www.acunetix.com/blog/websecuritynews/what-do-american-express-and-facebook-have-in-common/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 08:09:30 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[Web Security News]]></category>

		<category><![CDATA[american express xss]]></category>

		<category><![CDATA[bank security]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[facebook xss]]></category>

		<category><![CDATA[google rank]]></category>

		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=210</guid>
		<description><![CDATA[Cross Site Scripting seems to be the word of the past few days with high profile sites getting featured on the technology news sites. ZDNet reported how Facebook just fixed four XSS security flaws affecting their developer&#8217;s page, the iPhone login page, the new users registrations page and a Facebook applications page. All of these [...]]]></description>
			<content:encoded><![CDATA[<p>Cross Site Scripting seems to be the word of the past few days with high profile sites getting featured on the technology news sites. <a href="http://blogs.zdnet.com/security/?p=2308" target="_blank">ZDNet reported</a> how Facebook just fixed four XSS security flaws affecting their developer&#8217;s page, the iPhone login page, the new users registrations page and a Facebook applications page. All of these were reflected XSS vulnerabilities rather than stored XSS. This means that exploitation of the XSS flaw appears only temporarily when the victim is redirected to a vulnerable site after following a crafted link or visiting a malicious website. American Express was also found guilty of hosting code vulnerable to Cross Site Scripting. <a href="http://www.theregister.co.uk/2008/12/16/american_express_website_bug/" target="_blank">El Reg</a> is running an article on this vulnerability and about the Bank&#8217;s response or lack of. Russ McRee <a href="http://holisticinfosec.blogspot.com/2008/12/online-finance-flaw-american-express.html" target="_blank">posted</a> details on his blog after the futile attempt to reach AmEx&#8217;s security team. The flaw was fixed in a few minutes after The Register picked up the story.</p>
<p>So what is the reason that such vulnerabilities materialize and do not get fixed? Two months ago I too reported a XSS vulnerability to a Bank&#8217;s security team. The case was very similar to the security hole in American Express&#8217; website. The vulnerable script was a search script that echoed back the search string. After being told that they knew about the vulnerability, I asked &#8220;why not fix it?&#8221;. The reason? The Cross Site Scripting vulnerability does not affect the sensitive website (ebanking site) which is on a different server.</p>
<p>In the network security world, this would have been a good answer especially when the servers are segregated. However when it comes to Web Application Security, the situation is a bit different. If the secure ebanking site shares the cookie with the other websites on the same domain (eg. secure.bank.com and www.bank.com share the same cookie), then the risk is immediately understood. Cross Site Scripting on one site affects the other site. Even when that is not the case, Cross Site Scripting can cause trouble. Attackers have previously exploited XSS to launch very convincing phishing attacks on an <a href="http://tinyurl.com/2uge9s">Italian Bank</a> or to increase their <a href="http://www.cgisecurity.com/2008/03/10" target="_blank">google ranking</a>. Besides that, reputation is easily hurt if (like AmEx) your organization is trying to project the image that it takes security seriously!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/websecuritynews/what-do-american-express-and-facebook-have-in-common/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why upgrade PHP to 5.2.8? Part 1</title>
		<link>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-1/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-1/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 07:22:24 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[apache security]]></category>

		<category><![CDATA[CVE-2008-2371]]></category>

		<category><![CDATA[directory traversal]]></category>

		<category><![CDATA[mod_php]]></category>

		<category><![CDATA[overflow]]></category>

		<category><![CDATA[php buffer overflow]]></category>

		<category><![CDATA[php directory traversal]]></category>

		<category><![CDATA[php extractto]]></category>

		<category><![CDATA[php memory corruption]]></category>

		<category><![CDATA[php security]]></category>

		<category><![CDATA[php update]]></category>

		<category><![CDATA[php ziparchive]]></category>

		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=198</guid>
		<description><![CDATA[Note: PHP 5.2.7 is the actual version that fixes the below security holes. PHP 5.2.8 fixes an issue introduced in 5.2.7. Details from the PHP news site.

A new version of the popular scripting language, PHP includes a couple of security fixes (taken from the Changelog):

Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371)
Fixed missing initialization of BG(page_uid) [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: PHP 5.2.7 is the actual version that fixes the below security holes. PHP 5.2.8 fixes an issue introduced in 5.2.7. Details from the <a href="http://www.php.net/archive/2008.php#id2008-12-07-1" target="_blank">PHP news site</a>.<br />
</em></p>
<p>A new version of the popular scripting language, PHP includes a couple of security fixes (taken from the <a href="http://www.php.net/ChangeLog-5.php#5.2.7" target="_blank">Changelog</a>):</p>
<ul>
<li>Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371)</li>
<li>Fixed missing initialization of BG(page_uid) and BG(page_gid)</li>
<li>Fixed incorrect php_value order for Apache configuration</li>
<li>Fixed a crash inside gd with invalid fonts (Fixes CVE-2008-3658).</li>
<li>Fixed a possible overflow inside memnstr (Fixes CVE-2008-3659).</li>
<li>Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.</li>
<li>Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)).(Fixes CVE-2008-3660)</li>
<li>Fixed bug #42862 (IMAP toolkit crash: rfc822.c legacy routine buffer overflow). (Fixes CVE-2008-2829)</li>
</ul>
<p>Additionally, Stefan Esser described a vulnerability that was silently fixed in PHP 5.2.8.</p>
<p>Obviously this update not only includes security updates but also a large number (170) of bug fixes that probably makes it worth the update. Many of these non-security fixes solve stability issues and make this update worth it. However the security issues fixed in this version may in some cases force your organization to upgrade some or all of its PHP installations depending on the case. In this post I will be describing these vulnerabilities in more detail so that one can easily prioritize application of this PHP update.</p>
<p><strong>Upgraded PCRE to version 7.8 which addresses </strong><strong>CVE-2008-2371</strong></p>
<p>What is CVE-2008-2371 about? The <a href="http://www.pcre.org/changelog.txt" target="_blank">Changelog</a> from PCRE gives the following description:</p>
<pre>11. An option change at the start of a pattern that had top-level alternatives
    could cause overwriting and/or a crash. This command provoked a crash in
    some environments:

      printf "/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8\n" | pcretest

    This potential security problem was recorded as CVE-2008-2371.</pre>
<p>To exploit this vulnerability an attacker needs to be able to pass regular expressions to the pcre_* functions. The most obvious case where this is an issue is when a PHP script allows regular expressions to be defined by the user. For example, plugin for Wordpress called <a href="http://urbangiraffe.com/plugins/search-regex/" target="_blank">Search Regex</a> might expose this vulnerability. If this particular Wordpress plugin only available to the administrator who is doing a Wordpress migration, then the vulnerability is somewhat contained. There are cases where the website administrator or webmaster is not given system access to the website. In this context, this vulnerability will indeed affect the PHP installation. Another possibility is that an attacker can target the administrator by making use of an additional vulnerability such as Cross Site Request Forgery (XSRF).</p>
<p><strong>Fixed missing initialization of BG(page_uid) and BG(page_gid)</strong></p>
<p>Details of this vulnerability were published by <a href="http://securityreason.com/achievement_securityalert/59" target="_blank">SecurityReason</a> on Bugtraq and various security mailing lists. The advisory describes a vulnerability where the first Apache child process will incorrectly set the uid to 0 which is normally assigned to the root user on UNIX and Linux systems. The correct behavior would be to assign the uid to the correct user, typically the &#8220;www&#8221; user for Apache. By making use of this vulnerability, an attacker may be able to bypass certain security restrictions that PHP&#8217;s safe_mode is meant to apply. So who can this attacker be? It will have to be someone who can modify the php flags (modify php.ini or htaccess), which is typically someone with access to modify .htaccess or php.ini. I am waiting for feedback from the security researcher who discovered this vulnerability, so this description is subject to change.</p>
<p><strong>ZipArchive::extractTo() silent fix</strong></p>
<p>As described before, PHP fixed a vulnerability that was <a href="http://www.suspekt.org/2008/12/05/php-527-and-ziparchiveextractto/" target="_blank">reported by Stefan Esser </a>in the zip extraction functions. This is a traditional <a href="http://www.acunetix.com/websitesecurity/directory-traversal.htm">directory traversal vulnerability</a> that allows attackers to dump their files anywhere that the Apache user can write to. In this case, the attacker will upload a zip file to the PHP script in question which includes compressed files with filenames such as &#8220;../../../var/www/backdoor.php&#8221;. PHP scripts that extract uploaded zip files on the fly would expose this vulnerability. Websites allowing such functionality should be immediately upgraded to the latest version of PHP which fixes this vulnerability.</p>
<p>That&#8217;s it for now. Part two of this post coming up soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/why-upgrade-php-to-528-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>URL Rewriting and AcuSensor Technology; automation and advantages</title>
		<link>http://www.acunetix.com/blog/web-security-articles/url-rewriting-and-acusensor-technology-automation-and-advantages/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/url-rewriting-and-acusensor-technology-automation-and-advantages/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 08:59:14 +0000</pubDate>
		<dc:creator>Bogdan Calin</dc:creator>
		
		<category><![CDATA[AcuSensor Technology]]></category>

		<category><![CDATA[Web Security Articles]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=188</guid>
		<description><![CDATA[Nowadays, a lot of web applications are using URL rewriting. URL rewriting involves converting normal URLs to search engine friendly URLs. Usually the reason for doing this is to improve the rankings in search engines.
A search friendly URL looks like this:

Or like this:

However, these kinds of URLs are creating a lot of problems for web [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays, a lot of web applications are using URL rewriting. URL rewriting involves converting normal URLs to search engine friendly URLs. Usually the reason for doing this is to improve the rankings in search engines.</p>
<p>A search friendly URL looks like this:</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/12/seo_url_1.png" target="_blank"><img class="aligncenter size-full wp-image-190" title="seo_url_1" src="http://www.acunetix.com/blog/wp-content/uploads/2008/12/seo_url_1.png" alt="" width="500" height="24" /></a></p>
<p style="text-align: center;">Or like this:</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/12/seo_url_2.png" target="_blank"><img class="aligncenter size-full wp-image-191" title="seo_url_2" src="http://www.acunetix.com/blog/wp-content/uploads/2008/12/seo_url_2.png" alt="" width="500" height="25" /></a></p>
<p>However, these kinds of URLs are creating a lot of problems for web vulnerability scanners and their crawlers.</p>
<p>Below is the crawl result of a sample application that is uses the mod_rewrite module:</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/12/acunetix_crawl_1.png" target="_blank"><img class="aligncenter size-full wp-image-192" title="acunetix_crawl_1" src="http://www.acunetix.com/blog/wp-content/uploads/2008/12/acunetix_crawl_1.png" alt="" width="401" height="406" /></a></p>
<p>As seen above, the crawler is confused when dealing with such URLs, thinking that BuyProduct and Details are directories and handling them as such.  Also, the crawler did not find any inputs for this web application therefore cannot test it properly.</p>
<p>In order to handle this kind of situations, in the previous versions of Acunetix WVS we implemented a solution that allows defining rewrite rules through a graphical tool where the user can manually define the rewrite rules and these rules will be parsed by the crawler and the crawler will rewrite the URLs automatically. Another option was to import the file with the rewrite rules.</p>
<p>However, apart from the fact that this is a manual process, the user must manually define the rewrite rules and that’s not always an easy task,  sometimes it&#8217;s very complicated or even impossible.  In companies where freelance web developers are hired, usually the administrator auditing the site is only administering the server and is not responsible for the actual content of the site or not familiar with the source code of the site.</p>
<p>Because the AcuSensor Technology has inside information from the scanned application, it can provide information to the crawler about the actual filenames and about input parameters.  Therefore when AcuSensor Technology is enabled on the website, the crawler can correctly parse the site structure and the file inputs and able to properly test the web application.</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/12/acunetix_crawl_2.png" target="_blank"><img class="aligncenter size-full wp-image-193" title="acunetix_crawl_2" src="http://www.acunetix.com/blog/wp-content/uploads/2008/12/acunetix_crawl_2.png" alt="" width="402" height="407" /></a></p>
<p>As seen above, the crawl results for the same site when AcuSensor Technology is enabled, the real files appear in the crawl results: buy.php and details.php.</p>
<p>Also, now the crawler has information about the input parameters for these files (GET param id and the list of possible values). Therefore, the scanner can properly audit the web application.</p>
<p>Other files have been discovered in the application directory (database_connect.php, takeover.php, …).  One of these files also has an input parameter and can be tested even if this file is not directly linked from the website.  With a typical black box scanner such files are never audited.</p>
<p>The AcuSensor Technology is available in Acunetix WVS version 6 and has a number of advantages that will improve the quality of the scan results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/url-rewriting-and-acusensor-technology-automation-and-advantages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Directory Traversal attack; what is it and how to prevent such attacks</title>
		<link>http://www.acunetix.com/blog/web-security-articles/directory-traversal-attack-what-is-it-and-how-to-prevent-such-attacks/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/directory-traversal-attack-what-is-it-and-how-to-prevent-such-attacks/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 17:07:13 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[directory traversal]]></category>

		<category><![CDATA[directory traversal attack]]></category>

		<category><![CDATA[full compromise]]></category>

		<category><![CDATA[root directory]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=184</guid>
		<description><![CDATA[If a web application or web server are vulnerable to a Directory Traversal attack, a malicious user can exploit this vulnerability to step out of the web root directory and access other restricted files and directories of the file system. Typically, this also gives the malicious user the ability to execute commands on the web [...]]]></description>
			<content:encoded><![CDATA[<p>If a web application or web server are vulnerable to a Directory Traversal attack, a malicious user can exploit this vulnerability to step out of the web root directory and access other restricted files and directories of the file system. Typically, this also gives the malicious user the ability to execute commands on the web server which will lead to a full compromise of the system.</p>
<p>Secure access control is crucial in web server and web application configurations since a website is always exposed and will always  be a target!</p>
<p>In the following article you can read more and learn (using examples) about Directory Traversal attacks, how to check for them and most important of all, how to prevent them.</p>
<p><a href="http://www.acunetix.com/websitesecurity/directory-traversal.htm" target="_self">http://www.acunetix.com/websitesecurity/directory-traversal.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/directory-traversal-attack-what-is-it-and-how-to-prevent-such-attacks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Two factor authentication and Web Application Security</title>
		<link>http://www.acunetix.com/blog/web-security-articles/two-factor-authentication-and-web-application-security/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/two-factor-authentication-and-web-application-security/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 11:42:10 +0000</pubDate>
		<dc:creator>Sandro</dc:creator>
		
		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[account hijacking]]></category>

		<category><![CDATA[cookie hijack]]></category>

		<category><![CDATA[cross site scripting]]></category>

		<category><![CDATA[paypal security]]></category>

		<category><![CDATA[secret key]]></category>

		<category><![CDATA[security token]]></category>

		<category><![CDATA[session cookie]]></category>

		<category><![CDATA[steal cookies]]></category>

		<category><![CDATA[two factor authentication]]></category>

		<category><![CDATA[web application security]]></category>

		<category><![CDATA[web password]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=168</guid>
		<description><![CDATA[A few days ago PayPal announced that they will be supporting Mobile Access for the PayPal Security Key. This means that to log into their accounts, PayPal users receive a 6 digit security code via a text message. This feature obviously adds an extra layer of security since instead of simply relying on something you [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago PayPal announced that they will be supporting Mobile Access for the <a href="https://www.paypal.com/securitykey." target="_blank">PayPal Security Key</a>. This means that to log into their accounts, PayPal users receive a 6 digit security code via a text message. This feature obviously adds an extra layer of security since instead of simply relying on something you know, they now also check for something you have (a mobile phone number). Additionally PayPal have supported security tokens for quite a while, which also produces the a 6 digit security code.</p>
<p>These measures address security issues associated with passwords by introducing an additional secret that is not static. The problem with passwords is that they can be easily copied and abused. Additionally, it is not easy to choose a unique and hard to guess password for each service that you subscribe to.  That makes passwords one of the major security nightmares for services such as PayPal and your local bank. Two factor authentication addresses these concerns.</p>
<p>What two factor authentication does not target is web application security flaws. One of the questions that I have been asked when presenting my <a href="http://enablesecurity.com/2008/08/11/surf-jack-https-will-not-save-you/" target="_blank">Surf Jacking research</a> was &#8220;<em>but doesn&#8217;t the security token prevent stealing other user&#8217;s credentials?</em>&#8221; The answer to that is that yes it does but that does not prevent this particular attack. If your web application has a security flaw such as <a href="http://www.acunetix.com/websitesecurity/cross-site-scripting.htm">Cross Site Scripting</a> then the attacker never needs to get your credentials. Such attacks usually happen after the victim has authenticated by supplying his username, password and secret key. Once clients authenticate to a web application, the web application assigns a session cookie to the web client. Many account hijacking attacks target this behavior by stealing the session cookie rather than the password or the secret 6 digit key. What this means is that at the end of the day, the overall security of a web application does not only rely on strong authentication methods, but also on the security of the web application itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/two-factor-authentication-and-web-application-security/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AcuSensor Technology in action; finding backdoors in web applications</title>
		<link>http://www.acunetix.com/blog/web-security-articles/acusensor-technology-in-action-finding-backdoors-in-web-applications/</link>
		<comments>http://www.acunetix.com/blog/web-security-articles/acusensor-technology-in-action-finding-backdoors-in-web-applications/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 13:51:18 +0000</pubDate>
		<dc:creator>Bogdan Calin</dc:creator>
		
		<category><![CDATA[AcuSensor Technology]]></category>

		<category><![CDATA[Web Security Articles]]></category>

		<category><![CDATA[acunsensor]]></category>

		<category><![CDATA[backdoor]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.acunetix.com/blog/?p=153</guid>
		<description><![CDATA[On March 2, 2007 the following was posted on the Wordpress blog:
Long story short: If you downloaded WordPress 2.1.1 within the past 3-4 days, your files may include a security exploit that was added by a cracker, and you should upgrade all of your files to 2.1.2 immediately.
Longer explanation: This morning we received a note [...]]]></description>
			<content:encoded><![CDATA[<p>On March 2, 2007 the following was posted on the <a href="http://wordpress.org/development/2007/03/upgrade-212/">Wordpress blog</a>:</p>
<p><em>Long story short: If you downloaded WordPress 2.1.1 within the past 3-4 days, your files may include a security exploit that was added by a cracker, and you should upgrade all of your files to 2.1.2 immediately.</em></p>
<p><em>Longer explanation: This morning we received a note to our security mailing address about unusual and highly exploitable code in WordPress. The issue was investigated, and it appeared that the 2.1.1 download had been modified from its original code. We took the website down immediately to investigate what happened.<br />
It was determined that a cracker had gained user-level access to one of the servers that powers wordpress.org, and had used that access to modify the download file. We have locked down that server for further forensics, but at this time it appears that the 2.1.1 download was the only thing touched by the attack. They modified two files in WP to include code that would allow for remote PHP execution.</em></p>
<p>Basically, a cracker gained access to one of the Wordpress servers and modified two files from the Wordpress installation.  One of these files is theme.php (located in the wp-includes) directory where the cracker inserted the following pieces of the code:</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/11/code-from-theme.png" target="_blank"><img class="size-full wp-image-154 aligncenter" title="code-from-theme" src="http://www.acunetix.com/blog/wp-content/uploads/2008/11/code-from-theme.png" alt="" width="438" height="96" /></a></p>
<p style="text-align: center;"><strong>Screenshot 1 – Code from wp-includes/theme.php</strong></p>
<p>This modification introduced a system code execution vulnerability in the Wordpress code.<br />
It was possible to read the contents of the /etc/passwd file using an URL like:</p>
<p><strong>http://host/wordpress-2.1.1 infected/wp-includes/theme.php?iz=<span style="color: #ff0000;">cat+/etc/passwd</span></strong></p>
<p>A vulnerability like this one cannot be detected with a typical black box vulnerability scanner. The cracker introduced a new input parameter named <strong>‘iz’</strong> and the value of this parameter is sent through the <strong>‘passthru’</strong> function (the PHP passthru function will execute an external program and display raw output). This input parameter is not directly linked from anywhere; therefore a black box scanner will never know about this parameter and will not test it.</p>
<p>This is where the AcuSensor Technology comes into place; it builds a list with all the inputs from the application (by parsing the source code and intercepting variable access). E.g. on PHP it intercepts all the access to $_GET and $_POST arrays and build a comprehensive list with all the possible inputs.  Therefore, when scanning the application with AcuSensor Technology enabled, the <strong>‘iz’</strong> input parameter will be discovered and tested (as shown in the Screenshot 2).</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/11/parameter-iz.png" target="_blank"><img class="size-full wp-image-157 aligncenter" title="parameter-iz" src="http://www.acunetix.com/blog/wp-content/uploads/2008/11/parameter-iz.png" alt="" width="499" height="147" /></a></p>
<p style="text-align: center;"><strong>Screenshot 2 - Parameter iz found in theme.php</strong></p>
<p>Even more, the AcuSensor Technology will build a list with all the files in the application directory, therefore allowing us to scan for files which are not directly linked from the website. If an attacker gains access to the website and creates a backdoor file in the application directory, this file will be found and scanned if AcuSensor Technology is enabled.</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/11/acusensor-data.png" target="_blank"><img class="size-full wp-image-158 aligncenter" title="acusensor-data" src="http://www.acunetix.com/blog/wp-content/uploads/2008/11/acusensor-data.png" alt="" width="500" height="147" /></a></p>
<p style="text-align: center;"><strong>Screenshot 3 – Application Sensor Data (list of files from current directory)</strong></p>
<p>Because the <strong>‘iz’</strong> parameter is now found, the scanner can test it and report the vulnerability, as shown in the screenshot below.</p>
<p style="text-align: center;"><a href="http://www.acunetix.com/blog/wp-content/uploads/2008/11/alert-from-acusensor.png" target="_blank"><img class="size-full wp-image-159 aligncenter" title="alert-from-acusensor" src="http://www.acunetix.com/blog/wp-content/uploads/2008/11/alert-from-acusensor.png" alt="" width="500" height="408" /></a></p>
<p style="text-align: center;"><strong>Screenshot 4 – The alert reported by Acunetix WVS v6 with AcuSensor Technology</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acunetix.com/blog/web-security-articles/acusensor-technology-in-action-finding-backdoors-in-web-applications/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
