Showing posts with label XSS Worm. Show all posts
Showing posts with label XSS Worm. Show all posts

Verisign, McAfee and Symantec sites can be used for phishing due to XSS

Monday, 9 June 2008

Phished by Michael Jackson!! :-PLast Update: 11/07/08
Should they all be trusted at first sight by unsuspecting online users? Yes, unfortunately this is the case with the websites of renowned and respected IT security companies. However, now that are all vulnerable to cross-site scripting, the possibilities to get phished and infected with malware and crimeware are dramatically increased.

Verisign.com XSS vulnerabilities (6 unfixed/18-06-08):
registrar.verisign-grs.com XSS submitted by C1c4Tr1Z
blogs.verisign.com XSS submitted by Zeitjak
knowledge.verisign.com XSS submitted by Zeitjak
foreseeresults.verisign.com XSS submitted by Zeitjak
servicecenter.verisign.com Redirect submitted by Zeitjak
ispcenter.verisign.com XSS submitted by Zeitjak

Fixed:
digitalid.verisign.com XSS submitted by Zeitjak
www-apps.verisign.com XSS submitted by TreX / unfixed since 16/01/2008!
search.verisign.com XSS submitted by bill
search.verisign.com XSS submitted by bill
www.verisign.com XSS submitted by i-landet / unfixed since 16/02/2007!!!
search.verisign.com.au XSS submitted by Harry Sintonen



Many high profile sites are "Verisign Secured" (allow me to have my doubts here) and Verisign's own one unsecured? Just wonder how easy it would be for the bad guys to phish your clients, or their customer base - I don't think that they are all aware of the risks imposed by XSS vulnerabilities.

Realize now the risk impact and not until you are forced to do so...

McAfee.com XSS vulnerabilities:
mastdb3.mcafee.com XSS submitted by Zeitjak (pending fix)
knowledge.mcafee.com XSS submitted by C1c4Tr1Z
knowledge.mcafee.com XSS submitted by holisticinfosec
us.mcafee.com XSS submitted by TreX
mcafee.com XSS submitted by kusomiso.com
mcafee.com XSS submitted by www.r3t.n3t.nl
www.mcafee.com XSS submitted by kusomiso.com
knowledge.mcafee.com XSS submitted by i-landet
mcafee.com XSS submitted by mityo on 13/06/08 / published on 15/06/08 (fixed-18/06/08)

All vulns are fixed (last update 11/07/2008).

It is a shame that McAfee continuously lies to the users of their "Hacker Safe" clients...
Building user trust just with evil marketing is not the correct way forward! You do knowingly deceive online users with fake promises concerning their privacy and security. How is this for a business plan? :-/ Deliberate deception techniques like yours are only used for the sake of profiting from increased sales.
We are still receiving on a frequent basis many XSS vulnerable "Hacker unSafe" web sites.
It is an embarassing fact that your site is also vulnerable!

- "More bad news for McAfee, HackerSafe certification", Nathan McFeters, ZDNet Zero Day blog - 1 May 08
- "McAfee 'Hacker Safe' cert sheds more cred", Dan Goodin, TheRegister - 29 Apr 08
- "McAfee isn't 'McAfee Secure' or 'Hacker Safe'...", Nathan McFeters, ZDNet Zero Day blog - 13 May 08

Quoting from Russ McRee's blog post titled "McAfee is not McAfee Secure":

>A challenge was put forth on Zero Day, and it has been answered.
>Apparently, McAfee doesn't care about XSS on their own sites either.

>I'll let the video speak for itself.

>For the love of all thing good and proper, McAfee, please address this issue...for yourselves and the consumers who look to you to do >the right thing.

>Sincerely,
>Russ McRee

Symantec.com XSS vulnerabilities:
nct.symantecstore.com XSS submitted by C1c4Tr1Z
www-secure.symantec.com XSS submitted by Zeitjak
partnerlocator.symantec.com XSS submitted by S_e_YM_e_N
investor.symantec.com XSS submitted by mox
www4.symantec.com XSS submitted by TreX
www4.symantec.com XSS submitted byTreX
symaccount.symantec.com XSS submitted by www.r3t.n3t.nl
service1.symantec.com XSS submitted by www.r3t.n3t.nl
service4.symantec.com XSS submitted by www.r3t.n3t.nl
photocontest.symantec.com XSS submitted by www.r3t.n3t.nl
service1.symantec.com XSS submitted by www.r3t.n3t.nl
searchg.symantec.com XSS submitted by security0x00
www-secure.symantec.com XSS submitted by www.r3t.n3t.nl
securityresponse.symantec.com XSS submitted by www.r3t.n3t.nl
www.symantec.com XSS submitted by Saime
securityresponse.symantec.com XSS submitted by cachaca
partnerlocator.symantec.com XSS submitted byTotalSchaden
www4.symantec.com XSS submitted by TotalSchaden

10 out of 18 XSS vulns are fixed.

Quoting from this news article:
"Symantec.com is never going to get a status clientHold. Malicious phishers can still use the Symantec's XSS vulnerabilities to spread malware and steal personal sensitive information. Why did they choose to validate a mirror of a corrected PayPal XSS as a phishing site and give us the status clientHold? They should have the clientHold status for leaving an open door to the exploitation of their faithful customer's security and privacy."

I want to believe that all the above issues get fixed within the next few days.

Related News (Updated):
"Major Security Vendors' Sites Could Be Launchpads for Phishing Attacks", Tim Wilson, Dark Reading, 10 Jun 08
"Top security companies not immune to XSS problems", Steve Ragan, The Tech Herald, 11 Jun 08
"Verisign and anti-virus vendors fix cross-site scripting holes", Mike Barwise, heise Security UK, 13 Jun 08
"Scripting bugs blight security giants' websites", John Leyden, The Register, 13 Jun 08
"Major security sites hit by XSS bugs", Matthew Broersma, Techworld, 12 Jun 08

[Source: XSSing]

Justin.tv non-malicious cross-site scripting worm

x2Fusion from TheDefaced.org security team, recently contacted us in regards to a serious XSS vulnerability on the popular lifecasting website Justin.tv:

"As of 'Sat, 28 Jun 2008 21:52:33 GMT' - An XSS worm was released on this website,
this was and is meant only for research purposes. It was successfully executed and
lasted roughly around 24 hours.

We have recorded such records making it possible for us to create graphical images
graphing the progress of this XSS worm as it infected each profile upon the last
being viewed.

The XSS Vulnerability was discovered and fixed during 'Sun, 29 Jun 2008 21:12:21
GMT', with an after mass of 2525 profiles."


Due to insufficient input sanitization of the Location field on users' profiles, TheDefaced.org team could add the following code:


src="justinworm.js" language="javascript">"


The worm's source code will soon be posted on XSSing.com.

"This actually is the very first XSS worm which we have unleashed, and it was
solely upon research reasons; non-malicious at all :)

We've contacted the JTV Programmers prior to the fixing of the XSS worm and
have sorted things out with them and made sure that they knew NO information such as IP Address, Cookies, Sessions and further
information which poses private is not to be released. After that I put myself
forward and found another XSS in turn to prove that I was dedicated to
helping JTV out in any further possible vulnerabilities
", says x2Fusion.

[Source: XSSing]

XSS worm at Justin.tv infects 2,525 profiles

A XSS worm was crawling across Justin.tv, the popular lifecasting platform at the end of June, details of the incidentXSS worm at Justin.tv infects 2,525 profiles emerged in the middle of last week. Basically, the group that found the XSS vulnerability abused it for the purpose of generating the following graph as a proof of concept, until Justin.tv fixed the flaw rending the worm’s activities obsolete. Now, proof of concept of what exactly remains questionable, since if the research community was to exploit every site vulnerable to SQL injections or high profile sites vulnerable to critical XSS flaws, in order to embedd a counter within and then come up with fancy graphs saying this is the number of people that could have been affected by this flaw, we would be dealing with more PoCs next to the real security incidents executed by malicious parties. This is the statement made by one of the group members that released the PoC :

“As of ‘Sat, 28 Jun 2008 21:52:33 GMT’ - An XSS worm was released on this website, this was and is meant only for research purposes. It was successfully executed and lasted roughly around 24 hours.

We have recorded such records making it possible for us to create graphical images graphing the progress of this XSS worm as it infected each profile upon the last being viewed. The XSS Vulnerability was discovered and fixed during ‘Sun, 29 Jun 2008 21:12:21 GMT’, with an after mass of 2525 profiles.

This actually is the very first XSS worm which we have unleashed, and it was solely upon research reasons; non-malicious at all :)

We’ve contacted the JTV Programmers prior to the fixing of the XSS worm and have sorted things out with them and made sure that they knew NO information such as IP Address, Cookies, Sessions and further information which poses private is not to be released. After that I put myself forward and found another XSS in turn to prove that I was dedicated to helping JTV out in any further possible vulnerabilities”, says x2Fusion. “

Justin.tv fixed it shortly after users started complaining :

“On Saturday we started to receive emails from users saying that their account had been compromised. On Saturday night we found a vulnerability that allowed someone to gain access to another users account without needing their username and password. Emmett worked tirelessly to fix the bug and released a patch on sunday morning. We were informed that as a result of the first vulnerability, personal communications from a number of justin.tv users were posted on flickr for all to see. We greatly regret that this occurred and apologize that we were not able to find and fix this vulnerability sooner. On tuesday and similar vulnerability was found and it was fixed within 2 hours.”

The majority of social networking sites have all be subject to the efficient exploitation of a single XSS flaw, leading hundreds of thousands, sometimes millions of users affected by XSS worms. Orkut, MySpace (as well as a second possibility for a QuickTime XSS flaw), GaiaOnline, Hi5 are just the tip of the iceberg, since a great deal of currently unfixed vulnerabilities can easily become XSS worms if that’s what someone wants to achieve.

Adding a second layer of protecting for the end users, with the first one being the site’s own responsibility for self-auditing themselves, widely used Internet browsers are finally contributing to the second layer of protection, with Mozilla’s Site Security Policy and IE8’s Cross Site Scripting Filter, aiming to protect the user even if the site itself remains vulnerable. Let’s see how long before malicious parties start bypassing the built-in protection mechanisms, and publicly demonstrate this on a large scale.

[Source: zdnet]

Orkut XSS Worm

Several people sent this to me over the last few days but for those of you who hadn’t seen it in the myriad of different places it showed up, Orkut was hacked using a XSS worm. Orkut is Google’s version of social networking. It was big for a while, but I think everyone bailed in favor of the more open MySpace and Facebook’s of the world. It’s still widely used by the Portuguese population though.

Rough estimates are north of 300,000 people compromised, even though it was caught relatively quickly. It’s amazing how fast these things grow in environments like that, where the medium for spreading is based on a technology that almost everyone uses and works across platform. I think the only thing stopping this from being more virulent is making it cross platform, and making the social engineering a little more seamless.

Here are the POST requests sent in by Lavakumar:

POST request sent by the worm to add the victim to the “Infectados pelo VĂ­rus do Orkut” community. The community id is “44001818″.

POST /CommunityJoin.aspx?cmm=44001818 HTTP/1.1
Host: www.orkut.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text

/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Referer: http://www.orkut.com/Scrapbook.aspx?uid=<-xxxxxxxxxxxxxxxxxxxx->
Cookie: -xxxxxxxxx-
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 98

POST_TOKEN=0B57493EBE09C74A3D69298F67635479&signature

=Bm1YihIUAe5I%2BAvfFH7v4bjtdrI%3D&Action.join

————————————————————————————————————————————————
POST request sent by the worm to submit itself to the scrapbook of the victim’s friends.

POST /Scrapbook.aspx HTTP/1.1
Host: www.orkut.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8

,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Referer: http://www.orkut.com/Scrapbook.aspx?uid=-xxxxxxxxx-
Cookie: -xxxxxxxxx-
Pragma: no-cache
Cache-Control: no-cache

Content-Length: 146



And the code can be found in many places around the net, but I also threw up a copy on the sla.ckers.org XSS worm section for anyone looking for example worm code. I’m trying to keep that section up to date with non-theoretical, but practical and real world worm code so we can all see it. Google has fixed this issue, but it is unclear what the fallout of the damage will be.


[Source: ha.ckers]

Flash XSS And Remediation Steps

In the wake of the disclosure of Flash vulnerabilities found in thousands of websites, I felt I should probably post something about it. I have read the section of the upcoming book by Rich Cannings and Himanshu Dwivedi, and won’t disclose it, as promised to the person who sent it to me until I hear otherwise (if ever - since it’s a book and you can just buy it). Today I got an email and a call from Adobe with details that they wanted to present to people who may be concerned about it:

Adobe is developing a solution in an update to Flash Player that will prevent these attacks on existing vulnerable SWFs.

Flash Player bulletin released on 12/18 (http://www.adobe.com/support/security/bulletins/apsb07-20.html) includes a solution to a portion of these vulnerabilities and the next update in early 2008 will mitigate the remaining issues.

In the meantime, developers can mitigate cross site scripting attacks in their SWFs by coding them following guidelines for secure Flash development as described in the whitepaper at http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps.html, and by using data validation libraries available at http://code.google.com/p/flash-validators/.

Adobe is also applying these guidelines to SWF templates that are commonly deployed, which will be available as updates in early January, and we are working with other software vendors to update their templates.

Together, these strategies provide a complete solution to the potential vulnerabilities.

So if you have flash on your site, it is highly recommended that you take these precautionary steps to protect yourself. It’s nice to see Adobe taking this seriously and working so quickly. I certainly wasn’t expecting a phone call - way to go guys!

[Source: ha.ckers]

XSS Worm Analysis And Defense

Date: 01/10/2008

Abstract: This paper is the product of a week long contest to write the most diminutive self replicating XSS worm.
This was a controversial contest, where there were no prizes awarded,
and the goal was to build the worm that would fit in the fewest bytes
possible. In the end there were two people, Giorgio Maone and
Sirdarckcat who tied the contest at a stunningly small 161 byte cross browser compatable XSS worm. However, the journey was as interesting as the result.

To date there has been little to no research done in the methods of

propagation and optimization. The lack of research is in part due to
the relative infrequency of these worms in the wild, as well as
scarcity of real-world worms.
Each example found had three problems with them. 1) They contained site
specific code 2) they contained obfuscation for filter evasion and 3)
they contained a payload. Also, cross browser compatibility was not
always present, making it harder to diagnose exactly what propagation
code looked like. Rather than attempt to triage code that was not
designed with these issues in mind, a contest was built to gather
sample code that could be used for more in depth analysis.

Browser companies have not yet, to date, constructed a way to

display user submitted content in a way that protects the website and
users from malicious behavior, but still allows feature rich user
submitted content. People sometimes say that certain social networking
sites don't write secure code. That's not always the entire truth.
Often the code is highly secure and could be made more secure with the
flip of a switch, it's only that the business landscape requires the
code to do insecure things for economic and user satisfaction reasons.
Those things combined require that we search for alternatives to the
problem, and give ourselves opportunities to build more secure websites
based on our findings, having seen the output of the diminutive proof
of concept worm code.

Assumptions: The theoretical social networking site we will

be discussing in question is vulnerable, not because they are unaware
that they are vulnerable, but because consumers demand rich content. It
is assumed that companies want to do the right thing, in terms of
security, but often cannot as a result of the business rules by which
they must obey. It is also assumed that the attacker has prior
knowledge of the domain. The code that they built must fit within a
certain length field (like a name field, or a title) and will be
rejected if it exceeds that length (there are reasons this limitation
was put in place that will be discussed later in the paper).

Worm Problems: There are some major issues when building a

self propagating worm which were intentionally avoided using contest
rules. One of the most important and difficult rules to abide by was
the issue of growth. One of the rules stated that the worm could not
grow in length once it was submitted. There are three reasons this rule
was critical to adhere to.

The first reason is probably the simplest and also least likely to
be a real issue. HTML input lengths, code based data size limitations

and most importantly database field lengths all may introduce hard size
limitations of only the size of the worm. The second semi unlikely
reason that this would be a factor is the worm author may want to limit
the negative impact of the worm until it had reached maximum
propagation by reducing the utilized database space increase, and
bandwidth required for propagation. The latter also has the benefit of
increasing the rate of propagation.

The last and single most important reason to limit growth was this example by Ronald:



While Ronald's example could have actually won the contest, sans the
growth rule, it had the flaw of linear growth. Let's use an illustrated
example using smaller byte count for demonstration purposes only.
First, let's assume there is a hard limit of a database field of 50
characters, however, instead of rejecting the content it simply chopped
off anything greater than 50. A sample page may look like so:


Site content here - 17 chars
attacker's vector here - 23 chars

More site content here - 23 chars


So after the first iteration of worm propagation, the site would
chop off anything greater than 50 chars, which has the effect of
chopping off the last part of the page. That's not an immediate
problem, because the vector is still there. Let's look at the second
page on which the worm was now posted to:


Site content here - 17 chars
Site content here - 17 chars (original variant's header)
attacker's vector here - 23 chars

More site - 10 chars (chopped off from the first iteration of the page)

More site content here - 23 chars


In the next iteration the last 7 bytes of the worm code would be
chopped off as the site content continues to grow, which will break the
attacker's worm. It would now look like this:



Site content here - 17 chars
Site content here - 17 chars (second variant's header)
Site content here - 17 chars (original variant's header)
attacker's vect - 16 chars (broken vector)



More site content here - 23 chars


Even if the vector worked without the missing seven bytes, on the
next iteration of worm propagation it wouldn't because it would cut off
the next 17 bytes, leaving only headers of pages from previous
propagation. So in this way, a hard limit of n bytes with linear growth
before the worm begins will eventually cause the worm to discontinue
propagation, unless there is no other content on the page prior to the
worm.

Note: The word growth is not really correct, as in reality it

will continue to stay a static size (the maximum that the script
allows) so although the information before the worm is linear growth
until code breakage, the actual content submitted does not grow beyond
the limits of the website.

Ultimately, though, the reason to limit length though was to reduce

the three things mentioned earlier - obfuscation, site specific code
and payloads. This leads us to the next issue. As mentioned before
there is a theory that to make a worm small it will inherently become
obfuscated due to the coding tricks necessary to reduce the size. While
this is mostly a red herring, because this is not the same form of
obfuscation referred to (rather filter evasion obfuscation) there were
examples of this that caused one of the other issues that we had
attempted to avoid (the site specific coding issue).

One of the rules of the contest was that the submissions must POST

to "post.php". The goal here was to give them a requirement of posting
to another page than the page they were on. Early on, oxotnick asked a good question;
which is should we assume that the page you are submitting to is in the
same directory or relative to the base directory. For the purposes of
the contest, people were asked to assume they were in the same
directory, however, this and the contest naming conventions used within
the rules caused an interesting site specific coding optimization:





While the code is entirely valid for the rules, in reality, it's not
portable. If the name had been anything but a string beginning with the
word "post", like the word "test" this code would not have functioned.
So while this code is interesting from an optimization perspective, it
needs to be ignored for analysis.

Worm Best Practices: At one point Ronald pointed out

that images may be a better universal vector for XSS worms, than things
like iframes, or scripts. This may be a true statement, given that many
sites do allow images by default. Without any real numbers to back this
up, it's speculative, but possible. At the very least, the visual
fingerprint is less without sizing. Ultimately, in another thread DoctorDan proposed an interesting question regarding wheter XMLHttpRequest is a better propagation method than the other prevalent method, which was submission of a form.

The benefits of XMLHttpRequest are many. Firstly, it's much more

silent, because it doesn't actually force the user's browser to
visually change to another page. It's not just visually silent though,
as the auto-submit method also can make a clicking sound if the user's
browser is set up to do this (which is often default). Also bwb labs had a great point
regarding a looping effect of the submission method. Let's take a
specific example of a site that upon submission automatically shows you
the content you just submitted.

In doing so it would show the victim the payload and would

automatically post the content back once again - putting the user's
browser into an infinite loop. While this type of setup isn't
universal, it was worthy of note, and could easily lead people to be
more interested in using the XMLHttpRequest method for propagation. For
the purposes of the contest, submission based worms were not forbidden,
as there are many sites that don't have this setup, and even if it may
spiral a user's browser out of control with submissions, that may be
the attacker's intent, or it may be inconsequential to the attacker.

Worm Defense: Two interesting problems stopped a number of

variants, which resulted in a new rule during the contest. While they
are not considered good worm defense, they did stop a number of worm
variants, requiring further work. The first is the declaration of onfocus and onload event handlers in the body tag. Also early on ritz found a problem with his code on pages that had a DOCTYPE assigned.
So it would appear, using these would stop a certain amount of worm
variants. Clearly both of these issues were eventually worked around,
after the new rule requiring the worm code to work despite them. Either
way these issues were worthy of mention.

Let's take a step back for a moment. The above comment, "Browser

companies have not yet constructed a way to display content in a way
that protects from malicious behavior, but still allows feature rich
user submitted content" is an over statement. In this case, the browser
companies have provided a single useful tool. In fact it is a fairly
powerful tool - the iframe. This is not in reference to the on-page
iframing that was proposed with content restrictions. This is in reference to the normal off domain iframe.

One of the reasons people don't use iframe is because they are

concerned about the search engine value of the page they are
constructing. If a company dices up their page into iframes, they will
lose search engine value. The major search engines of the world haven't
figured out a way to keep SEO (search engine optimization) value the
same when you split your page into two different pieces (the protected
content on your domain, and the potentially dangerous user submitted
content on another domain). The one exception to that rule is using
cloaking - where you display both the site content and the user content
on the same page, only when the search engine spiders your site.

Note: Google has been hypocritical about the corporate opinion on

cloaking, telling small companies it is not okay, and telling
enterprises it is. So Google has created an unfair market place and as
such use of cloaking is potentially dangerous to your business, given
Google's pre-disposition to blacklisting based on that. Cloaking is
deemed blackhat SEO based on rules that are still, as of yet not
communicated publically; at least not in their entirety. The use of
cloaking, even to protect consumers may get a website banned, so its
use is not recommended unless there is an agreement made with Google
prior to implementing this technique.

To get real value out of this worm analysis we shouldn't ignore our

history lesson. The first and biggest XSS worm in history, was the MySpace Samy worm. One of the site specific things that Samy wrote in his worm was the following:





The reason this is important is because Samy was trying to overcome
a basic principle in browser security - the same origin policy. Samy
knew that the bulk of his code, which used XMLHttpRequest wouldn't work
unless he switched domains to the one that allowed his worm to
function. This leads us to the next part of defenses. One thing that
has been mentioned a lot in defeating cross site request forgeries
(CSRF) is the use of a nonce, or a one time token. Nonces can be read
if they are on the same domain, by XMLHttpRequest. So it would stand to
reason that it is better to omit a nonce on another domain that sites
know are completely free of XSS vulnerabilities. That is because
XMLHttpRequest must obey the same origin policy.

Note: Please note that Mozilla has discussed a cross domain version of XMLHttpRequest.

It is unclear if this would open this up further to attack or not, but
clearly any technology that allows for cross domain reading whether
intentionally or not would break not only this technique but many other
security protections built into websites.

So it would make sense to omit the nonce in a button on another

domain since that domain is not readable by the JavaScript worm. This
lends itself to a different sort of attack, like the one against Google Desktop
where an attacker floats a small or even invisible iframe beneath the
user's mouse. So the button can still be pressed. Although this does
require some user interaction mouse clicks are so commonplace, it
wouldn't be any surprise if this were used in a real worm.

However, if there is an anti-framing script that detects if the post

page is being framed and then un-frames itself before the user has an
opportunity to be subverted, that could easily protect the page from
being clicked on. There is, however, a snag. In Internet Explorer
iframes can be tagged with security=restricted. This turns off
JavaScript on the iframe. That would stop the script that did frame
detection from running.

Note: Please note that Firefox does not have an equivalent to

security=restricted in off domain iframes, so this technique will work
as described for Firefox users.

Although it appears all hope may be lost, there is an additional

possibility. If the button is not a static button, but rather a button
that itself is at least partially rendered using JavaScript, an
attacker's use of security=restricted will not only cause the page
frame detection script to fail to load, it will also cause the button
to not include the nonce. This is problematic for users who don't have
JavaScript installed though, so an alternative must be provided. For
those users, the button instead may point to a login page, where the
user is requested to log in to post their user content. This JavaScript
alternative is only a minor inconvenience and effects approximately
0.1% of user population (based on the number of users who surf without
JavaScript enabled).

Note: It is important to address the non JavaScript version of

this technique due to concerns over lawsuits initiated by the National
Federation for the Blind on behalf of the Americans with Disabilities
Act.

This technique, combined with some sort of state management between

the two domains should help thwart XSS worms. It must by restated that
this paper is authored with the assumption that dynamic user content
must be allowed for the site's business operations to continue, but
that all other site code is designed to be as secure as possible.

Note: Please note that this technique does not protect against

any browser bugs that allow a browser to break the same origin policy
(Eg: the now-defunct mhtml bug or DNS rebinding).

Items Not Covered: There are several items missing from this

paper. They include things like filter evasion, payload and command and
control. Both filter evasion and payload have been covered by countless
posts over the last several years in various forms and forums. Command
and control is still widely debated, and no concrete observations can
be discussed at this point beyond some of the requirements for a solid
command and control structure for polymorphic XSS worms and for worms
that have delayed payloads, based on a certain density of infection.

Additionally, while there has been some talk about tracking worm activity and at least one project attempting to help mitigation with the assumption that any potentially dangerous content is disallowed,

this paper did not discuss either of these issues as they are far more
in depth and will almost certainly require more thought and research by
a larger audience.

Summary: While XSS worms are hardly a solved issue, some of

the findings of the diminutive XSS worm replication contest definitely
help construct the solutions outlined in this paper. This is anything
but a definitive list of all ways to thwart XSS worms, but it should be
a good primer on some of the findings that came from the XSS worm
contest, and should help. Without browser modifications, this appears
to be the best software agnostic solution to worm propagation, however,
no doubt revisions on this technique and others will yield better
results.

Thanks: Special thanks to everyone who helped contribute to

our understanding of worm propagation over the last week (in
chronological order): .mario, thornmaker, digi7al64, Gareth Heyes, Matt
Presson, sirdarckcat, ritz, Alex, barbarianbob, BlahBlah, arantius, bwb
labs, ma1, Spyware, Reiners, Spikeman, Ronald, Torstein, dev80, amado,
shawn, hallvors, DoctorDan, oxotnick, dbloom, Kyran, tx, 4909, beNi,
backStorm, badsamaritan and anyone else I may have missed. Without
these people and their talent, this research would never have been
possible. Also thanks to thrill and id for providing edits and feedback
on this paper.


[Source: ha.ckers]