第二章:NTFS属性
Chapter 2. NTFS Attributes
1. Overview
Each MFT FILE Record is built up from Attributes.
The list of possible Attributes is defined in $AttrDef.
Table 2.1. Standard NTFS Attributes
1、概览
每一个MFT文件记录都是由属性构成的。
可能的属性列表在$AttrDef中定义
表2.1基本NTFS属性
Type OS Name
0x10 $STANDARD_INFORMATION
0x20 $ATTRIBUTE_LIST
0x30 $FILE_NAME
0x40 NT $VOLUME_VERSION
0x40 2K $OBJECT_ID
0x50 $SECURITY_DESCRIPTOR
0x60 $VOLUME_NAME
0x70 $VOLUME_INFORMATION
0x80 $DATA
0x90 $INDEX_ROOT
0xA0 $INDEX_ALLOCATION
0xB0 $BITMAP
0xC0 NT $SYMBOLIC_LINK
0xC0 2K $REPARSE_POINT
0xD0 $EA_INFORMATION
0xE0 $EA
0xF0 NT $PROPERTY_SET
0x100 2K $LOGGED_UTILITY_STREAM
0x10 $基本信息
0x20 $属性列表
0x30 $文件名
0x40 NT $卷版本
0x40 2K $对象ID
0x50 $安全描述
0x60 $卷名
0x70 $卷信息
0x80 $数据
0x90 $索引根
0xA0 $索引分配
0xB0 $位图
0xC0 NT $符号链接
0xC0 2K $重解析点
0xD0 $EA_INFORMATION
0xE0 $EA
0xF0 NT $PROPERTY_SET
0x100 2K $LOGGED_UTILITY_STREAM
1.1. Notes
1.1.1. Other Information
$PROPERTY_SET, $SYMBOLIC_LINK and $VOLUME_VERSION existed in NTFS v1.2, but weren't
used. They no longer exist in NTFS v3.0 (that used by Win2K).
Each MFT record has a Standard Header, followed by a list of attributes (in order of ascending Attribute
Id) and an end marker. The end marker is just four bytes: 0xFFFFFFFF.
1.1注释
1.1.1 其它信息
$PROPERTY_SET, $SYMBOLIC_LINK 和 $VOLUME_VERSION 自 NTFS v1.2以后被移除了, 从未使用过. NTFS v3.0中没有它们的定义 .
每一个MFT记录都有一个基本的头,后面跟随一些属性的列表 (以属性ID升序排序) 和一个结束标记. 结束标记是以下字节序列: 0xFFFFFFFF.
2. Attribute - $STANDARD_INFORMATION
(0x10)
7
属性-基本信息
2.1. Overview
概览
In old version of NTFS this Attribute contained little more than the DOS File Permissions and the file
times.
在旧版本的NTFS中这个属性包含更多的DOS文件权限信息和文件时间信息。
Windows 2000 introduced four new fields which are used to reference Quota, Security, File Size and
Logging information.
Windows 2000 引入了四个新的字段用来参照配额、安全、文件大小和日志信息。
As defined in $AttrDef, this attribute has a minimum size of 48 bytes and a maximum of 72 bytes.
如在$AttrDef中所定义,这个属性最小48字节最大72字节。
2.2. Layout of the Attribute (Resident)
属性结构(常驻属性)
Table 2.2. Layout of the $STANDARD_INFORMATION (0x10) attribute
表2.2 基本信息属性的结构
Offset Size OS Description
偏移 大小 操作系统 描述
~ ~ Standard Attribute Header
标准属性头
0x00 8 C Time - File Creation
文件创建时间
0x08 8 A Time - File Altered
文件修改时间
0x10 8 M Time - MFT Changed
MFT修改时间
0x18 8 R Time - File Read
文件访问时间
0x20 4 DOS File Permissions
DOS 文件权限
0x24 4 Maximum Number of Versions
最大版本号
0x28 4 Version Number
版本号
0x2C 4 Class Id
类ID
0x30 4 2K Owner Id
所有者ID
0x34 4 2K Security Id
安全性ID
0x38 8 2K Quota Charged
配额
0x40 8 2K Update Sequence Number (USN)
更新序列号
2.2.1. File Permissions
文件权限
Also called attributes in DOS terminology.
DOS中也叫做属性
Table 2.3. File Permissions
文件权限表
Flag Description
标志 描述
0x0001 Read-Only
只读
0x0002 Hidden
隐藏
0x0004 System
系统
0x0020 Archive
档案
0x0040 Device
设备
0x0080 Normal
通用
0x0100 Temporary
临时
0x0200 Sparse File
稀疏
0x0400 Reparse Point
重解析点
NTFS Attributes
NTFS属性
8
Flag Description
标志 描述
0x0800 Compressed
压缩
0x1000 Offline
离线
0x2000 Not Content Indexed
内容未索引
0x4000 Encrypted
加密
• Maximum Number of Versions
最大版本号
Maximum allowed versions for file. Zero means that version numbering is disabled.
文件所允许的最大版本号。为零表示版本号禁用。
• Version Number
版本号
This file's version (if any). Will be zero if Maximum Number of Versions is zero.
本文件的版本(如果有的话)。如果最大版本号为0也为零。
• Class Id
类ID
Class Id from bidirectional Class Id index.
从双向类ID索引
• Owner Id
所有者ID
Owner Id of the user owning the file. This Id is a key in the $O and $Q Indexes of the file $Quota. If
zero, then quotas are disabled.
文件所有者的所有者ID。这个ID是$Quota元文件中的$O and $Q 索引的关键字。如果为零,则配额禁用。
• Security Id
安全性ID
This should not be confused with a Security Identifier. The Security Id is a key in the $SII Index and
$SDS Data Stream in the file $Secure.
这个不要和安全标识混淆。安全ID是 $Secure元数据文件中$SII索引和$SDS数据流的关键字。
• Quota Charged
The number of bytes this file user from the user's quota. This should be the total data size of all
streams. If zero, then quotas are disabled.
配额分配
这个文件的用户配额字节数。为所有数据流的大小合计。如果为零,配额禁用。
• Update Sequence Number (USN)
更新序列号
Last Update Sequence Number of the file. This is a direct index into the file $UsnJrnl. If zero, the
USN Journal is disabled.
文件最后的更新序列号,这是$UsnJrnl元数据未见中的直接索引。如果为零,则更新序列日志禁用
2.3. Notes
其它
2.3.1. Other Information
其他信息
If a NTFS volume is upgraded from v1.2 to v3.0, then this attribute won't be upgraded (lengthened) until
it is accesssed.
如果一个NTFS卷从v1.2升级到v3.0,这个属性在未访问之前不会更新。
2.3.2. Questions
问答
Are the Version fields and the Class Id ever used?
版本域和类ID是否有用呢?