<?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>Kurinchi Blogger Scribbles ... &#187; php session fixation</title>
	<atom:link href="http://kurinchilamp.kurinchilion.com/tag/php-session-fixation/feed" rel="self" type="application/rss+xml" />
	<link>http://kurinchilamp.kurinchilion.com</link>
	<description>On Open Source Technologies</description>
	<lastBuildDate>Mon, 02 Jan 2012 06:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>PHP Security: Preventing Session Fixation</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html#comments</comments>
		<pubDate>Tue, 28 Jul 2009 03:31:04 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[php security measure]]></category>
		<category><![CDATA[php session fixation]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[session fixation]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=531</guid>
		<description><![CDATA[Session Fixation is method by which an intruder creates a session id which gets carried on when a user comes with that path and continues his/her activity on a website. For e.g. an intruder may create a link to a site called samplesite.com as &#60;a href=&#8221;http://samplesite.com/cart.php?PHPSESSID=Ax23mDud&#8221; /&#62;Sample Site&#60;a&#62; When a user clicks on this link [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Session Fixation </strong>is method by which an intruder creates a session id which gets carried on when a user comes with that path and continues his/her activity on a website.</p>
<p>For e.g. an intruder may create a link to a site called samplesite.com as &lt;a href=&#8221;http://samplesite.com/cart.php?PHPSESSID=Ax23mDud&#8221; /&gt;Sample Site&lt;a&gt;</p>
<p>When a user clicks on this link the session id gets carried on to the site &#8216;<em>samplesite.com</em>&#8216;. The intruder waits for the user starts to perform a transaction on the site and will take over vital details by intruding user&#8217;s activity on samplesite.com.<br />
<span id="more-531"></span><br />
<strong>How to prevent Session Fixation in PHP?</strong></p>
<p>i) Regenerate session id&#8217;s at every juncture where necessary (usage of session_regeneration_id() function)</p>
<p>ii) Avoid passing session id&#8217;s in GET/POST variables</p>
<p>iii) If you have a blacklisted referrer list, you can possibly compare the referrer before generating the session for each user. You can also check the referrer on the top of the program in the pages where session based activity is carried out</p>
<p>iv) Generate a session id from the server and check if the session id was generted from the server and if it is not empty. </p>
<p>v) Expire a session after a valid interval and never let it go unexpired.</p>
<p><em>Reference</em>: </p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Session_fixation" target="_blank">Wikipedia</a></li>
<li><a href="http://www.webappsec.org/projects/threat/classes/session_fixation.shtml" target="_blank">Webappsec</a></li>
<li><a href="http://shiflett.org/articles/session-fixation" target="_blank">shiflett.org</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

