<?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>www.hacking-news.com &#187; XSS</title>
	<atom:link href="http://www.hacking-news.com/category/xss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hacking-news.com</link>
	<description>Hacking News, Random Security, Wireless Security</description>
	<lastBuildDate>Sun, 17 Jul 2011 16:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Italian develops first multi-site web-mail worm</title>
		<link>http://www.hacking-news.com/2007/07/italian-develops-first-multi-site-web-mail-worm/</link>
		<comments>http://www.hacking-news.com/2007/07/italian-develops-first-multi-site-web-mail-worm/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 12:32:08 +0000</pubDate>
		<dc:creator>zdnet.co.uk</dc:creator>
				<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.hacking-news.com/2007/07/13/italian-develops-first-multi-site-web-mail-worm/</guid>
		<description><![CDATA[An Italian security researcher this week has developed the first web-based email worm capable of taking advantage of cross site scripting (XSS) vulnerabilities in multiple web-mail services. Rosario Valotta described the new form of worm on his blog. The proof of concept, called Nduja Connection, could spread faster than a worm targeting only a single [...]]]></description>
			<content:encoded><![CDATA[<p>An Italian security researcher this week has developed the first web-based email worm capable of taking advantage of cross site scripting (XSS) vulnerabilities in multiple web-mail services.<br />
Rosario Valotta described the new form of worm on his blog. The proof of concept, called Nduja Connection, could spread faster than a worm targeting only a single web-mail provider, he said.</p>
<p><span id="more-151"></span></p>
<p>Email worms propagate by extracting contact information from the address book of each infected user, and then sending out an email with the worm payload to each contact â a user needs only to open an infected email message to spread the worm.</p>
<p>Prior-concept email worms have been restricted to affecting only one email client; however, the Nduja Connection worm has the potential to spread faster due to its ability to infect users of four different web email clients.</p>
<p>The four web-mail services affected by the worm are Italian providers Libero.it, Tiscali.it, Lycos.it and Excite.com. &#8220;The choice of the providers of this [proof of concept] has been bound to the presence of an exploitable [vulnerability] (with the above features) within the web-mail domain. Also other popular providers (for example Gmail, Yahoo, Hotmail) suffer from XSS [vulnerabilities] in their web-mails, but their severity is not so high to let worms like Nduja Connection to propagate,&#8221; Valotta wrote.</p>
<p>Web-mail worms have existed in the wild since 2006, when the Yamanner worm targeted the Yahoo email system and spread quickly throughout users of the system. It is difficult to quickly stop or slow the spread of this kind of worm once it has begun, due to its use of JavaScript. Turning off JavaScript in the browser renders the web-mail system unusable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacking-news.com/2007/07/italian-develops-first-multi-site-web-mail-worm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Child porn targeting forums using web script</title>
		<link>http://www.hacking-news.com/2007/06/child-porn-targeting-forums-using-web-script/</link>
		<comments>http://www.hacking-news.com/2007/06/child-porn-targeting-forums-using-web-script/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 18:53:18 +0000</pubDate>
		<dc:creator>computerworld.com</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.hacking-news.com/2007/06/15/child-porn-targeting-forums-using-web-script/</guid>
		<description><![CDATA[Sophos says Java-based content is to blame. Child pornography is being injected into web forums by hackers using Cross Site Scripting (XSS), a technique typically deployed to distribute malware. According to Sophos principal virus researcher Fraser Howard, the attacks occur because many websites allow Java-based content on their forums, or do not require adequate user [...]]]></description>
			<content:encoded><![CDATA[<p>Sophos says Java-based content is to blame. Child pornography is being injected into web forums by hackers using Cross Site Scripting (XSS), a technique typically deployed to distribute malware. According to Sophos principal virus researcher Fraser Howard, the attacks occur because many websites allow Java-based content on their forums, or do not require adequate user authentication for posting.</p>
<p><span id="more-69"></span></p>
<p>&#8220;Some of the same techniques that malware authors use in order to infect victims with malware are being used to distribute links and drive traffic to all sorts of web content,&#8221; Howard said.</p>
<p>&#8220;The attack targets legitimate message boards with hidden links to direct users to child pornography sites, and was even found on a site designed for children.</p>
<p>&#8220;Web hosts must deploy web filters which filter based on website categorisation, and inspect the code of every linked website prior to granting user access,&#8221; Howard said.</p>
<p>&#8220;All user content must be screened prior to posting because any unprotected website can be targeted by cyber-criminals trying to spread malicious content.&#8221;</p>
<p>Sophos has reported the targeted sites to online content regulator the Internet Watch Foundation.</p>
<p>Created by Darren Pauli</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacking-news.com/2007/06/child-porn-targeting-forums-using-web-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gmail Flaw Invites Hackers to Your Private Messages</title>
		<link>http://www.hacking-news.com/2007/06/gmail-flaw-invites-hackers-to-your-private-messages/</link>
		<comments>http://www.hacking-news.com/2007/06/gmail-flaw-invites-hackers-to-your-private-messages/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 19:24:28 +0000</pubDate>
		<dc:creator>newsnow.co.uk</dc:creator>
				<category><![CDATA[Random Security]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.hacking-news.com/2007/06/06/gmail-flaw-invites-hackers-to-your-private-messages/</guid>
		<description><![CDATA[One of the most popular mail solutions on the Internet, Google&#8217;s Gmail, was again affected by a vulnerability that can permit an attacker to view or delete some of the messages stored into an account. The Mountain View company&#8217;s employees were quite quick in fixing the flaw and managed to repair it in a few [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most popular mail solutions on the Internet, Google&#8217;s Gmail, was again affected by a vulnerability that can permit an attacker to view or delete some of the messages stored into an account. The Mountain View company&#8217;s employees were quite quick in fixing the flaw and managed to repair it in a few hours since it was reported. Basically, the vulnerability could be exploited through a malicious page that provided the attacker the access to the Gmail account. As The Hacker Webzine reports, it is extremely dangerous because the giant Google keeps all its web-based services such as Calendar, AdWords and Gmail on the same sign-on technology. Using a simple vulnerability discovered in the mail solution, the hacker would be able to access all these services.</p>
<p><span id="more-29"></span></p>
<p>This is not the first time when Gmail is affected by a security flaw that can allow an attacker to view private information about the account as well as the messages kept in the inbox. Some time ago, the search giant confirmed the existence of numerous vulnerabilities but only after it managed to fix them because it was very important to avoid successful exploitations.</p>
<p>Gmail was released in April 2004 and was extremely attractive for the Internet users because it was the first mail solution to offer 1GB in storage size. Obviously, the product was periodically improved and it is now described as the most efficient mail service against spam messages because its filters manage to block the majority of unsolicited emails coming into your inbox.</p>
<p>The <a href="http://www.hacking-news.com/category/news/xss/">XSS</a> security flaw that was just discovered is sustaining Google&#8217;s statements concerning the security of the mail solution and proves once again that even the Mountain View company can be affected by vulnerabilities. If you didn&#8217;t know, a critical hole was also discovered in Google Desktop, the downloadable application powered by Gooogle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacking-news.com/2007/06/gmail-flaw-invites-hackers-to-your-private-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-Site Request Forgery: the Sea Surf</title>
		<link>http://www.hacking-news.com/2007/06/cross-site-request-forgery-the-sea-surf/</link>
		<comments>http://www.hacking-news.com/2007/06/cross-site-request-forgery-the-sea-surf/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 19:13:05 +0000</pubDate>
		<dc:creator>playhack.net</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.hacking-news.com/2007/06/06/cross-site-request-forgery-the-sea-surf/</guid>
		<description><![CDATA[Today we talk about Cross Site Request Forgery (also known as XSRF) abbreviated in CSRF, from which pronounce has come the friendly name &#8220;Sea Surf&#8221; Following the previous papers on Cross Site Scripting written by me, i thought it was an obvious step to deal with this theme: here i am then! This kind of [...]]]></description>
			<content:encoded><![CDATA[<p>Today we talk about Cross Site Request Forgery (also known as XSRF) abbreviated in CSRF, from which pronounce has come the friendly name &#8220;Sea Surf&#8221; <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Following the previous papers on Cross Site Scripting written by me, i thought  it was an obvious step to deal with this theme: here i am then! This kind of vulnerability, which is very common and understimated, permits to make a victim user to send any kind of HTTP request to a website in which he is logged in and trusted in some way.</p>
<p><span id="more-28"></span></p>
<p>-[par][ SUMMARY ][/par]&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
	0&#215;01: Hello World<br />
	0&#215;02: Introduction<br />
	0&#215;03: About Authentications<br />
	0&#215;04: Difference between XSS and CSRF<br />
	0&#215;05: Get deep in CSRF<br />
	0&#215;06: Attack Points<br />
	0&#215;07: Prevention<br />
	0&#215;08: Conclusions<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>[par]&#8212;[ 0x01: Hello World ][/par]</p>
<p>Yo!<br />
Classical title for the first paragraph indeed <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Don&#8217;t think there&#8217;s a better name out there! Ok, i know it&#8217;s clueless, but let me do the ritual thanks and shoutouts and then i&#8217;ll move on serious business!</p>
<p>Intake: Actually some coke only, it&#8217;s too hot for eating anything :Q<br />
Music: Rage Against The Machine &#8211; Know your Enemy</p>
<p>Shoutouts: as it comes all my playhack.net bros (Omni, GOD, Null and all the users), str0ke (the c00lest guy out there <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) and my girlfriend, who&#8217;s having a bath right now and giving me the time to write this stuff (don&#8217;t tell her, she still think i&#8217;m working <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ) and obviously everyone reading this paper. Thanks!</p>
<p>[par]&#8212;[ 0x02: Introduction ][/par]</p>
<p>This kind of vulnerability, which is very common and understimated, permits to make a victim user to send any kind of HTTP request to a website in which he is logged in and trusted in some way.</p>
<p>In this way the attacker, forging some malicious HTML or JavaScript code, uses an opened session of the victim to make HIM doing actions, which really complicates the identification of a CSRF attack.</p>
<p>This Session Riding could easily be taken in action with markup languages (such as Blog&#8217;s and Wiki&#8217;s syntax) and BBcode too.</p>
<p>[par]&#8212;[ 0x03: About Authentications ][/par]</p>
<p>Commonly when a user logs into a trusted website, the authentication system will flag this person with a &#8220;token&#8221; that tells to the website that the current user is authed and authorized to visit some reserved pages and services.</p>
<p>These &#8220;tokens&#8221; are realized with the creations of Cookies and Sessions, commonly generated with some hashed or encoded number , which strictly identify a single user.</p>
<p>Anytime this user logs into the website with his own credentials he will be flagged and a new session will be generated, and meanwhile an attacker could easily makes some unauthorized actions in the &#8220;ward&#8221; of that website <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It could looks like something quite un-dangerous, because only an idiot user will accept any kind of request that will disfrut his own authentication: great mistake! Don&#8217;t ever understimate the power of a sweet Cookie! <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Cookies are the aim of the most XSS attacks because permits an instant access to any kind of confidential and private service an user has privileges on: the CSRF is even more powerful, because disfruts the current session and cannot be avoided easily if the website doesn&#8217;t provide very short temporary cookies.</p>
<p>[par]&#8212;[ 0x04: Difference between XSS and CSRF ][/par]</p>
<p>Actually, what&#8217;s the real difference between XSS and CSRF? They look very similars!</p>
<p>As a matter of fact they&#8217;re quite similars, but there&#8217;s a core difference that makes the two vulnerabilities strictly opposed eachothers.</p>
<p>In the XSS vulnerabilities the USER trusts the WEBSITE&#8217;s integrity, and gets  tricked to give direct informations to the ATTACKER (with cookie grabbing of fake logins for example).</p>
<p>In the CSRF vulnerabilities is the WEBSITE that trusts in the USER&#8217;s requests and accomplish any kind of action that comes from his flagged authentication in order to get some advantages to the ATTACKER.</p>
<p>The Cross Site Request Forgery situation can be resumed with this graph:</p>
<pre lang="html">
.			      trusted <-----flag-----.
.	.----------.          .------.           .---|-----.
.	| ATTACKER |__________| USER |___________| WEBSITE |
.	`----------`  tricks  `------` (request) `---------`
.	      |           \_ _ _ _ _ _ _ _/          |
.	      |					     |
.	      `--------------------------------------`
.		the website accomplishes the request
</pre>
<p>As we can see the situation is opposed to the XSS' one, the website (trusting  the authentication and the authorizations of the user) just accomplishes the request that are sent to him, which are obscured to the USER's awareness.</p>
<p>The important point of this attack is that the request to the website is sent by the USER, not the ATTACKER: this makes the vulnerability more dangerous.</p>
<p>[par]---[ 0x05: Get deep in CSRF ][/par]</p>
<p>Okay, now that we got a general idea of what CSRF is, let's try to get into some simple examples.</p>
<p>Assure that for example a user is subscribed into a website that provide some particular services, maybe which even schedule some money transactions: when the user logs in, the server will create a cookie or a session that flags the user as authed and authorized to access to his own private pages.</p>
<p>Assure also that the website is maybe a e-banking service and it provides an HTML form which perform money transactions, and the code will look like:</p>
<p><code></p>
<pre lang="html">
<!-- scratch of a form -->
<form method="POST" action="sendmoney.php" name="sendmoney">
<div>How much:
<input type="text" name="cash"></div>
<div>To:
<input type="text" name="toname"></div>
<div>ABI:
<input type="text" name="toabi"></div>
<div>CAB:
<input type="text" name="tocab"></div>
<div>CIN:
<input type="text" name="tocin"></div>
<div>
<input type="submit" name="submit" value="Buy"></div>
</form>

	<!-- EOF -->
</pre>
<p></code></p>
<p>Through this form the user could transfer some money to the target bank account. Ok, it's really a stupid thing and quite impossible to be found right that, but it's only to make you understand the thing more clearly <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  don't complain for that please!</p>
<p>Ok, when the user will submit the values of the form the script sendmoney.php will execute the query and make the e-banking system accomplish his request of transfer. Maybe the script will look like:</p>
<pre lang="html">
	/* sendmoney.php */
	<?
	session_start();
	if(isset($_REQUEST['cash']))
		$cash = $_REQUEST['cash'];
	else
		die("Specify the amount of money");
	if(isset($_REQUEST['toname']))
		$toname = $_REQUEST['toname'];
	else
		die("Specify a recipient");
	if(isset($_REQUEST['toabi']))
		$toabi = $_REQUEST['toabi'];
	else
		die("Specify the ABI");
	if(isset($_REQUEST['tocab']))
		$tocab = $_REQUEST['tocab'];
	else
		die("Specify the CAB");
	if(isset($_REQUEST['tocin']))
		$tocin = $_REQUEST['tocin'];
	else
		die("Specify the CIN");

	// This function safely send the money to the target
	send_money($cash, $toname, $toabi, $tocab, $tocin);

	?>
	/* EOF */
</pre>
<p>Consider that this script is well written and the send_money() sanitizes all the variables that are submitted to him, the transfer will be finally accomplished.</p>
<p>In this particular case the use of REQUEST global variable allows to an attacker to disfrut the GET method in order to trick the user and steal his money <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If the user is authed in, as we previously said, an attacker could provide to the user a webpage or an image which will look like something like this:</p>
<pre lang="hmtl">
	<!-- coolthing.html -->
	<html>
	<head></head>
	<body>
	<img src="http://bankhost.com/sendmoney.php?cash=ALL&#038;toname=ME&#038;toabi=
	          123456&#038;tocab=123456&#038;tocin=X">
	</body>
	</html>
	<!-- EOF -->
	</pre>
<p>Actually, if the user invited to visit this page is contemporary logged into the "bankhost.com" website, the image loaded will send an HTTP request to that website asking him to accomplish that transaction: the fact is that the transfer will be formerly commanded from the user himself.</p>
<p>Ok.. this is not really a good way for managing the transaction: the REQUEST global is not that safe, most probably the script sendmoney will use the POST variables instead, because they may think that it would be more secure. Obviously it is not.</p>
<p>Consider that the coolthing.html file will look instead like:</p>
<pre lang="html">
	<!-- coolthing.html -->
	<html>
	<head>

	<script>
	stealMoney() {
		iframe = document.frames["stealmoney"];
		iframe.document.steal.submit();
	}
	</head>
	<body onload="stealMoney()">
<div><img src="reallyc00landfunnypicture.jpg"></div>

	<iframe name="stealmoney" display="none">
<form method="POST" name=" steal"
		 action="http://bankhost.com/sendmoney.php">
<input type="hidden" name="cash" value="ALL">
<input type="hidden" name="toname" value="ME">
<input type="hidden" name="toabi" value="123456">
<input type="hidden" name="tocab" value="123456">
<input type="hidden" name="tocin" value="X">
		</form>

	</iframe>
	</body>
	</html>
	<!-- EOF -->
</pre>
<p>As we can see this page's appereance is composed only by the c00l picture loaded, but as an hidden action a crafted form in the iframe "stealMoney" will execute a request to the "bankhost.com" website, asking to the user's session to transfer the money to the targeted infos <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is just a stupid example, but through this you can imagine what kind of  entity this vulnerability can take.</p>
<p>[par]---[ 0x06: Attack Points ][/par]</p>
<p>Let's summarize then what happens creating a CSRF attack.<br />
	1- The attacker find a clueless user which is registered to a service<br />
	   vulnerable of CSRF<br />
	2- The attacker creates an html page which automatically send some<br />
	   requests to the vulnerable website<br />
	3- The victim logs into the website and get an opened session<br />
	4- The attacker provides the crafted html page to the victim<br />
	5- The victim visits that page<br />
	6- the HTTP request is sent and the malicious action accomplished <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I think actually that it's quite easy to understand how much dangerous this vulnerability could is for a smart and malicious attacker which basically knows how to move his attacks.</p>
<p>[par]---[ 0x07: Prevention ][/par]</p>
<p>Now that we understood how a CSRF attack is taken in action let's try to analize how we could prevent and protect ourself from this kind of flaws. In these months has been widely discussed how to prevent this kind of vulnerability but commonly without reaching any kind of fixed, stable and functional conclusion. It has been talked about Unique Tokens, Captchas and others.. but i still think they still won't be enough for this or simply can not be implemented smartly.</p>
<p>Awaiting for better results i suggest all of you to consider to ask to the user the password again at least on sensitive pages (like e-commerce forms and stuff), in order to be sure that the session cannot be hijacked (actually.. if the attacker doesn't know the user password he couldn't do anything dangerous and on the other side if he really know the password, he doesn't require CSRF at all <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ).</p>
<p>It's really easy to implement this security misure, adding a new field in the form:</p>
<pre lang="html">
	<!-- new scratch of the form -->
<form method="POST" action="sendmoney.php" name="sendmoney">
<div>How much:
<input type="text" name="cash"></div>
<div>To:
<input type="text" name="toname"></div>
<div>ABI:
<input type="text" name="toabi"></div>
<div>CAB:
<input type="text" name="tocab"></div>
<div>CIN:
<input type="text" name="tocin"></div>
<div>Your passord:
<input type="password" name="pass"></div>
<div>
<input type="submit" name="submit" value="Buy"></div>
</form>

	<!-- EOF -->
</pre>
<p>And as it comes we'll put a check like following in the 'sendmoney.php' file:</p>
<pre lang="html">
	/* scratch from sendmoney.php */
	if(isset($_POST['pass']) &#038;&#038; md5($_POST['pass']) == $mysql_row['pass']) {
		...
	} else {
		die("You must specify a correct password!");
	}
	/* EOF */
</pre>
<p>In this way the CSRF attack attempts will be nullified if the attacker is not aknowledged of confidentials infos like the Password for example.</p>
<p>Other solutions like Unique Tokens based on PHP Sessions should be avoided because the attacker could bypass them.</p>
<p>[par]---[ 0x08: Conclusions ][/par]</p>
<p>Even this paper is actually finished: i hope as always that you enjoyed it at least as much as i enjoyed studying this theme.</p>
<p>Remember that you can always send feedback to me at nexus @ playhack . net <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to everybody out there and cheers to the italian scene! <img src='http://www.hacking-news.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Created by: Nexus</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacking-news.com/2007/06/cross-site-request-forgery-the-sea-surf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

