<?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>Deep ka Blog &#187; Security</title>
	<atom:link href="http://www.whoisdeep.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whoisdeep.com</link>
	<description>Deep inside........ Deep !!!!!!!</description>
	<lastBuildDate>Mon, 05 Jul 2010 07:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Saving yourself from contact form hijacking</title>
		<link>http://www.whoisdeep.com/2005/11/29/saving-yourself-from-contact-form-hijacking/</link>
		<comments>http://www.whoisdeep.com/2005/11/29/saving-yourself-from-contact-form-hijacking/#comments</comments>
		<pubDate>Tue, 29 Nov 2005 13:39:30 +0000</pubDate>
		<dc:creator>Deep</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tech Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.whoisdeep.com/2005/11/29/saving-yourself-from-contact-form-hijacking/</guid>
		<description><![CDATA[These days contact from hijacking is on runÃ¢â‚¬Â¦spammers are using weak contact forms to send spam emails and this makes a server black listed in many sites. The most of the AOL emails are targetted by the spammers. I came across this when one of my clientÃ¢â‚¬â„¢s contact form was hijacked and my server IP [...]]]></description>
			<content:encoded><![CDATA[<p>These days contact from hijacking is on runÃ¢â‚¬Â¦spammers are using weak contact forms to send spam emails and this makes a server black listed in many sites. The most of the AOL emails are targetted by the spammers.</p>
<p>I came across this when one of my clientÃ¢â‚¬â„¢s contact form was hijacked and my server IP got black listed. I figured out the problem with the help of <a href="http://spamblock.outblaze.com/spamchk.html">Outblaze</a> guys and fixed the issues with the form but that was not the fixed solution to this.</p>
<p><span id="more-304"></span></p>
<p><strong>Now what is contact form hijacking?</strong></p>
<p>The spammers pass invalid characters in headers through the form fields using bots / scripts.<br />
For example, they pass BCC header with MANY emails in any of the form fields and send out emails. They even modify the values passed in subject variable if its not fixed. In my case they were sending &#8220;diet pills&#8221; spam mail using that form.</p>
<p>This works if we do not check for invalid characters in the form validation. </p>
<p>Example of it would be following code: </p>
<p><code>"sender@anonymous.www%0ACc:recipient@someothersite.xxx%0ABcc:somebloke@grrrr.xxx,someotherbloke@oooops.xxx"</code></p>
<p>This code adds CC and BCC field in the headers and the email will go to these people as well.</p>
<p><strong>How to stop it from our side and make the forms secure?</strong></p>
<p>If we check for CC and BCC or say recurrence of @ character on action page then it can be stopped. And we can log that IP and other details and take action. (Report spammer&#8217;s IP or something)</p>
<p>In PHP you can write a function which will do all necessary cleanup, code on <a href="http://thedemosite.co.uk/phpformmailer/source_code_php_form_mailer_more_secure_than_cgi_form_mailers.php">this page</a> would help you with it.</p>
<p>Many people say that it can be stopped by using <a href="http://en.wikipedia.org/wiki/Captcha">Captchas</a> (image verification scripts) but these days there are scripts which can decode Captchas too. No kidding, <a href="http://sam.zoy.org/pwntcha/">here</a> is the link which shows working example of captcha decoder script.</p>
<p><strong>How to stop it from server side?</strong></p>
<p>Since I run web hosting company so it is difficult to check each and every form used by clients, sit on it and clean it.</p>
<p>I then enabled few things on server side, i.e. I allowed only 100 emails to be sent from one domain in an hour. 2nd thing was I installed <a href="http://www.modsecurity.org">mod_security module</a> to take care of these spam mails.</p>
<p>If you are linux server admin then you should know what mod_security is and what it does. I must say it is a very powerful module; you can set rules in it and delete spam mails being sent from your server. It also allows many other rules like disabling few PHPBB and other exploits.  Disabling XSS and SQL injections etcÃ¢â‚¬Â¦.</p>
<p>I just had to add 2 lines to stop spam mails. The code will check for BCC headers and allow only 20 addresses in BCC per mail.</p>
<p>I am reading lot of stuff on mod_security and learning the stuff so I can try my level best to save the server from these kind of attacks.</p>
<p>Good reads for contact form hijacking would be:</p>
<p><strong>For end users: </strong></p>
<p>- <a href="http://securephp.damonkohler.com/index.php/Email_Injection">Info on email injection</a><br />
- <a href="http://thedemosite.co.uk/phpformmailer/source_code_php_form_mailer_more_secure_than_cgi_form_mailers.php">Secured PHP contact form</a><br />
- <a href="http://www.notonebit.com/projects/killbot/">Project Killbot</a></p>
<p><strong>For server admins:</strong></p>
<p>- <a href="http://www.anders.com/projects/sysadmin/formPostHijacking/">Info on form hijacking</a><br />
- <a href="http://www.modsecurity.org/">mod_security home page</a><br />
- <a href="http://www.gotroot.com/mod_security+rules">mod_security rules</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whoisdeep.com/2005/11/29/saving-yourself-from-contact-form-hijacking/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XSS in Google?</title>
		<link>http://www.whoisdeep.com/2005/02/18/xss-in-google/</link>
		<comments>http://www.whoisdeep.com/2005/02/18/xss-in-google/#comments</comments>
		<pubDate>Fri, 18 Feb 2005 17:40:10 +0000</pubDate>
		<dc:creator>Deep</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.whoisdeep.com/2005/02/18/xss-in-google/</guid>
		<description><![CDATA[I got an invitation from gmail team today&#8230; I think they have started sending invitations to the ones who had subscribed to &#8220;Receive gmail updates in mail&#8221; so in that mail..there is a link to &#8220;unsubscribe yourself&#8221; from the list&#8230; I clicked it and tried entering script code in that&#8230;it did not work&#8230;I tried again [...]]]></description>
			<content:encoded><![CDATA[<p>I got an invitation from gmail team today&#8230;</p>
<p>I think they have started sending invitations to the ones who had subscribed to &#8220;Receive gmail updates in mail&#8221;</p>
<p>so in that mail..there is a link to &#8220;unsubscribe yourself&#8221; from the list&#8230;</p>
<p>I clicked it and tried entering script code in that&#8230;it did not work&#8230;I tried again by adding &#8221; and then finally it worked after adding &#8220;> in variable email</p>
<p>Wanna see it action ?</p>
<p><a href="http://whoisdeep.com/4boards/google_xss.gif" rel="wp-prettyPhoto[g70]">Check the screenshot</a></p>
<p>You will see javascript alert saying &#8220;Hi&#8221;, I am sure you know what all you can do with it <img src='http://www.whoisdeep.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I have already mail google security team about this, I think they should fix this small issue in few hours&#8230;</p>
<p><b>UPDATE</b>: They are so quick&#8230;.I got reply from them in less than an hour&#8230;very impressive&#8230;. where our <a href="http://www.whoisdeep.com/2005/01/29/security-hole-in-indiatimes-shopping/">Indiatimes</a>, They have still not replied to my mail&#8230;they should learn something from google..</p>
<p>This is what I got from them<br />
<span id="more-70"></span></p>
<blockquote><p>Hi Deep,</p>
<p>Thanks for letting us know! We will fix this problem as soon as possible.</p>
<p>Also, if you would like a Google T-shirt, please send us your mailing address and t-shirt size, and we&#8217;ll send a shirt.</p>
<p>Thanks<br />
Google Security Team</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.whoisdeep.com/2005/02/18/xss-in-google/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Securing Redhat Linux Box</title>
		<link>http://www.whoisdeep.com/2005/02/17/securing-redhat-linux-box/</link>
		<comments>http://www.whoisdeep.com/2005/02/17/securing-redhat-linux-box/#comments</comments>
		<pubDate>Wed, 16 Feb 2005 20:13:57 +0000</pubDate>
		<dc:creator>Deep</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.whoisdeep.com/2005/02/17/securing-redhat-linux-box/</guid>
		<description><![CDATA[Wanna make your Redhat Box more secured ? Some great links for you&#8230; Take a look at this great post in ServerMatrix forums, points are very well explained&#8230;.and extremely useful Couple of more great resourses include Dedicated Server Tutorials &#038; Web Host Gear cheers Deep]]></description>
			<content:encoded><![CDATA[<p>Wanna make your Redhat Box more secured ?</p>
<p>Some great links for you&#8230;</p>
<p>Take a look at <a href="http://forums.servermatrix.com/viewtopic.php?t=4909">this great post</a> in <a href="http://forums.servermatrix.com">ServerMatrix forums</a>,  points are very well explained&#8230;.and extremely useful</p>
<p>Couple of more great resourses include <a href="http://www.dedicated-resources.com/">Dedicated Server Tutorials</a> &#038; <a href="http://www.webhostgear.com/">Web Host Gear</a></p>
<p>cheers<br />
Deep</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whoisdeep.com/2005/02/17/securing-redhat-linux-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Security Hole in Indiatimes Shopping Site</title>
		<link>http://www.whoisdeep.com/2005/01/29/security-hole-in-indiatimes-shopping/</link>
		<comments>http://www.whoisdeep.com/2005/01/29/security-hole-in-indiatimes-shopping/#comments</comments>
		<pubDate>Sat, 29 Jan 2005 09:09:20 +0000</pubDate>
		<dc:creator>Deep</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.whoisdeep.com/archives/2005/01/29/security-hole-in-indiatimes-shopping/</guid>
		<description><![CDATA[I found out about this yesterday when I was searching some product on Indiatimes Shopping website. It is very common security problem, it is basically a mistake in the coding part. It is called as Cross-Site Scripting (XSS). I have informed Indiatimes about it but till now I haven&#8217;t got any response from them What [...]]]></description>
			<content:encoded><![CDATA[<p>I found out about this yesterday when I was searching some product on <a href="http://shopping.indiatimes.com" target="_blank">Indiatimes Shopping website</a>. It is very common security problem, it is basically a mistake in the coding part. It is called as <a href="http://www.answers.com/main/ntquery?dym=0&#038;cid=1372521554&#038;method=6" target="_blank">Cross-Site Scripting (XSS)</a>.</p>
<p>I have informed Indiatimes about it but till now I haven&#8217;t got any response from them <img src='http://www.whoisdeep.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><b>What is this security hole all about?</b><br />
In simple words, a person can ask you to click on the link and once you click on it, he can do whatever he wants&#8230;he can show Login Page or page asking for credit card details&#8230;</p>
<p>And once you enter the details..everything will be mail to him&#8230;infact he may try to do lot more than that..he may try to exploit the loopholes in your system&#8230;</p>
<p>I have submitted this to <a href="http://securityfocus.com/archive/1" target="_blank">BugTraq</a> also&#8230;</p>
<p><b>Wanna read technical Details?</b> Sure&#8230;thing..click on &#8220;More&#8221; link&#8230;<br />
<span id="more-51"></span></p>
<p><b>Technical Details&#8230;</b> (I have sent same to Bugtraq mailing list also)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
Name : IndiaTimes Shopping &#8211; XSS Vulnerability <br />
WebSite : <a href="http://shopping.indiatimes.com" target="_blank">http://shopping.indiatimes.com </a><br />
Date : January 29, 2005 <br />
Vuln Type : Cross site scripting <br />
Severity : Moderate <br />
Vendor : Unknown </p>
<p>HomePage : <a href="http://www.indiatimes.com" target="_blank">www.indiatimes.com </a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
SITE DESCRIPTION: <br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
Indiatimes Shopping provides an ideal platform for Clients/ Merchants to set up a shop and enable themselves to reach directly to the consumer. Indiatimes has enabled more than 200 brands/ manufacturers/ service providers. With business volumes growing at the rate of 200%, Indiatimes is constantly adding new merchants/ sellers to its marketplace and retaining the successful ones. </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
VULNERABILITY INFO: <br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- </p>
<p><a href="http://shopping.indiatimes.com/webapp/commerce/command/ExecMacro/Indiatimes_Shop/macros/singlemacrosnew/Product.d2w/report" target="_blank">The security hole is basically on page </a></p>
<p>What is happening? </p>
<p>When they are listing the products in the page, they are also passing page title in the query string. <br />
But while passing the title, they have not used any function like htmlentities() (which we use in PHP) so because of this, the query string allows me to pass HTML code using Javascript&#8230; </p>
<p>For example&#8230; </p>
<p><a href="http://shopping.indiatimes.com/webapp/commerce/command/CategoryDisplay?parentcat=753736&#038;cgmenbr=195102&#038;cgrfnbr=773772&#038;merchant_rn=195102&#038;what=MP3%20Players" target="_blank">When you go to this page </a></p>
<p>And click on any product, you will see that it passes variable in title &amp; in the query string with name of the product. </p>
<p>And they are printing value of same variable in Page Title and to show current location (Indiatimes &gt; Shopping &gt; Category &gt; Product Name (From title variable) </p>
<p><a href="http://shopping.indiatimes.com/webapp/commerce/command/ExecMacro/Indiatimes_Shop/macros/singlemacrosnew/Product.d2w/report?prmenbr=195102&#038;prrfnbr=791688&#038;parentcat=753736&#038;product_rn=791688&#038;merchant_rn=195102&#038;catrfnum=773772&#038;cgrfnbr=773772&#038;title=Compact%20MP3%20Player%20&#038;testURL=%252Fwebapp%252Fcommerce%252Fcommand%252FCategoryDisplay%253Fparentcat%253D753736%2526cgmenbr%253D195102%2526cgrfnbr%253D773772%2526merchant_rn%253D195102%2526title%253DMP3%2520Players%2526what%253DMP3%2520Players" target="_blank">This is the page I am talking about&#8230;. </a></p>
<p>Now if you replace page title with JavaScript code then instead of showing code as it is, it executes the code i.e. does not show the code as plain text. </p>
<p><b>UPDATE: 14th Feb 2005</b></p>
<p><a href="http://whoisdeep.com/indredir.php" target="_blank"><b>Example of code can be following</b></a></p>
<p><b>This will redirect to page http://whoisdeep.com/indcr.html and show fake login page</b> </p>
<p>This is just a simple example, I am sure that you can do a lot more things with this XSS vulnerability.</p>
<p><b>We can also use this security hole with latest vulnerability in non IE browsers i.e. Firefox, Opera etcÃ¢â‚¬Â¦ (make this more real so that even techie person might find it real)</b></p>
<p><b>How?</b></p>
<p>In recent exploit found by <a href="http://www.shmoo.com">Shmoo</a>, you can spoof the domain address. User will see it as Indiatimes.com but in reality the domain name will be something else. </p>
<p>For example, visit <a href="http://www.shmoo.com/idn/">this page</a></p>
<p>Clicking on any of the two links in the above webpage using anything but IE should result in a spoofed paypal.com webpage. </p>
<p>The links are directed at &#8220;http://www.p&#1072;ypal.com/&#8221;, which the browsers punycode handlers render as www.xn--pypal-4ve.com.</p>
<p>For detailed information about this exploit you can visit <a href="http://www.shmoo.com/idn/homograph.txt">this page</a></p>
<p>This is just a simple example, I am sure that you can do a lot more things with this XSS vulnerability. </p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
IMPACT: <br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
Exploit can be used in fraud emails asking users to enter their personal details like Login, Password, Credit Card info etc&#8230; </p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
SOLUTION: <br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />
I have mailed them about the same yesterday but there has been no response from their side.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whoisdeep.com/2005/01/29/security-hole-in-indiatimes-shopping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
