NTFS DOC是对NTFS文件系统的详细描述,虽然不是微软官方公布的,但通过它可以了解NTFS文件系统的基本原理和实现细节,这套文档是数据恢复、磁盘工具等等软件开发的很好参考。本系列文章是对NTFS DOC的翻译。
6. Attribute - $SECURITY_DESCRIPTOR (0x50)
6.属性-$安全描述符属性(0x50)
6.1. Overview
6.1概览
Standard Attribute Header?
标准属性头?
The security descriptor can be summarisedas:
安全描述符可以总结如下:
• A header (may beflags), followed by one or two ACLs and two SIDs.
一个标头(可能是标志),后跟一个或两个ACL和两个SID
• The first ACL containsauditing information and may be absent.
第一个ACL包含审计信息且有可能不存在
• The second ACLcontains permissions (who can do what).
第二个ACL包含许可信息(谁可以做什么)
• Each ACL contains oneor many ACEs.
每一个ACL都包含一个活更多的ACE
• Each ACE contains aSID.
每一个ACE都包含一个SID
• The last two SIDs showthe owner of the object (User and Group)
最后的两个SID提供了对象的所有者(用户和组)
Table 2.8. Layout of the$SECURITY_DESCRIPTOR (0x50) attribute
表2.8$安全描述符属性的列表
Component Description
部件描述
Header Offsets to various structures
标头 不同结构的偏移量
Audit ACL ACE SID ACEs for the Audit ACL
审计ACL 审计ACL中的 ACE
Permissions ACL ACESID ACEs for the Permissions ACL
许可ACL 许可ACL中的ACE
ACE SID
ACE SID
SID (User) The owner of this object SID(用户)对象所有者
SID (Group) SID(组)
The security descriptor is necessary toprevent unauthorised access to files. It stores information about:
安全描述符用来防止未经许可的文件访问.它保存了如下信息:
• The owner of the file
文件所有者
• Permissions the ownerhas granted to other users
所有者授予其它用户的许可信息
• What actions should belogged (auditing)
什么行为将被记录进日志(审计)
6.2. Layout of the Attribute
6.2属性列表
6.2.1. Notes
6.2.1注意事项
6.2.1.1. Size
6.2.1.1 大小
As defined in $AttrDef, this attribute hasa no minimum or maximum size.
如$属性定义属性中所定义的,这个属性没有最小或最大值
6.3. Layout of the stream
6.3 流的列表
6.3.1. Questions
6.3.1 问题
• How are the ACEs ofdirectories inherited?
文件夹的ACE如何被继承
• How can we fit theACEs into a normal looking Unix file system?
我们如何才能将这些ACE 放入一个通常的Unix文件系统
• How can we tie thefile permissions into PAM or SMB?
我们如何才能将文件的许可信息与PAM或SMB进行绑定
• Can we use NTauthentication, somehow?
我们能否使用NT验证,如何使用?
6.3.2. To Do
Decide which Standard, and Specific, Rights relate to which filesystem activities, e.g.
FILE_APPEND_DATA will allow a user to extend a file, but not create one.
Experiment to see if the zeros we see are padding and that the flag-like fields are flags.
Experiment with the Generic Read / Write / Execute / All flags.
6.3.2 任务列表
判定某个文件系统活动内容的相关标准,特性,权限。
例如FILE_APPEND_DATA 允许一个用户扩展一个文件,但不是创建一个。
实验证明我们填充的零是否为零并且证明类似标志的区域确实是标志。
对 Generic Read / Write / Execute / All flags都进行实验
6.3.3. Header
Table 2.9. Layout of the $SECURITY_DESCRIPTOR (0x50) attribute header
Offset Size Description
0x00 1 Revision (a)
0x01 1 Padding
0x02 2 Control Flags (b)
0x04 4 Offset to User SID
0x08 4 Offset to Group SID
0x0C 4 Offset to SACL
0x10 4 Offset to DACL
(a) 0x1 for now
(b) Usually 0x4 (DACL Present), or 0x14 (DACL Present + SACL Present). See Flags below.
(c) This refers to the Auditing ACL
(d) This refers to the Permissions ACL
6.3.3 表头
表2.9 $SECURITY_DESCRIPTOR (0x50) 属性头的列表
偏移量 大小 描述
0x00 1 修正(a)
0x01 1 填充
0x02 2 控制位(b)
0x04 4 用户SID的位置
0x08 4 组SID的位置
0x0C 4 SACL的位置
0x10 4 DACL的位置
(a) 当前是0x1
(b) 通常是0x4(当前是DACL),or 0x14(当前是DACL+SACL)。看下面的标记
(c) 这个指向审计ACL
(b) 这个指向权限ACL