IT:AD:Design:Investigations:Security:Authorisation:DAC:Security Descriptors
Notes
Some Objects are Hierarchical, others, not: * Hierarchical (Files/Folders) * Not (Printers, Services)
- In a DB System the ACL can be associated to the Entity Table, or Type (
Contact).
SDs, Trustees, SIDs, ACLs, ACEs
- To each Object is associated a
Security Descriptor(SD)- An
SDcontains:- The object's current
Owner(theTrustee: which is aUser,Group,Computer)- Expressed as a
SID.- when expressed as a string looks similar to
S-1-5-32-544. - requires an additional service to translate SID→User, and viceversa (SAM on local machine, and AD in Domains).
- A binary data structure
- The Object's primary
Group(rarely used)- Expressed as a
SID.
- The
Discretionary Access Control List(DACL):- Which is a collection of n
Access Controle Entries(ACE)- of either type
Access Allowed ACEorAccess Denied ACE - Each
ACEspecifies the Operations a single Trustee can/cannot do (note: one ACE per Trustee). - eg: “Users: Allow Read”, “Admins: Allow Write”, “Susan (although Admin): Deny Write”, etc.
- The
System Access Control List(SACL):- Which is a collection of n
ACEentries- of type
System Audit ACE(only one type used in a SACL). - Each
ACEspecifies which Operations by Group/User causes anLog Entryin theSecurity Log. - eg: “Log Write Operations by Users”
- Control information
Access Control Entries (ACE)
- Each ACE contains:
- The Trustee's SID.
- Access bitmask containing permissions to grant/deny(DACL) or audit (SACL).
- The bitmask's flags mean different things, depending on the Object's Type (File, Folder, etc.).
- Inheritence Flag
- If inherited, no changes can be made on this entry.
Example:
[Flags]
enum ACCESS_MASK : uint
{
DELETE = 0x00010000,
READ_CONTROL = 0x00020000,
WRITE_DAC = 0x00040000,
WRITE_OWNER = 0x00080000,
SYNCHRONIZE = 0x00100000,
STANDARD_RIGHTS_REQUIRED = 0x000f0000,
STANDARD_RIGHTS_READ = 0x00020000,
STANDARD_RIGHTS_WRITE = 0x00020000,
STANDARD_RIGHTS_EXECUTE = 0x00020000,
STANDARD_RIGHTS_ALL = 0x001f0000,
SPECIFIC_RIGHTS_ALL = 0x0000ffff,
ACCESS_SYSTEM_SECURITY = 0x01000000,
MAXIMUM_ALLOWED = 0x02000000,
GENERIC_READ = 0x80000000,
GENERIC_WRITE = 0x40000000,
GENERIC_EXECUTE = 0x20000000,
GENERIC_ALL = 0x10000000,
DESKTOP_READOBJECTS = 0x00000001,
DESKTOP_CREATEWINDOW = 0x00000002,
DESKTOP_CREATEMENU = 0x00000004,
DESKTOP_HOOKCONTROL = 0x00000008,
DESKTOP_JOURNALRECORD = 0x00000010,
DESKTOP_JOURNALPLAYBACK = 0x00000020,
DESKTOP_ENUMERATE = 0x00000040,
DESKTOP_WRITEOBJECTS = 0x00000080,
DESKTOP_SWITCHDESKTOP = 0x00000100,
WINSTA_ENUMDESKTOPS = 0x00000001,
WINSTA_READATTRIBUTES = 0x00000002,
WINSTA_ACCESSCLIPBOARD = 0x00000004,
WINSTA_CREATEDESKTOP = 0x00000008,
WINSTA_WRITEATTRIBUTES = 0x00000010,
WINSTA_ACCESSGLOBALATOMS = 0x00000020,
WINSTA_EXITWINDOWS = 0x00000040,
WINSTA_ENUMERATE = 0x00000100,
WINSTA_READSCREEN = 0x00000200,
WINSTA_ALL_ACCESS = 0x0000037f
}
Business Rules
- DENY always has precendence.
- It is important to note that a trustee for whom no rule exists has no access whatsoever to an object.
The hierarchical aspect adds a complexity and cost to an implementing DAC in a datastore/db environment.
Notes
- Well-knowns
SIDs:S-1-5-32-544(Administrators Group)
