<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: PHP - Implementing Secure Login with PHP, JavaScript, and Sessions (without SSL)</title>
	<atom:link href="http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html/feed" rel="self" type="application/rss+xml" />
	<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html</link>
	<description>Official Blog of Marakana Training Company. We provide open source technology training for corporations and governments. Marakana Blog includes code examples and covers industry news and events.</description>
	<pubDate>Sun, 14 Mar 2010 10:01:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: leef</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-214847</link>
		<dc:creator>leef</dc:creator>
		<pubDate>Tue, 12 Jan 2010 09:51:32 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-214847</guid>
		<description>If we're considering that the users traffic is being sniffed, why can't the attacker just capture the incoming salt, or salted hashed password + username and login with their own script?</description>
		<content:encoded><![CDATA[<p>If we're considering that the users traffic is being sniffed, why can't the attacker just capture the incoming salt, or salted hashed password + username and login with their own script?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tienod</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-213786</link>
		<dc:creator>tienod</dc:creator>
		<pubDate>Fri, 25 Dec 2009 09:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-213786</guid>
		<description>Hi!
There is a major security problem in this aproach.
You mention, that you do not need TLS aka SSL for this method. Your JavaScript would prevent MITM-Attacks.
But the truth is, if someone is able to perform a MITM then he can also change the content sent to the browser. There are two methods in my mind for attacking this:
1) Send a different md5 javascript function. This could perform as the original, but also generates a hidden field in the form with the original password and username. So the information is sent in clear text for the attacker and hashed for your script.
2) Change the action="" attribute of your form and disable the javascript (onclick, onsubmit, whatever). So the username and pass the user typed in the form will be sent to my page.
Sorry, but this script will not prevent any type of MITM.</description>
		<content:encoded><![CDATA[<p>Hi!<br />
There is a major security problem in this aproach.<br />
You mention, that you do not need TLS aka SSL for this method. Your JavaScript would prevent MITM-Attacks.<br />
But the truth is, if someone is able to perform a MITM then he can also change the content sent to the browser. There are two methods in my mind for attacking this:<br />
1) Send a different md5 javascript function. This could perform as the original, but also generates a hidden field in the form with the original password and username. So the information is sent in clear text for the attacker and hashed for your script.<br />
2) Change the action="" attribute of your form and disable the javascript (onclick, onsubmit, whatever). So the username and pass the user typed in the form will be sent to my page.<br />
Sorry, but this script will not prevent any type of MITM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shah</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-212767</link>
		<dc:creator>shah</dc:creator>
		<pubDate>Thu, 03 Dec 2009 11:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-212767</guid>
		<description>Hi Tried using this script for my website. But some how $REQUEST[username] always takes username as tomcat, No matter what I give in username field. Any guess what is going wrong ?</description>
		<content:encoded><![CDATA[<p>Hi Tried using this script for my website. But some how $REQUEST[username] always takes username as tomcat, No matter what I give in username field. Any guess what is going wrong ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kennie</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-209288</link>
		<dc:creator>Kennie</dc:creator>
		<pubDate>Mon, 28 Sep 2009 18:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-209288</guid>
		<description>Great script..!!

Is there some way it can be adjusted to function on different homepages placed on the same server without remembering the session. I have placed this script on some different homepages and when I log into homepage1 I can go directly to the secret site on homepage two without signing in even though usernames and passwords are dont match.</description>
		<content:encoded><![CDATA[<p>Great script..!!</p>
<p>Is there some way it can be adjusted to function on different homepages placed on the same server without remembering the session. I have placed this script on some different homepages and when I log into homepage1 I can go directly to the secret site on homepage two without signing in even though usernames and passwords are dont match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: makemoneyonlinewithaffiliateprogramgirl</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207990</link>
		<dc:creator>makemoneyonlinewithaffiliateprogramgirl</dc:creator>
		<pubDate>Tue, 01 Sep 2009 08:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207990</guid>
		<description>It is a piece of great news to know about GA! It occupies a large proportion of my earning.</description>
		<content:encoded><![CDATA[<p>It is a piece of great news to know about GA! It occupies a large proportion of my earning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Алексей</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207057</link>
		<dc:creator>Алексей</dc:creator>
		<pubDate>Tue, 18 Aug 2009 00:28:19 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207057</guid>
		<description>На таких громких заголовках и подобной шумихе можно делать и не такие успехи :)</description>
		<content:encoded><![CDATA[<p>На таких громких заголовках и подобной шумихе можно делать и не такие успехи <img src='http://marakana.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sylvain Robichaud</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207023</link>
		<dc:creator>Sylvain Robichaud</dc:creator>
		<pubDate>Mon, 17 Aug 2009 11:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207023</guid>
		<description>shitty website</description>
		<content:encoded><![CDATA[<p>shitty website</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sylvain Robichaud</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207022</link>
		<dc:creator>Sylvain Robichaud</dc:creator>
		<pubDate>Mon, 17 Aug 2009 11:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207022</guid>
		<description>it didnt like the hole paste, so just this



instead of this

</description>
		<content:encoded><![CDATA[<p>it didnt like the hole paste, so just this</p>
<p>instead of this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sylvain Robichaud</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207020</link>
		<dc:creator>Sylvain Robichaud</dc:creator>
		<pubDate>Mon, 17 Aug 2009 11:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-207020</guid>
		<description>For those who still wonder how to make the form working with ENTER and CLICK, just change the &#60;input type="button" as &#60;input type="submit" and remove the onclick from it

should look like this at the end

  
            
                
                
                    Error
                    
                
                
                
                    User Name:
                    
                
                
                    Password:
                    
                
                
                    &#160;
                    
                        &#60;input type="hidden" name="challenge" value=""/&#62;
                        
                    
                
            
        
        
            
                
                
            
        </description>
		<content:encoded><![CDATA[<p>For those who still wonder how to make the form working with ENTER and CLICK, just change the &lt;input type="button" as &lt;input type="submit" and remove the onclick from it</p>
<p>should look like this at the end</p>
<p>                    Error</p>
<p>                    User Name:</p>
<p>                    Password:</p>
<p>                    &nbsp;</p>
<p>                        &lt;input type="hidden" name="challenge" value=""/&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaa</title>
		<link>http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-194849</link>
		<dc:creator>aaa</dc:creator>
		<pubDate>Fri, 29 May 2009 15:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html#comment-194849</guid>
		<description>hey i found a bug in your code. i see that it has been a while so i dont know if you have fixed it yet.but :
in firefox, install http live headers and firebug. 
firebug will allow you to view the html on the web page. as well as hidden fields.when looking at the hidden fields, you can get the current challenge string and use that for a replay attack.

firebug and live http headers where the tools i used, there could be others. iam thinking of a solution to this. if i find one ill let you know. but if anyone has a solution for this please let me know.

one idea i have is have a separate php class that handles all the challenge strings but i am not too happy on the idea.it just feels like a ducktape and bubble gum solution.</description>
		<content:encoded><![CDATA[<p>hey i found a bug in your code. i see that it has been a while so i dont know if you have fixed it yet.but :<br />
in firefox, install http live headers and firebug.<br />
firebug will allow you to view the html on the web page. as well as hidden fields.when looking at the hidden fields, you can get the current challenge string and use that for a replay attack.</p>
<p>firebug and live http headers where the tools i used, there could be others. iam thinking of a solution to this. if i find one ill let you know. but if anyone has a solution for this please let me know.</p>
<p>one idea i have is have a separate php class that handles all the challenge strings but i am not too happy on the idea.it just feels like a ducktape and bubble gum solution.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
