Groups | Blog | Home
all groups > iis security > april 2008 >

iis security : XSS Cross-Site Scripting - Can you enable XSS in IIS 6.0/7.0?


Travis McGee
4/28/2008 7:32:32 PM
I know you could do XSS in the past with IIS 5.0 until it got plugged, but
now I have a "real need".

Is it possible to loosen up the security in a control fashion?

David Wang
4/29/2008 2:21:58 AM
On Apr 28, 4:32=A0pm, "Travis McGee" <travisGatesMc...@hotmail.com>
[quoted text, click to view]


Cross-site scripting attacks are vulnerabilities within the browser
exploited by web pages hosted by web servers, whose only guilt is
being "trusted" by the browser.

Thus, there is literally no security vulnerability on the server, and
nothing to loosen up. The problem is with the browser's notion of
trust and the buggy web page hosted on the web server.

However, since there are lots of browsers and web pages that need to
be patched in order to address XSS, and people easily create XSS
vulnerable web pages far faster than it can ever be plugged, lots of
people look to some sort of server-side solution to "sanitize" the
vulnerable web pages as the way to deal with XSS. Now, IIS does not
parse the outgoing response for XSS, but it did do little things like
make the underlying ISAPI ServerSupportFunction for Request.Redirect
sanitize URLs, which single-handedly stops many XSS issues across
ISAPI, ASP, ASP.Net.

Of course, people complained about this change and how ASP or IIS6 was
mis-encoding those URLs, which legitimately made %-encoded characters
show up on the Redirection URL as well as break existing applications
that depended on the format of the redirection URL for scoping
purposes, but all the complaints ultimately illustrate more security
issues within user applications.

Now, those things that we changed in IIS are non-configurable and non-
negotiable. However, since IIS does not parse outgoing responses for
XSS, it is always possible to generate raw responses which are
vulnerable to XSS. But, I'm certainly not going to disclose how. :-)


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
Travis McGee
4/29/2008 9:48:28 AM
ok, perhaps mistake.
I thought it was XSS was meant Cross-Site Scripting on the same web server,
NOT Cross-Browser Scripting

This cannot be that difficult to understand - here is what I need to do
Imagine a web hoster: has ...
www.Site1.com for customer1 located at c:\wwwroot\Customer1's website
www.Site2.com for customer2 located at c:\wwwroot\Customer2's website

Customer1's site cannot map an <!-- include filename="Customer2's website's
path" .... due to IIS security (not personal login ID's for Customer1 and
Customer2)
But I want it to work.... <% %> asp script in one website needs to access
"cross-sites" or "cross-path's"


[quoted text, click to view]
Ken Schaefer
4/29/2008 11:54:26 AM
XSS is something that occurs on the client browser, not on the server. the
server merely serves the relevant scripts (e.g. javascript) to the client.

THere is nothing to "plug" on the server.

Cheers
Ken

--
My IIS blog: http://adopenstatic.com/blog

[quoted text, click to view]
David Wang
4/29/2008 8:03:13 PM
XSS (Cross-Site Scripting) has always been the browser issue, where
the malicious website can craft a URL to a website that the victim
browser trusts and make the victim browser execute script code of the
malicious website's intent.

What you are talking about is not a security vulnerability for the web
server but rather an issue of isolation for webhosters. Application
Isolation has always been controlled by the NT User Token used to
execute requests for that website. If site1.com uses the same NT User
Token (such as anonymous user account) as site2.com, then any page in
site1.com executing as that NT User account can access anything
site2.com can access. NTFS ACLs only check against the NT User
account, not from which website. The only way to isolate the two
websites on a Windows platform is by changing the NT User Token used
to execute code of each website.

As far as #include or ParentPaths or <% %> is concerned, they are just
different ways of providing a file or URL path to the system to open
up a file. The functionality were never partitioned or isolated to any
website (unlike .Net Code Access security). IIS6 introduced some
simple changes to improve isolation, such as disallowing ParentPaths
in ASP. However, any user can still use FileSystemObject from an ASP
page to read and browse the webserver's directories limited only by
the user's knowledge of the server's drive/directory layout, the user
identity configured to run the ASP page on the server, and the ACLs on
the FileSystem.

Thus, if you have code on site #1 and you know where site #2's content
is on disk, nothing ever stops you from reading/using that content,
unless site #1 is constrained with a user identity that does not have
ACLs to site #2's content.

In other words, what you want to do can be done by default, without
requiring any configuration change in IIS.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



On Apr 29, 6:48=A0am, "Travis McGee" <travisGatesMc...@hotmail.com>
[quoted text, click to view]
:\wwwroot\Customer1's websitewww.Site2.comfor customer2 =A0located at c:\www=
root\Customer2's website
[quoted text, click to view]
Ken Schaefer
4/30/2008 10:18:49 AM
[quoted text, click to view]

Actually, it is , because it's really unclear what you want to do.

You are saying: "<% %> asp script in one website needs to access
"cross-sites" or "cross-path's"" yet you are talking about using <!--
#include --> directives.

ASP doesn't know anything about #include directives. They are processed
before the ASP code is run.

So, depending on what you want to do - because it's really not clear at all:

1) If you want ASP to access pages in another site, then use ServerXMLHTTP
object to make requests to the other site

2) If you want #include directives to be able to access some kind of shared
content, then create a folder that contains the shared content, and then map
a virtual directory within each site to this shared content folder. Then
#include directives in each website can get access to all the shared files.

3) The option you were probably thinking of was Parent Paths. The default
was changed from enabled in IIS5 to disabled in IIS6. You really do not want
to enable this.

Cheers
Ken

[quoted text, click to view]
AddThis Social Bookmark Button