"Eric Fitzgerald [MSFT]" wrote in message
> Having spent 5 years on the phones taking security calls about Windows, I
> can tell you that the problems related to changing ACLs are subtle and
> nasty.
Believe me I know it. But one gets the feeling at times that Microsoft
didn't design those ACLs for files in the System Root with any kind of
security in mind, but simply with a lowest common denominator that allowed
all of the different teams' code to work at all. It's frustrating to me to
give Everyone read or write access to any object in the OS when I know the
computer won't be accessed remotely except by a domain controller and RDP
logins, and the number of users who need to login is a small number of well
defined users. Rather than creating a clean security model that utilizes
local groups in the ACL to create a lowest possible exposure, Everyone or
Authenticated Users becomes a very crude catch all to get anyone or anything
that might need access to the file system or Registry to get access.
I do have a respect for how complex a thing like Windows is. I do realize
it is a small miracle to get an OS released at all that just works. I'm
just disappointed that there doesn't seem to be any support there for the
motivated admin who wants to spend the extra time to harden things on select
machines. If you change defaults on files in the System Root, as you say,
you are on your own. That's support for hardening in cheap kind of way.
It's not reasonable to believe that any individual (or any company) is
really going to figure out all the possible uses and security needs of every
system service, application, etc that has needs to access system32 or the
registry. If Microsoft can't support it, you are in a pretty lonely place.
If you have RestrictAnonymous=2, then you at least don't have exposure from
Everyone in the ACLs from to hackers using null connections, but
occasionally someone might do something catastrophic to group policy, which
removes the RestrictAnonymous setting for a few days. And you certainly do
have risk from every person inside your network who can authenticate any
userid to a domain controller and then use that to start poking around the
box looking for exploits.
And then there is the nightmare case of trying to recover a box that is
already hacked. In such cases the hacker usually has modified the files in
system32, often in ways where you don't see any ACL on the file object at
all. Unless you do a blanket overwrite of permissions for all files in
the system root subtree, you are likely never going to eradicate such a
situation. I know you are thinking "reinstall and just start over from
scratch" but somehow that doesn't leave me feeling more secure, it just
postpones the next similar event. What I struggle with is that until I
really understand the file ACLs in system root I'm really just blind to what
my real exposures are. I can't control what I don't understand.
I can share with you that we have had great success securing System Root on
*standalone* Windows 2000 servers, where users never need to login, with the
following ACL:
Anonymous Logon: Deny
Guests: Deny
<ReservedLocalGroupName>: Deny
Administrators: Full Control
SYSTEM: Full Control
That's pretty simple, and for Windows 2000 which runs every service as
SYSTEM seems to not create too many conflicts if you apply it to the entire
System Root. As long as you only run one key application on each server,
you can usually use auditing to see if there is some other permission you
need there.
Something similar for machines where users have a limited number of
applications to run has also worked very well, giving users Read access to
the System subtree and denying them access to the folders that have the SAM
or copies of the SAM.
Windows 2003 is still a mystery to me. You have these new user contexts
for Local Service and Network Service, and God only knows what resources
those need access to. You can certainly give them modify access to
everything, but then you are probably undoing a large part of the reason
they were created in the first place (to reduce the security exposure of
some critical services like RPC, which run as Network Service). If you go
the other extreme and give those services readonly access to the System Root
subtree, then probably they don't have modify access to some resources there
and you will get the strange failures that you are alluding to.
In 95% of all cases, I do use the default permissions (albeit reluctantly),
and just hide the server behind a firewall to minimize the footprint it
exposes. I don't let RPC through a firewall unless it is an application
where I have no choice about that (e.g., a domain controller). The 5% of
the cases where I want to secure things further are cases where its Windows
2000 running a dedicated application with no direct user logins, or a
machine that has been compromised.
Okay, so yes I'm a masochist.
> Apps break in weird ways and you usually don't get a nice clean
> error message telling you "operation failed because of insufficient
> permission on object X"- it's usually an error message that either has no
> seeming relationship with access control, or a silent failure, or, in the
> best case, "access denied", which still doesn't tell you what was being
> accessed and who accessed it.
What if you audit all of the files in the System Root? You won't even see
the attempt to read or write a file by a service?
--
Will
>> Stay informed about: How Do We Avoid Auditing Failed SYNCHRONIZE File Access?