JAR archive traversal vis SCRIPT src

Bug reports and enhancement requests
Post Reply
.mario
Posts: 3
Joined: Sun Jul 19, 2009 10:43 pm

JAR archive traversal vis SCRIPT src

Post by .mario »

Hi,

I hope this is the right place - I did some testing with JAR files on remote locations and src attributes for script tags. Resulting in this example:

Code: Select all

<script src="jar://sites.google.com/site/jartest00mario/xss.jar!/attack2.js"></script>
http://heideri.ch/jso/jar.html
http://sites.google.com/site/jartest00mario/xss.jar
[url]jar://sites.google.com/site/jartest00mario/xss.jar!/attack2.js[/url]

'Block JAR remote resources being loaded as documents' was checked during testing. I assume this is not expected behavior.

Used NoScript version: 1.9.5
User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1

Greetings,
.mario
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
.mario
Posts: 3
Joined: Sun Jul 19, 2009 10:43 pm

Re: JAR archive traversal vis SCRIPT src

Post by .mario »

Same behavior on "V. 1.9.6.2 - Your Friendly Web Cop"
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: JAR archive traversal vis SCRIPT src

Post by therube »

The first part, heideri.ch, fails, because it requires JavaScript.
If heideri were Allowed, then the script executes.

view-source:http://sites.google.com/site/jartest00mario/xss.jar
view-source:http://sites.google.com/site/jartest00m ... attack2.js

I would not expect that to work (like I should know), but it does.

Are you able to put together a minimalized testcase?

So what, the first bug is with jar:, then after that, that NoScript is not blocking the JavaScript.

http://noscript.net/faq#jar
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1pre) Gecko/20090716 SeaMonkey/2.0b1pre
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: JAR archive traversal vis SCRIPT src

Post by Giorgio Maone »

Welcome .mario :)
.mario wrote:I hope this is the right place
When you're in doubt if it's some sort of vulnerability, my email is a better choice.
If it's an usability bug or a RFE (like in this case), this place is perfect.
.mario wrote: I did some testing with JAR files on remote locations and src attributes for script tags. Resulting in this example:

Code: Select all

<script src="jar://sites.google.com/site/jartest00mario/xss.jar!/attack2.js"></script>
[...]
'Block JAR remote resources being loaded as documents' was checked during testing. I assume this is not expected behavior.
This is actually the expected behavior, since the "Block JAR remote resources being loaded as documents" is meant to block documents, not scripts, and copes with an entirely different kind of potential attack scenario, i.e. a web site you want to XSS allows uploading of JARs but not publishing HTML pages, and you manage to sneak in HTML document inside a JAR and XSS the site.

So there's no NoScript bug here, but however I find Google's liberality with file types a bit disturbing and I can clearly see where you're going.
Therefore I'm considering yours as a RFE to block resources (scripts, CSS, whatever) from within JARs to be imported cross-site.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: JAR archive traversal vis SCRIPT src

Post by Giorgio Maone »

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
.mario
Posts: 3
Joined: Sun Jul 19, 2009 10:43 pm

Re: JAR archive traversal vis SCRIPT src

Post by .mario »

Awesome - thx :)
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: JAR archive traversal vis SCRIPT src

Post by therube »

So does the JAR menu page need a slight text change?

... documents, scripts & CSS

Anyhow, just as I Allow heideri.ch, I get an alert from my firewall :o.
Like what! 207.46.232.182. Turns out it is Microsft (updates presumably) :-).
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
Post Reply