Issues in locking down aspnet user security in shared environment

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Issues in locking down aspnet user security in shared environment

    I am trying to lock down file access of some sites in a shared hosting
    environment so that different users can only access their own site's
    directory with their asp.net code. However there's a problem with some
    aspnet user access.

    [I enabled identity impersonate in machine.config and made allowoveride =
    false.]

    After some experimenting with ntfs permissions, I noticed that any asp.net
    enabled site *must* have asp.net user have read access on the folder above
    the application folder plus have read access to the web.config file,
    regardless whether the site is impersonating another user.

    This means any asp.net site can list the files of any other asp.net enabled
    site plus read someone else's web config file which might contain sensitive
    non encrypted settings.

    Does anyone see a security hole in this security model? In some cases you
    can display or even download files by just looking at someone else's site
    folder and typing the url + filename in a browser. Like an .mdb file if the
    user didn't password protect their sensitive folder.

    How can I plug this hole with better lockdown? I was going to look at the
    <location.. > tag and trust levels and see if they help.
    Is there any whitepaper on how to very securely lockdown asp.net sites in a
    shared environment?

    Thanks.

    John

    John Dalberg Guest

  2. Similar Questions and Discussions

    1. ASPNET account locking out
      We have in the last few months been having an issue with the ASPNET account on our production web server locking out. It's been sporadic, on...
    2. Security issues with Win2003 and ASPNet app
      I have an ASP.NET Web Service and Web Site. It accesses a SQL database for its data and retrieves images from another server. There are 4...
    3. ASP.Net in a shared hosting environment
      Hi, Does anyone know of any concise documents that detail securing the .net framework installation in a shared web hosting environment? ...
    4. Security issues with Asp.Net in Shared Hosting Environments
      Dear Asp.Net Security Community Over the last couple of months I have posted several items in the official Asp.Net website (www.asp.net) related...
    5. ASPNET User Problem in Shared Hosting Environment
      Hello, We do provide web hosting service. Every ASP3 process runs under own username and password so customers can not access other customer's...
  3. #2

    Default Re: Issues in locking down aspnet user security in shared environment

    Hi John,

    I got these links, they're a nice start:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh19.asp[/url]

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh20.asp[/url]

    The second one sounds like it might have what you want.

    You'll thoughts regarding directory transversal and reading of web.config files can be defeated with a proper structure of "wacky
    directory names for users" and "their containing folder having proper NTFS permissions on the ASPNET process (like allow transversal
    and deny all else)". This way, they can't list the folder with the "wacky names". The "wacky names" are like keys then. With out the
    key, one can't transverse to that directory. And the key can't be gotten by the aspnet worker process. Place the users wwwroot
    folders underneath the "wacky names" folder.

    If they can't get the path. They can go to it.

    Hope that helps, I just spent four days on it. I'm stuck on a problem where my impersonation works for the individual applications,
    but my access database connections die.






    "John Dalberg" <john_dd@hotmail.com> wrote in message news:1u0pgkcebnvrb$.fuu1z4710do1$.dlg@40tude.net.. .
    > I am trying to lock down file access of some sites in a shared hosting
    > environment so that different users can only access their own site's
    > directory with their asp.net code. However there's a problem with some
    > aspnet user access.
    >
    > [I enabled identity impersonate in machine.config and made allowoveride =
    > false.]
    >
    > After some experimenting with ntfs permissions, I noticed that any asp.net
    > enabled site *must* have asp.net user have read access on the folder above
    > the application folder plus have read access to the web.config file,
    > regardless whether the site is impersonating another user.
    >
    > This means any asp.net site can list the files of any other asp.net enabled
    > site plus read someone else's web config file which might contain sensitive
    > non encrypted settings.
    >
    > Does anyone see a security hole in this security model? In some cases you
    > can display or even download files by just looking at someone else's site
    > folder and typing the url + filename in a browser. Like an .mdb file if the
    > user didn't password protect their sensitive folder.
    >
    > How can I plug this hole with better lockdown? I was going to look at the
    > <location.. > tag and trust levels and see if they help.
    > Is there any whitepaper on how to very securely lockdown asp.net sites in a
    > shared environment?
    >
    > Thanks.
    >
    > John
    >

    Chance Hopkins Guest

  4. #3

    Default Re: Issues in locking down aspnet user security in shared environment

    On Mon, 6 Oct 2003 15:41:23 -0400, Chance Hopkins wrote:
    > Hi John,
    >
    > I got these links, they're a nice start:
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh19.asp[/url]
    >
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh20.asp[/url]
    >
    > The second one sounds like it might have what you want.
    >
    > You'll thoughts regarding directory transversal and reading of web.config files can be defeated with a proper structure of "wacky
    > directory names for users" and "their containing folder having proper NTFS permissions on the ASPNET process (like allow transversal
    > and deny all else)". This way, they can't list the folder with the "wacky names". The "wacky names" are like keys then. With out the
    > key, one can't transverse to that directory. And the key can't be gotten by the aspnet worker process. Place the users wwwroot
    > folders underneath the "wacky names" folder.
    >
    > If they can't get the path. They can go to it.
    >
    > Hope that helps, I just spent four days on it. I'm stuck on a problem where my impersonation works for the individual applications,
    > but my access database connections die.
    I have read the articles you mentioned however they don't mention how to
    lockdown aspnet user permissions. But your idea of using "wacky names" for
    folder names seems a good one. You can only traverse a folder if you know
    the folder name so if you don't, you won't be able to go there.

    Thanks for the input

    John

    >
    >
    >
    >
    >
    >
    > "John Dalberg" <john_dd@hotmail.com> wrote in message news:1u0pgkcebnvrb$.fuu1z4710do1$.dlg@40tude.net.. .
    >> I am trying to lock down file access of some sites in a shared hosting
    >> environment so that different users can only access their own site's
    >> directory with their asp.net code. However there's a problem with some
    >> aspnet user access.
    >>
    >> [I enabled identity impersonate in machine.config and made allowoveride =
    >> false.]
    >>
    >> After some experimenting with ntfs permissions, I noticed that any asp.net
    >> enabled site *must* have asp.net user have read access on the folder above
    >> the application folder plus have read access to the web.config file,
    >> regardless whether the site is impersonating another user.
    >>
    >> This means any asp.net site can list the files of any other asp.net enabled
    >> site plus read someone else's web config file which might contain sensitive
    >> non encrypted settings.
    >>
    >> Does anyone see a security hole in this security model? In some cases you
    >> can display or even download files by just looking at someone else's site
    >> folder and typing the url + filename in a browser. Like an .mdb file if the
    >> user didn't password protect their sensitive folder.
    >>
    >> How can I plug this hole with better lockdown? I was going to look at the
    >> <location.. > tag and trust levels and see if they help.
    >> Is there any whitepaper on how to very securely lockdown asp.net sites in a
    >> shared environment?
    >>
    >> Thanks.
    >>
    >> John
    >>
    John Dalberg Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139