21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

modify its DACLcan result in denial of service attacks because the object should be<br />

accessible but no longer is.<br />

An ACE (an ACLcontains one or more ACEs) consists of three primary pieces of<br />

information: a security ID (SID), an access right, and a boolean indicator of whether<br />

the ACE allows or denies the access right to the entity identified by the ACE’s SID. A<br />

SID uniquely identifies a user or group on a system. The special SID, known as<br />

“Everyone” or “World”, identifies all users and groups on the system. All objects<br />

support a generic set of access rights, and some objects may define others specific to<br />

their type. Table 2-1 lists the generic access rights. Finally, an ACE can either allow<br />

or deny an access right.<br />

Table 2-1. Generic access rights supported by all objects<br />

Access right (C constant) Description<br />

DELETE The ability to delete the object<br />

READ_CONTROL The ability to read the object’s security descriptor, not including its SACL<br />

SYNCHRONIZE The ability for a thread to wait for the object to be put into the signaled state; not all<br />

objects support this functionality<br />

WRITE_DAC The ability to modify the object’s DACL<br />

WRITE_OWNER The ability to set the object’s owner<br />

GENERIC_READ The ability to read from or query the object<br />

GENERIC_WRITE The ability to write to or modify the object<br />

GENERIC_EXECUTE The ability to execute the object (applies primarily to files)<br />

GENERIC_ALL Full control<br />

When Windows consults an ACLto verify access to an object, it will always choose<br />

the best match. That is, if a deny ACE for “Everyone” is found, and an allow ACE is<br />

then found for a specific user that happens to be the current user, Windows will use<br />

the allow ACE. For example, suppose that the DACLfor a data file contains the following<br />

ACEs:<br />

DENY GENERIC_ALL Everyone<br />

This ACE prevents anyone except for the owner of the file from performing any<br />

action on the file.<br />

ALLOW GENERIC_WRITE Marketing<br />

Anyone that is a member of the group “Marketing” will be allowed to write to<br />

the file because this ACE explicitly allows that access right for that group.<br />

ALLOW GENERIC_READ Everyone<br />

This ACE grants read access to the file to everyone.<br />

All objects are created with an owner. The owner of an object is ordinarily the user<br />

who created the object; however, depending on the object’s ACL, another user could<br />

possibly take ownership of the object. The owner of an object always has full control<br />

42 | Chapter 2: Access Control<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!