<?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>Computer Security Is My Interest! &#187; Security Articles</title>
	<atom:link href="http://soroush.secproject.com/blog/category/securityarticles/feed/" rel="self" type="application/rss+xml" />
	<link>http://soroush.secproject.com/blog</link>
	<description>Soroush Dalili's Weblog</description>
	<lastBuildDate>Thu, 01 Jul 2010 19:05:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Cross Site URL Hijacking by using Error Object in Mozilla Firefox</title>
		<link>http://soroush.secproject.com/blog/2010/05/cross-site-url-hijacking-by-using-error-object-in-mozilla-firefox/</link>
		<comments>http://soroush.secproject.com/blog/2010/05/cross-site-url-hijacking-by-using-error-object-in-mozilla-firefox/#comments</comments>
		<pubDate>Thu, 27 May 2010 00:04:05 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[My Advisories]]></category>
		<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>
		<category><![CDATA[Cross Site URL Hijacking]]></category>
		<category><![CDATA[Cross Site URL Hijacking by Error Object]]></category>
		<category><![CDATA[XSUH by error object]]></category>
		<category><![CDATA[XSUH in Mozilla Firefox]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=245</guid>
		<description><![CDATA[In this paper, I want to represent a method for performing Cross Site URL Hijacking (which we can call XSUH) by using the error object of Mozilla Firefox. XSUH attack is used to steal another website URL. This URL can show the client’s situation on that website, and it can contain confidential parameters such as [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In this paper, I want to represent a method for performing <strong>Cross Site URL Hijacking</strong> (which we can call <strong>XSUH</strong>) by using the<strong> error object</strong> of <strong>Mozilla Firefox</strong>. XSUH attack is used to steal another website URL. This URL can show the client’s situation on that website, and it can contain confidential parameters such as session ID as well. There is another useful article with a similar purpose but with a different approach which is “XSHM” article of CHECKMARX , and reading this article is highly recommended to you as well.<br />
As you might know, scripts error handling in Mozilla Firefox is quite useful for the developers as it can show the exact source of an error with some useful information. Now, this functionality can be misused to divulge the destination URL after the redirections (XSUH attack) which can lead to condition leakage or stealing some important parameters from the URL.</p>
<p><strong>Download From Here</strong>: <a href="http://soroush.secproject.com/downloadable/XSUH_FF_1.pdf">http://soroush.secproject.com/downloadable/XSUH_FF_1.pdf</a><br />
<strong>Or Here</strong>: <a href="http://0me.me/demo/XSUH/XSUH_FF_1.pdf">http://0me.me/demo/XSUH/XSUH_FF_1.pdf</a></p>
<p><strong>Proof of Concept</strong>: <a href="http://0me.me/demo/XSUH/XSUH_demo_firefox_all_in_1.html">http://0me.me/demo/XSUH/XSUH_demo_firefox_all_in_1.html</a></p>
<p>Note:  This technique has been tested on Mozilla Firefox 3.6.3, 3.5.9, 3.6.4build5 (26th May 2010).</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2010/05/cross-site-url-hijacking-by-using-error-object-in-mozilla-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Method: Role of the “/” character in mapping the website directories! &#8211; Webservers fault?</title>
		<link>http://soroush.secproject.com/blog/2010/05/new-method-role-of-the-%e2%80%9c%e2%80%9d-character-in-mapping-the-website-directories/</link>
		<comments>http://soroush.secproject.com/blog/2010/05/new-method-role-of-the-%e2%80%9c%e2%80%9d-character-in-mapping-the-website-directories/#comments</comments>
		<pubDate>Thu, 06 May 2010 23:54:44 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>
		<category><![CDATA[Mapping directory]]></category>
		<category><![CDATA[Mapping folder]]></category>
		<category><![CDATA[Slash role]]></category>
		<category><![CDATA[using slash as a signature]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=240</guid>
		<description><![CDATA[One of the first steps of a black-box penetration testing of a website is mapping its files and directories.  And in order to do that, security scanners crawl into the website first, and then try to guess the possible directories and files. These scanners use the response header or body of the page to investigate [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">One of the first steps of a black-box penetration testing of a website is mapping its files and directories.  And in order to do that, security scanners crawl into the website first, and then try to guess the possible directories and files. These scanners use the response header or body of the page to investigate a valid file or directory. For instance, the header status “404” can be the sign of “File Not Found” and “200” can be the sign of a valid file. Also, the status “403 Forbidden” can be the sign of a valid directory without any index page. However, many websites such as Yahoo, Google, Facebook, Microsoft, and so on do not like to show the “403 Forbidden” errors for a valid directory, and instead, they show a “Page Not found” or another default page to the users. Although this functionality makes the website more user-friendly, it is not good for the scanners at all; as there is no difference between a valid and an invalid directory then.</p>
<p style="text-align: justify;">Therefore, we need something else as a signature to improve the scanners result. And as a solution we can use a “/” as an identifier. In case of requesting a valid directory without adding a slash at the end of it, the web-server will add an slash automatically, and in case of having an invalid directory there will not be any slash at the end of the directory name.</p>
<p>Some examples:</p>
<p>Invalid Directory: <a href="http://www.microsoft.com/foobars">http://www.microsoft.com/foobars</a></p>
<p>Valid Directory: <a href="http://www.microsoft.com/test">http://www.microsoft.com/test</a></p>
<p>&#8212;&#8212;&#8211;</p>
<p>Invalid Directory: <a href="http://code.google.com/foobars">http://code.google.com/foobars</a></p>
<p>Valid Directory: <a href="http://code.google.com/js">http://code.google.com/js</a></p>
<p>&#8212;&#8212;&#8211;</p>
<p>Invalid Directory: <a href="http://www.facebook.com/foobars">http://www.facebook.com/foobars</a></p>
<p>Valid Directory: <a href="http://www.facebook.com/admin">http://www.facebook.com/admin</a></p>
<p>&#8212;&#8212;&#8211;</p>
<p>Invalid Directory: <a href="http://uk.yahoo.com/foobars">http://uk.yahoo.com/foobars</a></p>
<p>Valid Directory: <a href="http://uk.yahoo.com/private">http://uk.yahoo.com/private</a></p>
<p>&#8212;&#8212;&#8211;</p>
<p>Cheers,</p>
<p><strong>Soroush Dalili</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2010/05/new-method-role-of-the-%e2%80%9c%e2%80%9d-character-in-mapping-the-website-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improve File Uploaders’ Protections &#8211; Bypass Methods- Rev. 1.0</title>
		<link>http://soroush.secproject.com/blog/2010/03/improve-file-uploaders%e2%80%99-protections-rev-1-0/</link>
		<comments>http://soroush.secproject.com/blog/2010/03/improve-file-uploaders%e2%80%99-protections-rev-1-0/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 23:59:35 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[fckeditor bypass methods]]></category>
		<category><![CDATA[file uploader bypass methods]]></category>
		<category><![CDATA[file uploader security bypass]]></category>
		<category><![CDATA[file uploader security improvement]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=232</guid>
		<description><![CDATA[Some new methods of bypassing file uploaders protections have been discussed. As an example bypassing by using: trailing spaces and dots, “::$data.”, direct Null char, IIS semi-colon  bug, and so on. Uploading files by using web applications is very common. However, there is always a high risk around this matter. In case of uploading a [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<p style="text-align: justify;"><span style="color: #ff0000;"><span style="color: #000000;">Some new methods of bypassing file uploaders protections have been discussed. As an example bypassing by using:<strong> </strong></span><span style="color: #000000;"><strong>trailing spaces and dots, </strong><strong>“::$data.”, </strong><strong>direct Null char, IIS semi-colon  bug,</strong> and so on.</span></span></p>
</blockquote>
<p style="text-align: justify;">Uploading files by using web applications is very common. However, there is always a high risk around this matter. In case of uploading a web-shell file which can be absolutely malicious, an attacker can get the same privilege of access as the web application to the server. In this paper, which is mostly around the Windows-based web applications, some general solutions for protecting against this type of attack have been suggested. Moreover, as a proof of concept, some of the most general protection methods and the way of bypassing them have been discussed.</p>
<p style="text-align: justify;">This article is an educational article to improve the security of the web applications. And, the author of this article (“Soroush Dalili”) does not accept and has no responsibility about the content or usage of this article in any other way. Any other usage of this article except the legal ones is completely prohibited.</p>
<p style="text-align: justify;">Please respect the copyright and mention the name of the author (“Soroush Dalili”) in case of using this article.</p>
<p style="text-align: left;"><a title="http://soroush.secproject.com/downloadable/Improve File Uploaders’ Protections.pdf" href="http://soroush.secproject.com/downloadable/Improve File Uploaders’ Protections.pdf" target="_blank"><strong>Download</strong> this article by clicking here.</a> (<a title="http://soroush.secproject.com/downloadable/Improve File Uploaders’ Protections.pdf" href="http://soroush.secproject.com/downloadable/Improve File Uploaders’ Protections.pdf" target="_blank">http://soroush.secproject.com/downloadable/Improve File Uploaders’ Protections.pdf</a>)</p>
<p style="text-align: justify;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2010/03/improve-file-uploaders%e2%80%99-protections-rev-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browsers’ Pain: A recursive function!</title>
		<link>http://soroush.secproject.com/blog/2009/12/browsers%e2%80%99-pain-a-recursive-function/</link>
		<comments>http://soroush.secproject.com/blog/2009/12/browsers%e2%80%99-pain-a-recursive-function/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 20:36:55 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>
		<category><![CDATA[Browsers’ Pain]]></category>
		<category><![CDATA[Mozilla Crash Function]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=188</guid>
		<description><![CDATA[I have written a recursive function by using Javascript “setInterval” function which calls itself. Unfortunately, none of the last version of famous browsers such as Internet Explorer (8), Chrome (3.0.195.38), and Mozilla Firefox (3.5.6) blocks this script. Moreover, it takes more than 50% of my CPU which is Intel Core 2 Dou 2.50 GHz. And [...]]]></description>
			<content:encoded><![CDATA[<p>I have written a recursive function by using Javascript “setInterval” function which calls itself. Unfortunately, none of the last version of famous browsers such as Internet Explorer (8), Chrome (3.0.195.38), and Mozilla Firefox (3.5.6) blocks this script. Moreover, it takes more than 50% of my CPU which is Intel Core 2 Dou 2.50 GHz.<br />
And the worst one is Mozilla Firefox which stops working after running this script instead of showing a page to stop the script.<br />
This script is:</p>
<blockquote><p>&lt;script&gt;<br />
function recursiveFunc(){setInterval(&#8220;recursiveFunc()&#8221;,1);}<br />
recursiveFunc();<br />
&lt;/script&gt;</p></blockquote>
<p>Just save it as an HTML file, and try to open it with your browsers. You can convert “1” to “0” to get better result in Mozilla Firefox and Chrome.<br />
I reported it to Mozilla Firefox as a bug.<br />
Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/12/browsers%e2%80%99-pain-a-recursive-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google captured my privacy!</title>
		<link>http://soroush.secproject.com/blog/2009/12/google-captured-my-privacy/</link>
		<comments>http://soroush.secproject.com/blog/2009/12/google-captured-my-privacy/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 15:32:40 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Normal Posts]]></category>
		<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Google captured my privacy]]></category>
		<category><![CDATA[Google captured your privacy]]></category>
		<category><![CDATA[Google is the best Firewall]]></category>
		<category><![CDATA[Google is the best Forensic Tool]]></category>
		<category><![CDATA[Privacy by Google]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=183</guid>
		<description><![CDATA[Google will be the best Firewall and Forensic Tool of the near future! Google will (or already) know the users&#8217; information! News: &#8220;Google pushes security with Public DNS&#8221; -&#62; So, Google DNS can collect all the websites which is viewed by the users &#8230; &#8220;Browsers use Google to detect web forgery -&#62; So, a browser [...]]]></description>
			<content:encoded><![CDATA[<h3><strong>Google will be the best Firewall and Forensic Tool of the near future!</strong></h3>
<p>Google will (or already) know the users&#8217; information!</p>
<p>News:</p>
<p>&#8220;Google pushes security with Public DNS&#8221; -&gt; So, Google DNS can collect all the websites which is viewed by the users &#8230;</p>
<p>&#8220;Browsers use Google to detect web forgery -&gt; So, a browser send a request to Google before openning a website for you! &#8230;</p>
<p>&#8220;The best search engine for all&#8221; -&gt; So, Google can collect your keywords! &#8230;</p>
<p>&#8220;The best public mail service&#8221; -&gt; So, Google can collect your emails &#8230;</p>
<p>&#8220;Google owned Youtube&#8221; -&gt; So, Google can collect your videos &#8230;</p>
<p>&#8220;Google codes&#8221; -&gt; So, Google can collect your source codes &#8230;</p>
<p>&#8220;Google documents&#8221; -&gt; So, Google can collect your documents &#8230;</p>
<p>&#8220;Google photos&#8221; -&gt; So, Google can collect your photos &#8230;</p>
<p>&#8220;Google messenger&#8221; -&gt; So, Google can collect the messages &#8230;</p>
<p>&#8220;Most of the websites use Google web analyzer (tracker)&#8221; -&gt; So, Google can track the websites&#8217; information and also their customers! &#8230;</p>
<p>&#8220;Google Wave&#8221; -&gt; So, Google can collect the blogs ,e-mails, instant messaging, FTPs, social networking’s, and so on&#8217;s information! &#8230;</p>
<p>&#8220;Google powerful translators&#8221; -&gt; So, Google can understand why you are saying in other languages!</p>
<p>&#8220;Searchable images/sounds/videos by text or another object!&#8221; -&gt; So, Google can search in users&#8217; collected data &#8230;</p>
<p>&#8220;Chrome OS&#8221; -&gt; So, Google can do anything with your computer &#8230;</p>
<p>AND <strong>etc</strong> (see <a href="http://www.google.co.uk/intl/en/options/" target="_blank">http://www.google.co.uk/intl/en/options/</a> and <a href="http://www.googlelabs.com/" target="_blank">http://www.googlelabs.com/</a>)&#8230;</p>
<p>We are waiting for the most powerful shopping centre by Google!</p>
<h3><strong>However, we should trust Google in order to have happier and easier life!</strong></h3>
<h3><strong>Google = No Pain, No Gain!</strong></h3>
<p>Best wishes ;)</p>
<p>Soroush</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/12/google-captured-my-privacy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My belief: 70% of websites are vulnerable</title>
		<link>http://soroush.secproject.com/blog/2009/11/my-belief-70-of-websites-are-vulnerable/</link>
		<comments>http://soroush.secproject.com/blog/2009/11/my-belief-70-of-websites-are-vulnerable/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 15:57:31 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>
		<category><![CDATA[Critical vulnerabilities]]></category>
		<category><![CDATA[CSRF Attacks]]></category>
		<category><![CDATA[OWASP top 10]]></category>
		<category><![CDATA[SQL Injection Vulnerability]]></category>
		<category><![CDATA[website vulnerability]]></category>
		<category><![CDATA[XSS Vulnerability]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=180</guid>
		<description><![CDATA[When I was searching for a ticket in nationalrail.co.uk website, I suddenly found an XSS and also a SQL Injection vulnerabilities in it. I reported these two vulns. to its website just for having more security. And, I think these two vulnerabilities are fixed now. However, I believe that still 70% of webistes are vulnerable [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">When I was searching for a ticket in nationalrail.co.uk website, I suddenly found an XSS and also a SQL Injection vulnerabilities in it.</p>
<p style="text-align: justify;">I reported these two vulns. to its website just for having more security. And, I think these two vulnerabilities are fixed now.</p>
<p style="text-align: justify;">However, <strong>I believe that still 70% of webistes are vulnerable against the <a href="http://owasp.org/">OWASP</a> TOP 10! </strong></p>
<p style="text-align: justify;">Also, I think you should read &#8220;<a href="http://www.securityfocus.com/brief/1036"><span>Survey: Majority of Web sites vulnerable</span></a>&#8221; as well.</p>
<p style="text-align: justify;">Cheers,</p>
<p style="text-align: justify;">Soroush</p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/11/my-belief-70-of-websites-are-vulnerable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to stop hardware key-loggers</title>
		<link>http://soroush.secproject.com/blog/2009/11/how-to-stop-hardware-key-loggers/</link>
		<comments>http://soroush.secproject.com/blog/2009/11/how-to-stop-hardware-key-loggers/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 14:33:22 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Normal Posts]]></category>
		<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Dynamic Keyboard]]></category>
		<category><![CDATA[Hardware Keyloggers]]></category>
		<category><![CDATA[Keyloggers]]></category>
		<category><![CDATA[Stop Hardware Keyloggers]]></category>
		<category><![CDATA[TPM for hardware keyloggers]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=171</guid>
		<description><![CDATA[Nowadays new generations of hardware key-loggers are emerged, and unfortunately attackers are using them intensively to steal the keystrokes of users. These key-loggers are OS independent and are in different shapes. They are even capable of stealing the BIOS password. Most of them look like a convertor for PS/2 and/or USB to PS/2 and/or USB [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Nowadays new generations of hardware key-loggers are emerged, and unfortunately attackers are using them intensively to steal the keystrokes of users. These key-loggers are OS independent and are in different shapes. They are even capable of stealing the BIOS password. Most of them look like a convertor for PS/2 and/or USB to PS/2 and/or USB (Fig. 1). Besides, some of them are chipsets which are embedded in the keyboard itself (Fig. 2). And others use electromagnetic features to steal the keystrokes which are put around the wire of the keyboard or work remotely by capturing the frequency spectrum of the keyboard communication<a href="#_ftn1">[1]</a>. The problem is that these hardware key-loggers have become very cheap and simply available<a href="#_ftn2">[2]</a>. Moreover, there are some free articles about how to make their circuits<a href="#_ftn3">[3]</a>.</p>
<p style="text-align: center;"><img class=" aligncenter" title="Simple Hardware Keyloggers" src="http://i45.tinypic.com/153216a.jpg" alt="Simple Hardware Keyloggers" width="400" height="120" /></p>
<p style="text-align: center;"><img class=" aligncenter" title="Embeded Hardware Keylogger" src="http://i45.tinypic.com/2sa1qhy.gif" alt="Figure 2. Embeded Hardware Keylogger" /></p>
<p style="text-align: justify;"><strong>So, how can we stop it if we could not remove its hardware from our computer or there is a danger of electromagnetic key-logger?</strong></p>
<p style="text-align: justify;">The first and the simplest idea is using an on-screen keyboard and click on it by using a mouse. However in order to get the best result, this on-screen keyboard should be dynamic in order to prevent a hardware key-logger for the mouse itself, which captures the mouse movements and its clicks. Another way is using encryption between the keyboard and its driver. For instance, there is no doubt that by using TPM and having strong encryption methods between keyboard and motherboard (or OS itself), the keyboard can encrypt the keystrokes before sending them to the computer. But, I want to be more initiative. Another idea can be using an optical-dynamic keyboard device which shows a keyboard on your desk or on your palm, and you can touch it in order to press a key (Fig. 3). There is also an application which claims that it can detect a hardware key-logger, but I have not tried it yet and I think it is still possible to hide a hardware key-logger completely from the OS.</p>
<div class="wp-caption aligncenter" style="width: 337px"><img class=" " title="iTech Dynamic Bluetooth Virtual Keyboard" src="http://i49.tinypic.com/r1kduf.jpg" alt="Figure 3." width="327" height="325" /><p class="wp-caption-text">Figure 3.</p></div>
<p style="text-align: justify;"><em>This text is completely based on my own idea, so please respect the copyright. </em></p>
<hr size="1" /><a href="#_ftnref1">[1]</a> http://keznews.com/4985_Researchers_hack_wired_keyboards__hijack_keystrokes</p>
<p><a href="#_ftnref2">[2]</a> http://www.google.co.uk/products?q=hardware+keylogger</p>
<p><a href="#_ftnref3">[3]</a> http://derek.chezmarcotte.ca/?page_id=24</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">
<p>.</p>
<p class="MsoNormal" style="text-align: justify;"><span>So, how can we stop it if we could not remove its hardware from our computer or there is a danger of electromagnetic key-logger?</span></p>
<p class="MsoNormal" style="text-align: justify;"><span>The first and the simplest idea is using an on-screen keyboard and click on it by using a mouse. However in order to get the best result, this on-screen keyboard should be dynamic in order to prevent a hardware key-logger for the mouse itself, which captures the mouse movements and its clicks. Another way is using encryption between the keyboard and its driver. For instance, there is no doubt that by using TPM and having strong encryption methods between keyboard and motherboard (or OS itself), the keyboard can encrypt the keystrokes before sending them to the computer. But, I want to be more initiative. Another idea can be using an optical-dynamic keyboard device which shows a keyboard on your desk or on your palm, and you can touch it in order to press a key (Fig. 3). There is also an application which claims that it can detect a hardware key-logger, but I have not tried it yet and I think it is still possible to hide a hardware key-logger completely from the OS.</span></p>
<p><span style="font-size: 11pt; line-height: 115%; font-family: &amp;amp;amp;">This text is completely based on my own idea, so please respect the copyright.</span></p>
<div>
<p><!--[if !supportFootnotes]--></p>
<hr size="1" /><!--[endif]--></p>
<div id="ftn1">
<p class="MsoFootnoteText"><a name="_ftn1" href="#_ftnref1"><span class="MsoFootnoteReference"><span lang="EN-GB"><span><!--[if !supportFootnotes]--><span class="MsoFootnoteReference"><span style="font-size: 10pt; line-height: 115%; font-family: &amp;amp;amp;" lang="EN-GB">[1]</span></span><!--[endif]--></span></span></span></a><span lang="EN-GB"> http://keznews.com/4985_Researchers_hack_wired_keyboards__hijack_keystrokes</span><span> </span></p>
</div>
<div id="ftn2">
<p class="MsoFootnoteText"><a name="_ftn2" href="#_ftnref2"><span class="MsoFootnoteReference"><span lang="EN-GB"><span><!--[if !supportFootnotes]--><span class="MsoFootnoteReference"><span style="font-size: 10pt; line-height: 115%; font-family: &amp;amp;amp;" lang="EN-GB">[2]</span></span><!--[endif]--></span></span></span></a><span lang="EN-GB"> http://www.google.co.uk/products?q=hardware+keylogger</span><span> </span></p>
</div>
<div id="ftn3">
<p class="MsoFootnoteText"><a name="_ftn3" href="#_ftnref3"><span class="MsoFootnoteReference"><span lang="EN-GB"><span><!--[if !supportFootnotes]--><span class="MsoFootnoteReference"><span style="font-size: 10pt; line-height: 115%; font-family: &amp;amp;amp;" lang="EN-GB">[3]</span></span><!--[endif]--></span></span></span></a><span lang="EN-GB"> http://derek.chezmarcotte.ca/?page_id=24</span><span> </span></p>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/11/how-to-stop-hardware-key-loggers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to prevent phishing attacks? ‐ In 3 Pages ‐</title>
		<link>http://soroush.secproject.com/blog/2009/11/how-to-prevent-phishing-attacks-%e2%80%90-in-3-pages-%e2%80%90/</link>
		<comments>http://soroush.secproject.com/blog/2009/11/how-to-prevent-phishing-attacks-%e2%80%90-in-3-pages-%e2%80%90/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 18:06:46 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>
		<category><![CDATA[Phishing attacks]]></category>
		<category><![CDATA[Phishing methods]]></category>
		<category><![CDATA[Phishing prevention]]></category>
		<category><![CDATA[XSS in phishing attacks]]></category>
		<category><![CDATA[XSS Vulnerability]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=166</guid>
		<description><![CDATA[In only 3 pages, I tried to explain Phishing attacks and prevention methods. Although there are some books about this topic, I tried to do my best in 3 pages only! :D I hope you enjoy :) Click here to download this mini-article! Cheers, Soroush]]></description>
			<content:encoded><![CDATA[<p>In only 3 pages, I tried to explain Phishing attacks and prevention methods. Although there are some books about this topic, I tried to do my best in 3 pages only! :D</p>
<p>I hope you enjoy :)</p>
<p><a title="phishing_in_3_pages_march_2009.pdf" href="http://soroush.secproject.com/downloadable/phishing_in_3_pages_march_2009.pdf" target="_blank">Click here to download this mini-article!</a></p>
<p>Cheers,</p>
<p>Soroush</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/11/how-to-prevent-phishing-attacks-%e2%80%90-in-3-pages-%e2%80%90/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finding vulnerabilities of YaFtp 1.0.14 (a client-side FTP application)</title>
		<link>http://soroush.secproject.com/blog/2009/11/finding-vulnerabilities-of-yaftp-1-0-14-a-client-side-ftp-application/</link>
		<comments>http://soroush.secproject.com/blog/2009/11/finding-vulnerabilities-of-yaftp-1-0-14-a-client-side-ftp-application/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 19:31:44 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[computer science vulnerabilities]]></category>
		<category><![CDATA[educational bug finding]]></category>
		<category><![CDATA[ftp vulnerabilities]]></category>
		<category><![CDATA[java vulnerabilities]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=160</guid>
		<description><![CDATA[Abstract: In this report we are going to find the vulnerabilities of YaFtp program, a client-side FTP application, and we are also going to suggest some mitigation methods. This process will be performed by using a specific plan which plays an important role in finding the security issues and analyzing the program. First of all [...]]]></description>
			<content:encoded><![CDATA[<p>Abstract: In this report we are going to find the vulnerabilities of YaFtp program, a client-side FTP application, and we are also going to suggest some mitigation methods. This process will be performed by using a specific plan which plays an important role in finding the security issues and analyzing the program. First of all we must understand the problem and gather the information which is related to this program. In fact, gathering the information is the most important phase in finding the vulnerabilities which clears the problem for us. In the next phase, model of the application will be drawn. Then, possible vulnerabilities will be discussed and we will draw two possible attack trees for YaFtp program. Finally, by using some automation tools and also manually, we will find the vulnerable candidate points, and we will investigate them to find the vulnerabilities. To summarize, 9 important vulnerabilities were found in this report. And, there are some solutions and suggestions in the last section of this report for developers of this application.</p>
<p><a title="YaFtp Vulns. Report" href="http://soroush.secproject.com/downloadable/yaftp-report.pdf" target="_blank">Click here to download the PDF file.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/11/finding-vulnerabilities-of-yaftp-1-0-14-a-client-side-ftp-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web application security in ASP &#8211; (simple) JSP</title>
		<link>http://soroush.secproject.com/blog/2009/08/web-application-security-in-asp-simple-jsp/</link>
		<comments>http://soroush.secproject.com/blog/2009/08/web-application-security-in-asp-simple-jsp/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 03:32:14 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[final project article]]></category>
		<category><![CDATA[soroush dalili]]></category>
		<category><![CDATA[Web application security in ASP]]></category>
		<category><![CDATA[Web application security in ASP - (simple) JSP]]></category>
		<category><![CDATA[Web application security in JSP]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=158</guid>
		<description><![CDATA[Language of this article is Farsi (Persian). This article is ready to download from these links: http://soroush.secproject.com/downloadable/ASP_Security_Soroush_Dalili.pdf or http://rapidshare.com/files/273684865/ASP_Security_Soroush_Dalili.zip Cheers Soroush]]></description>
			<content:encoded><![CDATA[<p>Language of this article is Farsi (Persian).</p>
<p>This article is ready to download from these links:</p>
<p><a href="http://soroush.secproject.com/downloadable/ASP_Security_Soroush_Dalili.pdf" target="_blank">http://soroush.secproject.com/downloadable/ASP_Security_Soroush_Dalili.pdf</a></p>
<p>or</p>
<p><a href="http://rapidshare.com/files/273684865/ASP_Security_Soroush_Dalili.zip" target="_blank">http://rapidshare.com/files/273684865/ASP_Security_Soroush_Dalili.zip</a></p>
<p>Cheers</p>
<p>Soroush</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/08/web-application-security-in-asp-simple-jsp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some XSS Tricks</title>
		<link>http://soroush.secproject.com/blog/2009/01/some-xss-tricks/</link>
		<comments>http://soroush.secproject.com/blog/2009/01/some-xss-tricks/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:47:07 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=125</guid>
		<description><![CDATA[I had submitted some XSS vulnerabilities in xssed.com by these names: BugReport.ir (before soroush.secproject.com website) And Soroush.SecProject.Com (nowadays) Now, because of using some tricks in these XSSes, they can be interesting. I want to describe some of these tricks here: 1- Insert JavaScript code inside of available script. In order to insert proper arbitrary JavaScript, [...]]]></description>
			<content:encoded><![CDATA[<p>I had submitted some XSS vulnerabilities in xssed.com by these names:</p>
<p>BugReport.ir (before soroush.secproject.com website)</p>
<p>And</p>
<p>Soroush.SecProject.Com (nowadays)</p>
<p>Now, because of using some tricks in these XSSes, they can be interesting. I want to describe some of these tricks here:</p>
<p>1- Insert JavaScript code inside of available script. In order to insert proper arbitrary JavaScript, we must insert something to close left side of JavaScript, then insert our own JavaScript, and finally close the right side of JavaScript to prevent errors.</p>
<p>As you can see in &#8220;http://www.xssed.com/mirror/39834/&#8221;, the XSS query is this:</p>
<p>?sx=&#8221;});};document.write(&#8216;This is XSS test &#8211; BugReport.ir&#8217;);alert(&#8216;Safe XSS BugReport.ir&#8217;);function startVideoPlayer(){getFailQS({destURL:&#8221;",show:&#8221;</p>
<p>In this query, first I closed the defined function by ["});};] , and then I inserted my arbitrary script there. After that, I used [function startVideoPlayer(){getFailQS({destURL:"",show:"]  to open a function to complete the right side of the code to prevent a JavaScript error.</p>
<p>You can see some other example of this group:</p>
<p>http://www.xssed.com/mirror/41138/</p>
<p>http://www.xssed.com/mirror/41800/</p>
<p>http://www.xssed.com/mirror/55622/</p>
<p>2- Insert JavaScript code in another format. Sometimes we can insert our JavaScript code via the some other forms of input such as Base64. In this way, we must look for algorithms of inputs.</p>
<p>As you can see in &#8220;http://www.xssed.com/mirror/55624/&#8221;, I inserted a Base64 string in order to perform XSS attack.</p>
<p>3- Using http://ha.ckers.org/xss.html techniques. There are always something new and fantastic in this XSS cheat sheet! I learned many things from it.</p>
<p>Example to bypass filters: &#8220;http://www.xssed.com/mirror/56197/&#8221;</p>
<p>4- Use your own idea to insert your codes. We must be creative in performing XSS. For example in &#8220;http://www.xssed.com/mirror/56651/&#8221;, I could not insert any string for my alert() function, so I insert something in title of the page, and then read them in my alert() function. It is obvious that I could use eval() function to execute some codes by this method.</p>
<p>?wrd=Tested in Mozilla (Onmouseover) &#8212; IRSDL is HERE &#8212; Soroush.SecProject.Com &#8212; Another XSS Trick in Yahoo&amp;prn=[irsdl]&amp;pth=test&amp;opt=onmouseover%3dalert(window.document.title.substring(15)) onmouseout%3dalert(/SeeYou/)</p>
<p>Another example is &#8220;http://www.xssed.com/mirror/40384/&#8221; which is based on the &#8220;http://www.bugreport.ir/index_38.htm&#8221;:</p>
<p>[DNN URL] /Default.aspx/&#8221;onmouseover=&#8221;x=&#8217;al&#8217;;x=x+&#8217;ert(/WWW.BugReport.IR/)&#8217;;eval(x);alert().aspx</p>
<p>In this XSS, I used a feature of .Net which is &#8220;Slash after .aspx&#8221; in order to change PATH_INFO parameter in Server Variable. As &#8220;Dot Net Nuke (DNN)&#8221; used PATH_INFO instead of URL parameter, path was inserted into the default.aspx page without any checking. So I inserted &#8220;onmouseover&#8221; event there. But, there was a problem with alert() function which DNN could recognize it and omit it plus all of the string after it! So, I inserted alert() function as a string into the &#8220;x&#8221; variable, and then evaluate it by using eval() function. Another problem was that DNN needed &#8220;.aspx&#8221; at the end of the request (before Get parameters)! So, I inserted an &#8220;alert().aspx&#8221; at the end of the query which I knew that DNN will omit it plus all the string after that.</p>
<p>Moreover, you can see in &#8220;http://www.bugreport.ir/index_38.htm&#8221; that I used another query which is:</p>
<p>http://[DNN URL]/Default.aspx/bugreport/&#8221;onmouseover=&#8221;var a=&#8217;.aspx?&#8217;;document.location=&#8217;http://www.bugreport.ir/?archive&#8217;;</p>
<p>In this example, I must use a &#8220;:&#8221; for the &#8220;http://www.bugreport.ir/?archive&#8221;, but I could not insert it before the &#8220;?&#8221; because of getting error by the IIS (&#8220;:&#8221; is used to indicate a port). So, I inserted a &#8220;.aspx?&#8221; in a temp &#8220;a&#8221; variable in order to have: 1- a &#8220;.aspx&#8221; at the end of the query (before Get parameters) 2- insert &#8220;:&#8221; into the &#8220;http://&#8221;.</p>
<p>Note: I could not use &#8220;onmoueover&#8221; after the &#8220;?&#8221; because it replaced the double quotation in Get parameter by %22.</p>
<p>Good Luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/01/some-xss-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackers can control their victims from free web hosting services!</title>
		<link>http://soroush.secproject.com/blog/2009/01/hackers-can-control-their-victims-from-free-web-hosting-services/</link>
		<comments>http://soroush.secproject.com/blog/2009/01/hackers-can-control-their-victims-from-free-web-hosting-services/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 01:28:13 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=105</guid>
		<description><![CDATA[By coming the powerful languages and new techniques for the web applications such as .Net, J2EE, PHP libraries, AJAX, and so on, we can have more powerful web applications. So, we must be happy because of these new technologies! But, hackers are also happy! Because by using these technologies, they can also design their tools [...]]]></description>
			<content:encoded><![CDATA[<p>By coming the powerful languages and new techniques for the web applications such as .Net, J2EE, PHP libraries, AJAX, and so on, we can have more powerful web applications.<br />
So, we must be happy because of these new technologies!<br />
But, hackers are also happy! Because by using these technologies, they can also design their tools easier, and disperse it all around the world, and control it from anywhere that they want. But, HOW?<br />
There are so many free web hosting in the Internet which do not need your correct information for registration. So, hackers can register a lot of accounts on them and setup their tools without concerning about compromising their identifications.<br />
Some of the hackers&#8217; tools are:<br />
Loggers -&gt; which log victims&#8217; information (by using some key loggers on the clients or XSS attacks).<br />
Request Senders -&gt; which send anonymous dangerous requests to the victims who can be a client or a server.<br />
Database Managers -&gt; which manage databases such as MSSQL, MySQL, Oracle, and so on remotely.<br />
Remote Desktop Managers -&gt; which connect to the computers by backshell or by a RDP. (I haven&#8217;t seen the graphical version yet!)<br />
Mail Senders -&gt; which send malicious emails to the clients.<br />
FTP Managers -&gt; which connect to a FTP with full modifying options.<br />
Exploit Executers -&gt; which execute malicious codes on the clients and the visitors to gain control of their computers.</p>
<p>I think anonymization with HTTP protocol is easier than the others when you are using TOR or some anonymous VPNs.<br />
So, I think:<br />
1- The free web hosting must have some process to identify their users correctly!<br />
2- Browsers must have some features to make free web hosting websites in max of security protection, and also, they must show some security warning about these websites.<br />
3- Firewalls and Antivirus must have some protection against these free websites.</p>
<p>Do you have any idea?</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/01/hackers-can-control-their-victims-from-free-web-hosting-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why using the &#8220;include&#8221; techniques are dangerous for the novice developers?</title>
		<link>http://soroush.secproject.com/blog/2009/01/why-using-include-techniques-are-dangerous-for-novice-developers/</link>
		<comments>http://soroush.secproject.com/blog/2009/01/why-using-include-techniques-are-dangerous-for-novice-developers/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 06:29:12 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=80</guid>
		<description><![CDATA[I don&#8217;t want to speak about the LFI (local file inclusion) or RFI (remote file inclusion) which we have a lot of articles about them. I just want to tell you about some simple facts ;) I have read a lot of source codes of web applications till now. And, I think one of the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t want to speak about the LFI (local file inclusion) or RFI (remote file inclusion) which we have a lot of articles about them.<br />
I just want to tell you about some simple facts ;)<br />
I have read a lot of source codes of web applications till now.<br />
And, I think one of the most important logical vulnerabilities is incorrect using of &#8220;include&#8221; techniques.<br />
I want to explain this by some examples:<br />
&#8212;&#8212;&#8212;&#8211; Begin Example1 &#8212;&#8212;&#8212;&#8211;<br />
Example1. (ASP, PHP, JSP, ?)<br />
Assume that we have:<br />
1. Admin.asp -&gt;(Secured) which includes Check.asp, Header.asp, Main.asp<br />
2. Check.asp -&gt; Check admin session<br />
3. Header.asp -&gt; is for showing the top menu<br />
4. Main.asp -&gt; is for showing the administrator&#8217;s main page</p>
<p>So, if I execute Index.asp, I will execute all 3 other files which I mentioned too.</p>
<p>Question: What will happen if I point to the Main.asp or Header.asp directly without using the Index.asp?<br />
Answer: If Main.asp or Header.asp does not include Check.asp, attacker can see the admin page without having the administrator credential!<br />
Result: I see a lot of web application which had this problem!</p>
<p>Now assume that Check.asp is something like this:<br />
&#8212;&#8212;&#8212;&#8211; Begin Check.asp &#8212;&#8212;&#8212;&#8211;<br />
<em>some lines of codes blah blah blah<br />
&lt;%<br />
&#8216; Get an input from the user<br />
1 Input_CurrentFolder = Request(&#8220;currentFolder&#8221;)</em></p>
<p><em>2 &#8216; in order to get the root directory we must set an admin session<br />
3 session(&#8220;admin&#8221;)=true</em></p>
<p><em>4 directory = GetDirectory(Input_CurrentFolder)</em></p>
<p><em>&#8216;Terminate admin session for the security!<br />
5 session(&#8220;admin&#8221;)=false</em></p>
<p><em>%&gt;<br />
some lines of codes blah blah blah</em><br />
&#8212;&#8212;&#8212;&#8211; End Check.asp &#8212;&#8212;&#8212;&#8211;</p>
<p>I want to speak about the session. What do you think about these codes? Is there any security problem?</p>
<p>Question1: How can a user keep session(&#8220;admin&#8221;)=true for him/herself?<br />
Answer1: In order to do that, user needs to stop execution on line 4!<br />
Question2: Now, how can a user stop execution on line 4?<br />
Answer2: User must stop running the program on line 4. So, he/she must create an error on that line! So, actually it depends on some factors. And, I want to show you 2 of them which the first one is related to subject of this article.</p>
<p>1- First situation: Check.asp does not contain &#8220;GetDirectory&#8221; function and this function is in Header.asp. Now if attacker point directly to the Check.asp, he/she can get the admin session! Because the program will be crashed on line 4!<br />
2- Another situation: the &#8220;GetDirectory&#8221; function must not work with each &#8220;Input_CurrentFolder&#8221;. In other words, &#8220;GetDirectory&#8221; function must crash because of some value of &#8220;Input_CurrentFolder&#8221;.<br />
Note: we must not have something like &#8220;On error resume next&#8221; which force the program to continue.<br />
Result: I think this vulnerability is not a strange one; However, it is not very common. I had seen this vulnerability in some programs such as the old version of &#8220;hosting controller&#8221;!<br />
&#8212;&#8212;&#8212;&#8211; End Example1 &#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;&#8211; Begin Example2 &#8212;&#8212;&#8212;&#8211;<br />
Example2. (PHP, ?)<br />
This is not new example but it is related to this subject.<br />
Assume that we have:<br />
1. SessionControl.php -&gt;(Secured) which control the user&#8217;s session<br />
2. EditContent.php -&gt; by using this file, administrator can edit the website&#8217;s pages<br />
3. AdminContent.php -&gt; (Secured) which includes SessionControl.php and EditContent.php.</p>
<p>And assume that EditContent.php is something like this:<br />
&#8212;&#8212;&#8212;&#8211; Begin EditContent.php &#8212;&#8212;&#8212;&#8211;<br />
<em>&lt;?<br />
if (!isset($_SESSION['Level'])) exit();<br />
if ($_SESSION['Level']==&#8217;admin&#8217;)<br />
{<br />
some lines of codes only for admin blah blah blah<br />
}<br />
?&gt;</em><br />
&#8212;&#8212;&#8212;&#8211; End EditContent.php &#8212;&#8212;&#8212;&#8211;</p>
<p>You can easily see that EditContent.php is insecure because there is not any session_start() in it and everyone can set $_SESSION['Level']. Just like this: http://[something]/EditContent.php?_SESSION[Level]=admin<br />
Note: php global variables must be on.<br />
&#8212;&#8212;&#8212;&#8211; End Example2 &#8212;&#8212;&#8212;&#8211;</p>
<p>So, you saw that the catastrophic vulnerability can easily create by the bad usage of &#8220;include&#8221; techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/01/why-using-include-techniques-are-dangerous-for-novice-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Incorrect solution to disable script execution by .htaccess</title>
		<link>http://soroush.secproject.com/blog/2009/01/incorrect-solution-to-disable-script-execution-by-htaccess/</link>
		<comments>http://soroush.secproject.com/blog/2009/01/incorrect-solution-to-disable-script-execution-by-htaccess/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 05:17:08 +0000</pubDate>
		<dc:creator>Soroush Dalili</dc:creator>
				<category><![CDATA[Security Articles]]></category>
		<category><![CDATA[Security Posts]]></category>

		<guid isPermaLink="false">http://soroush.secproject.com/blog/?p=50</guid>
		<description><![CDATA[I saw some people use this code in &#8220;.htaccess&#8221; to disable script execution: &#60;Files ~ &#8220;(php\.ini&#124;\.htaccess&#124;\.php.?&#124;\.pl&#124;\.cgi&#124;\.spc&#124;\.jsp&#124;\.cfm&#124;\.passwd)$&#8221;&#62; order deny,allow deny from all &#60;/Files&#62; But I think, this code is not secure at all. I bypass it by uploading a file with this name: &#8220;testpage.PhP&#8221;. (I tested it on my web hosting) The problem is: This code [...]]]></description>
			<content:encoded><![CDATA[<p>I saw some people use this code in &#8220;.htaccess&#8221; to disable script execution:</p>
<p style="text-align: left; padding-left: 30px;"><strong><span style="color: #ff0000;"><em>&lt;Files ~ &#8220;(php\.ini|\.htaccess|\.php.?|\.pl|\.cgi|\.spc|\.jsp|\.cfm|\.passwd)$&#8221;&gt;<br />
order deny,allow<br />
deny from all<br />
&lt;/Files&gt;</em></span></strong>
</p>
<p style="text-align: left;">But I think, this code is not secure at all. I bypass it by uploading a file with this name: &#8220;testpage.PhP&#8221;. (I tested it on my web hosting)</p>
<p style="text-align: left;">The problem is:</p>
<p style="text-align: left;"><strong>This code has a case sensitive regular expression.</strong></p>
<p style="text-align: left;">Note: &lt;FilesMatch&gt; is similar to &lt;Files&gt; with this problem</p>
<p style="text-align: left;">One solution: use this code instead of that code:</p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #008000;"><em><strong># secure directory by disabling script execution<br />
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi<br />
Options -ExecCGI</strong></em></span>
</p>
<p style="text-align: left;">Useful links:</p>
<p style="text-align: left;"><a href="http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html" target="_blank">http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html</a></p>
<p style="text-align: left;"><a href="http://blog.differentpixel.com/archives/198-Lots-of-.htaccess-tips,-tricks-and-hacks.html" target="_blank">http://blog.differentpixel.com/archives/198-Lots-of-.htaccess-tips,-tricks-and-hacks.html</a></p>
<p style="text-align: left;"><a href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/" target="_blank">http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/</a></p>
<p style="text-align: left;">
<p style="text-align: left;">Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://soroush.secproject.com/blog/2009/01/incorrect-solution-to-disable-script-execution-by-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.637 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-17 06:21:45 -->
