<?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>Techno WeBlog &#187; Security</title>
	<atom:link href="http://blog.codlib.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codlib.com</link>
	<description>Blogging about tech, the tech, and everything tech, for techno addicts!</description>
	<lastBuildDate>Thu, 04 Nov 2010 04:05:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP session is not working in IFrames in IE browsers</title>
		<link>http://blog.codlib.com/2009/06/18/php-session-is-not-working-in-iframes-in-ie-browsers/</link>
		<comments>http://blog.codlib.com/2009/06/18/php-session-is-not-working-in-iframes-in-ie-browsers/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 06:22:05 +0000</pubDate>
		<dc:creator>Jans</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.codlib.com/2009/06/18/php-session-is-not-working-in-iframes-in-ie-browsers/</guid>
		<description><![CDATA[Recently I have faced an issue with session in IFrames in IE Browsers. The issue is like session is not sharing between pages inside iframe particularly if you are accessing it in a different domain. The script will run smoothly without the iframe, but when i use the iframe in IE and safari it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have faced an issue with session in IFrames in IE Browsers. The issue is like session is not sharing between pages inside iframe particularly if you are accessing it in a different domain. The script will run smoothly without the iframe, but when i use the iframe in IE and safari it doesn&#8217;t work properly. This is because cross site scripting(XSS) </p>
<p>IE is very particular when it comes to &#8220;cross-site/cross-directory&#8221; linking in iFrames and sessions. If the iFrame contains or calls a script from a different directory then IE does not always pass the session header information. If the contents are called from another domain then absolutely it will not work.</p>
<p>I have eliminated the issue with some workaround. My workaround is as follows. </p>
<ol>
<li> If you notice the iframe SRC in IE browser, you can see that the URL is not modifying when you move to another page. It will   remain as it is and you will not be able to pass any new parameter. I have take this as an advantage and created one token and append it to the initial SRC. It is as follows.
<p>    &lt;iframe src=&#8221;http://www.example.com/?token=&lt;?php echo md5(uniqueid()); ?&gt;&#8221; &gt; &lt;/iframe&gt; </li>
<li>I have created a table for storing session and top of each page i am checking whether the token is exist in database. If it is not exist i am inserting it as a new entry in table. Here token is primary key and session is storing as a serialized object using php serialization function.</li>
<li>In each page i will get the same token from iframe src and i am checking the same exist in db. If exist in db fetch the serialized session, unserialize it and assign back to session.</li>
</ol>
<p>I don&#8217;t know is there any other good solution exists other than this. </p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.codlib.com/2009/06/14/html5-new-feature-storage-tables/" rel="bookmark" class="crp_title">HTML5 &#8211; New Feature &#8211; Storage Tables</a></li><li><a href="http://blog.codlib.com/2008/06/25/php-header-location-page-not-found-error/" rel="bookmark" class="crp_title">PHP Header Location &#8211; Page Not found Error.</a></li><li><a href="http://blog.codlib.com/2007/05/12/web-bugs-hack-or-solution/" rel="bookmark" class="crp_title">Web bugs: hack or solution?</a></li><li><a href="http://blog.codlib.com/2007/11/12/javascript-tips-tricks/" rel="bookmark" class="crp_title">Javascript Tips &#038; Tricks</a></li><li><a href="http://blog.codlib.com/2007/11/13/need-for-speed-css/" rel="bookmark" class="crp_title">Need for speed : CSS Compression</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.codlib.com/2009/06/18/php-session-is-not-working-in-iframes-in-ie-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reveal The Contents of Password Fields</title>
		<link>http://blog.codlib.com/2007/11/22/reveal-the-contents-of-password-fields/</link>
		<comments>http://blog.codlib.com/2007/11/22/reveal-the-contents-of-password-fields/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 05:31:03 +0000</pubDate>
		<dc:creator>Jans</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.codlib.com/2007/11/22/reveal-the-contents-of-password-fields/</guid>
		<description><![CDATA[If you chose the &#8220;Remember&#8221; option for logins in webpages, you can reveal it easily. It doesn&#8217;t require any software to reveal hidden passwords under asterisks and don&#8217;t need to waste your time in cracking master password.
Simply enter the following line of javascript below at the address bar and hit enter.
Javascript:(function(){var s,F,j,f,i; s = &#8220;&#8221;; [...]]]></description>
			<content:encoded><![CDATA[<p>If you chose the &#8220;Remember&#8221; option for logins in webpages, you can reveal it easily. It doesn&#8217;t require any software to reveal hidden passwords under asterisks and don&#8217;t need to waste your time in cracking master password.</p>
<p>Simply enter the following line of javascript below at the address bar and hit enter.</p>
<blockquote><p>Javascript:(function(){var s,F,j,f,i; s = &#8220;&#8221;; F = document.forms; for(j=0; j&lt;F.length; ++j) { f = F[j]; for (i=0; i&lt;f.length; ++i) { if (f[i].type.toLowerCase() == &#8220;password&#8221;) s += f[i].value + &#8220;\n&#8221;; } } if (s) alert(&#8220;Passwords in forms on this page:\n\n&#8221; + s); else alert(&#8220;There are no passwords in forms on this page.&#8221;);})();</p></blockquote>
<p>This method works on Internet Explorer, Firefox, Netscape and Opera.  Turning off javascript will protect you from this hack but then you might face problems viewing websites that uses javascript.</p>
<p><strong>Simple rule to protect your password</strong>. Do NOT save your password if you&#8217;re using a shared computer. If you&#8217;re using a public computer, make sure you clear the cache and private data just in case you accidentally saved your password.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.codlib.com/2008/09/04/google-chrome-new-missing-features/" rel="bookmark" class="crp_title">Google Chrome : New &#038; Missing Features</a></li><li><a href="http://blog.codlib.com/2007/06/22/number-validation-using-javascript/" rel="bookmark" class="crp_title">Number Validation Using JavaScript</a></li><li><a href="http://blog.codlib.com/2007/09/30/most-wanted-javascript-stringprototype-extensions/" rel="bookmark" class="crp_title">Most Wanted JavaScript String.prototype Extensions</a></li><li><a href="http://blog.codlib.com/2007/11/14/need-for-speed-javascript-compression/" rel="bookmark" class="crp_title">Need for speed : JavaScript Compression</a></li><li><a href="http://blog.codlib.com/2007/12/16/preventing-double-payments/" rel="bookmark" class="crp_title">Preventing Double Payments</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.codlib.com/2007/11/22/reveal-the-contents-of-password-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing spam on your website without using captcha</title>
		<link>http://blog.codlib.com/2007/10/18/preventing-spam-on-your-website-without-using-captcha/</link>
		<comments>http://blog.codlib.com/2007/10/18/preventing-spam-on-your-website-without-using-captcha/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 07:20:18 +0000</pubDate>
		<dc:creator>Jans</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.codlib.com/2007/10/18/preventing-spam-on-your-website-without-using-captcha/</guid>
		<description><![CDATA[This is an alternative to the image and audio captcha and it is much simpler than the other two methods.
1. Add an input field to your form, with some interesting name, for example ‘URL’.
&#60;input name=&#8221;url&#8221; type=&#8221;text&#8221; value=&#8221;"/&#62;
2. Hide the input box using css so that users(genuine) cannot see it directly.
&#60;style&#62;
.style1 {
display: none;
}
&#60;/style&#62;
&#60;p class=&#8221;style1&#8243;&#62;&#60;input name=&#8221;url&#8221; type=&#8221;text&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>This is an alternative to the image and audio captcha and it is much simpler than the other two methods.</p>
<p>1. Add an input field to your form, with some interesting name, for example ‘URL’.<br />
&lt;input name=&#8221;url&#8221; type=&#8221;text&#8221; value=&#8221;"/&gt;<br />
2. Hide the input box using css so that users(genuine) cannot see it directly.<br />
&lt;style&gt;<br />
.style1 {<br />
display: none;<br />
}<br />
&lt;/style&gt;<br />
&lt;p class=&#8221;style1&#8243;&gt;&lt;input name=&#8221;url&#8221; type=&#8221;text&#8221; value=&#8221;"/&gt;&lt;/p&gt;<br />
3. While processing the form check if the “url” contains any value. If it does, reject the post or put it for moderation.<br />
if (strlen(trim($_POST['url'])) &gt; 0){<br />
//It is a spam, reject this post here<br />
}<br />
4. any doubt? Well, it works simply because geniune users cannot see a hidden input box on your form and therefore, they won’t fill it, while robots can.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.codlib.com/2007/10/07/lucene-a-powerfull-search-engine/" rel="bookmark" class="crp_title">Lucene : A Powerfull Search Engine</a></li><li><a href="http://blog.codlib.com/2008/07/28/passing-multiple-arguments-to-a-javascript-function-at-runtime/" rel="bookmark" class="crp_title">Passing multiple Arguments to a JavaScript Function at Runtime</a></li><li><a href="http://blog.codlib.com/2007/05/30/php-magic-constants/" rel="bookmark" class="crp_title">PHP Magic Constants</a></li><li><a href="http://blog.codlib.com/2009/06/04/overriding-inline-css-style-definitions/" rel="bookmark" class="crp_title">Overriding Inline css style definitions.</a></li><li><a href="http://blog.codlib.com/2007/11/12/javascript-tips-tricks/" rel="bookmark" class="crp_title">Javascript Tips &#038; Tricks</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.codlib.com/2007/10/18/preventing-spam-on-your-website-without-using-captcha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web bugs: hack or solution?</title>
		<link>http://blog.codlib.com/2007/05/12/web-bugs-hack-or-solution/</link>
		<comments>http://blog.codlib.com/2007/05/12/web-bugs-hack-or-solution/#comments</comments>
		<pubDate>Sat, 12 May 2007 15:30:09 +0000</pubDate>
		<dc:creator>Jans</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.codlib.com/2007/05/12/web-bugs-hack-or-solution/</guid>
		<description><![CDATA[What is it?

A Web bug is an object that is embedded in a Web page or e-mail and is usually invisible to the user but allows checking that a user has viewed the page or e-mail. Alternative names are Web beacon, tracking bug, pixel tag, and clear gif.

Typically, a Web bug is a small (usually [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is it?<br />
</strong></p>
<p>A <span>Web bug</span> is an object that is embedded in a Web page or e-mail and is usually invisible to the user but allows checking that a user has viewed the page or e-mail. Alternative names are <em><span>Web beacon</span>, <span>tracking bug</span>, <span>pixel tag</span>, and <span>clear gif</span>.<br />
</em></p>
<p>Typically, a Web bug is a small (usually 1×1 pixels) transparent GIF image (or an image of the same color of the background) that is embedded in an HTML page, usually a page on the Web or the content of an e-mail. Whenever the user opens the page with a graphical browser or e-mail reader, the image is downloaded. This download requires the browser to request the image from the server storing it, allowing the server to take notice of the download. As a result, the organization running the server is informed of when the HTML page has been viewed.</p>
<p><strong>Anything other than image is used as a web bug?<br />
</strong></p>
<p>Yes. Also uses a trick involving IFRAMEs for tracking the user information’s<strong>.<br />
</strong></p>
<p><strong>What information is sent to a server when a Web Bug is viewed?<br />
</strong></p>
<p>These are the major information’s that send to the server,</p>
<ul type="disc">
<li>The IP address of the      computer that fetched the Web Bug</li>
<li>The URL of the page that the      Web Bug is located on</li>
<li>The URL of the Web Bug image</li>
<li>The time the Web Bug was      viewed</li>
<li>The type of browser that      fetched the Web Bug image</li>
<li>A previously set cookie value</li>
</ul>
<p><strong>How can I see a Web Bug on a page?</strong></p>
<p>A Web Bug can be found by viewing the HTML source code of a Web page and searching for IMG tags. A Web Bug will typically have its HEIGHT and WIDTH parameters in the IMG tag set to 1. Also for the tag to be a bug, the image should be loaded from a different server then the rest of the Web page.</p>
<p><strong>What kinds of uses does a Web Bug have in an Email message?</strong></p>
<ol start="1" type="1">
<li>A Web Bug can be used to find out if a particular Email message has been read by someone and if so, when the message was read.</li>
<li>A Web Bug can provide the IP      address of the recipient if the recipient is attempt to remain anonymous.</li>
<li>Within an organization, A Web      Bug can give an idea how often a message is being forwarded and read.</li>
</ol>
<p><strong>What do Web Bugs in Email messages look lile?</strong></p>
<p style="margin: 0in 0in 12pt 0.5in">Email Web Bugs are represented as 1-by-1 pixel IMG tags just like Web Bugs for Web pages. However, because the sender of the message already knows your Email address, they also include the Email address in the Web Bug URL. The Email address can be in plain text or encrypted. For example, here are two Web Bugs sent to me in junk Email messages:</p>
<p style="margin-left: 1in"><img src="http://www.m0.net/m/logopen02.asp?"  alt=" " height="1" width="1" /></p>
<p><img src="http://email.bn.com/cgi-bin/flosensing?x=ABYoAEhouX" alt=''/></p>
<p><strong>Want to see a bugged page?</strong></p>
<p>Yes. For a demonstration of a bugged Yahoo profile, see:</p>
<pre><span><span>    </span><a href="http://profiles.yahoo.com/webbug2000">http://profiles.yahoo.com/webbug2000</a> </span></pre>
<p>This profile contains a visible Web Bug image that is being loaded from a server other than Yahoo. The Web Bug provides a log of everyone who has visited the profile page.</p>
<p><strong>Finally, <span>Is there any method of removing Web Bugs from HTML pages?</span></strong></p>
<p>Not really. The technical problem is that there is no method of distinguishing Web Bugs from spacer GIFs which are used on Web pages for alignment purposes. Your best defense against Web Bugs is to turn off cookies.</p>
<p>Also you can prevent the email tracking by turning of the remote image loading. Almost all the standard mail clients like yahoo, gmail etc. are supporting this.</p>
<p>The IFRAME trick cannot be disabled by the standard countermeasure of turning off remote image loading. There may not be an easy way to disable it in today’s email software, short of turning off HTML email entirely</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.codlib.com/2007/10/25/image-for-your-very-own-e-mail-address/" rel="bookmark" class="crp_title">Image for your very own E-mail address</a></li><li><a href="http://blog.codlib.com/2007/05/09/top-10-html-email-mistakes/" rel="bookmark" class="crp_title">Top 10 HTML Email Mistakes</a></li><li><a href="http://blog.codlib.com/2007/11/18/firefox-tips/" rel="bookmark" class="crp_title">Firefox Tips</a></li><li><a href="http://blog.codlib.com/2007/06/11/how-to-send-sms-messages-from-a-computer/" rel="bookmark" class="crp_title">How to Send SMS Messages from a Computer?</a></li><li><a href="http://blog.codlib.com/2007/06/12/receiving-sms-messages-using-a-computer/" rel="bookmark" class="crp_title">Receiving SMS Messages Using a Computer ?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.codlib.com/2007/05/12/web-bugs-hack-or-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

