all groups > iis security > november 2003 >
You're in the

iis security

group:

Security in hosted environment



Security in hosted environment PL
11/28/2003 1:19:38 PM
iis security: We are providing hosting for our members on an IIS6/W2k3 standard server,
we are now considering offering scripting support but I seem to run in to numerous
security issues with this.

The problem here is that each member does not have it's own virtual dir, we already
have thousands of members and it's not really feasable to try and change this.

All member sites are in a folder called members, we created a virtual dir called
members under our main site. We then created a separate app pool for the member
virtual dir and created two new user accounts, IUSR_MEMBERS and IWAM_MEMBERS
which we entered as the anonymous user accounts on the app pool and the member virtual dir.

So far so good.

Now, we set the security on all folders so the IUSR and IWAM_members have read and
write permissions in the member folders and nowhere else, this is because we want them for
example to be able to run access db's (which would need write to update properly).

Here the problem starts, even though they can't write outside the member dir they can still write
to other members folders !

I thought I could fix this issue by setting permissions on the reg keys for the FileSystemObject
and that worked fine, the problem is just the other objects with save capabilities which we need
like for example the SaveAs in ADODB.Recordset or the ServerXML objects methods, we can't
disable everything because then there would be no point in offering scripting support.

Exactly how do I do this ? Any pointers or ideas would be appreciated.

PL.

Re: Security in hosted environment Bernard
11/29/2003 11:05:58 AM
I used to setup different account for each website owner.
then configure ACL based on their user account.
I have limited number of user, so it's not that hard to control.

Since your case you have thousands of them, you might want
to utilize user groups to go together with the user accounts.

--
Regards,
Bernard Cheah
http://support.microsoft.com/
Please respond to newsgroups only ...



[quoted text, click to view]

Re: Security in hosted environment PL
11/29/2003 7:26:17 PM
[quoted text, click to view]

The issue is, how to I prevent one member from writing in another
members dir without having to configure a separate virtual dir and
separate IUSR and IWAM accounts for each user ?

Seems this is not thought through in IIS, MS relys way to much on
ACL which does not give enough fine grained control when you
start to need complicated setups.

All could be solved if there was a simple solution like a setting in IIS
"only allow file IO in the running asp scripts folder", done ! No editing
keys in registry to try and prevent users from using certain objects
or setting separate accounts/virtual folders !

I can't belive that all hosting companys specify separate virtual folders
and user accounts for each user they setup ? It must quickly become
unmanagable.

PL.

Re: Security in hosted environment Bernard
12/1/2003 11:09:56 AM
I know your points on this one, but it's not that
'simple' in a way, when asp or asp.net script run,
the source scripts may be located in one folder,
but the runtime and etc system component is mainly
under %windir%. so if only allow file i/o in that script
folder, it will not work.

I'm sure there's better way of dealing this, many big
hoster I know provide IIS hosting. You can try to look
around at Service Provider site -

http://www.microsoft.com/serviceproviders/whitepapers/iis.asp

--
Regards,
Bernard Cheah
http://support.microsoft.com/
Please respond to newsgroups only ...



[quoted text, click to view]

RE: Security in hosted environment adavis NO[at]SPAM online.microsoft.com (
12/1/2003 4:41:22 PM
PL,

If I understand you correctly the IIS6 server has been configured to allow
anonymous users read and write access to the members virtual directorie and
all of its subdirectories which contains all your members websites?

For example:
http://server/members/website1
http://server/members/website2
http://server/members/website3

In addtion you want to allow scripts to run in these directories?

I wouldn't recommend this configuration because there is no way to track
who is writing to the members directory or it's subdirectories. Allowing
scripts to run in these directories with anonymous write access is
extremely dangerous. One disgruntled employee, or anyone with access to
that webserver could potentially bring down the whole system with a quick
upload and execution of a malicious script.

Effectively you've enabled anonymous write access to the content for all
the websites (virtual directories), but you want to restrict who can write
to specific virtual directies. The two are mutually exclusive.

There is always a trade-off when implementing security and in this specific
case I believe it's ease of managability.

This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks!
~Andrew Davis
Microsoft PSS Security
AddThis Social Bookmark Button