ASPNET->NETWORK SERVICE rights too restrictive
- From: Giles Middleton <GilesMiddleton@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Aug 2006 08:35:31 -0700
This problem could cost us hundereds of thousands of pounds, and even worse,
some reputation! So any help is appreciated.
I have posted in iis.security, but maybe this is more relevant in general
security, as I see some similar posts here. I hope someone can help, with a
suggestion other than to rewrite out code!
Basically our system ran fine with IIS6.0, windows 2000 server (using . And
with the advent of the NETWORK SERVICE user we cannot run our code.
We have asp.net code which calls a dcom component exe, which is configured
to run (with dcomcnfg) as the launching user. On windows 2000, this is
ASPNET, but on Windows 2003 Enterprise Edition Sp1 this is NETWORK SERVICE
and subsequently fails.
We can configure the component to use the 'interactive user', and it works
fine, however, that user has to be logged in! Which isn't acceptable -
imagine hotmail going down because bill gates logs out of his PC?
We can configure it to use a different nominated user, but it only works if
that user is a member of the Administrator group (yet again - unacceptable).
Before someone shouts that we're trying to access files/registry keys that
are admin only, we're not (on purpose). Our product is highly graphical, and
we are using a code base which is shared between our GUI and DCOM components.
This code basically serves up nice diagrams to the web site.
We believe we are being denied GUI resources that we need. And can't find
any way of telling IIS or DCOM that we need a non-admin user who can interact
with GUI stuff!
Is there any tool that allows to see the real configuration of users and
their rights? I'm sure the Administrator user has more real rights than we
can see with the available on the dialogs windows configuration provides. We
want to make our own user up with rights that allow the ability to have a GUI
interaction..
Nothing i have tried in security policies have helped either.
The code fails in particular when it attempts to use the VS MFC/C++ call
::LoadMenu. GetLastError() tells us ERROR_ACCESS_DENIED (5),
However, Loading string, icon, and bitmaps work fine. And we can even load
the resource through LoadResource LockResource for the same menu!). We can
easily remove the need for a menu, but we can't do much about when MFC
creates a window and when it attempts to register a windows hook
(AfxHookWindowCreate
fails on ::SetWindowsHookEx) which fails with ERROR_ACCESS_DENIED.
We know we MIGHT fix our problem with a complete re-write to not use the
MFC Doc/View architecture and perform all functions with memory Device
contexts,
but time constraints currently prevent that course of action.
Is there a way (like services) to specify that the dcom component can
interact with the desktop or get access to gui components, or that IIS can be
configured to launch calls to our exe component where it has appropriate
rights to create windows hooks.
We want to avoid making the whole of the IIS site elevated though, of course!
We wondered if the ERROR_ACCESS_DENIED was something to do with the
WindowStation/Desktop DACL, that IIS creates when it calls CreateProcess for
our DCOM server.
We have examined the resulting DACL of these when running as NETWORK SERVICE
and Administrator, and noticed that the effective rights of
DESKTOP_CREATEMENU and DESKTOP_CREATEHOOK are unavailable in NETWORK
SERVICE. I have tried to switch desktops, but yet again, ACCESS_DENIED.
But I'm not sure if this is related, as I've not managed to prove that
programmatically removing these rights from a current desktop had any effect.
It could be the IIS call to CreateProcessAsUser is not giving us adequate
winstations, or can we configure a SAFE user to have specific rights to the
GUI?
This seems to be the one missing area, in windows config tools, how to
configure rights to the desktop services for a user?
Am I on the right track or can we use a different user account with good
security, but just the ability to be slightly gui 'interactive'?
Regards
Giles Middleton
.
- Prev by Date: Registering physical store under ROOT System Store problem
- Next by Date: Re: Change the Max password age with passfilt
- Previous by thread: Registering physical store under ROOT System Store problem
- Next by thread: Re: Change the Max password age with passfilt
- Index(es):
Relevant Pages
|