当前位置: 首页 > ds >正文

0x90属性中的属性名$I30和Scb->AttributeName的关系

0x90属性中的属性名$I30和Scb->AttributeName的关系

1: kd> db 0xc431a400+38+60+68
c431a500  90 00 00 00 a8 01 00 00-00 04 18 00 00 00 01 00  ................
c431a510  88 01 00 00 20 00 00 00-24 00 49 00 33 00 30 00  .... ...$.I.3.0.

                NextScb = NtfsCreateScb( IrpContext,
                                         NextFcb,
                                         $INDEX_ALLOCATION,
                                         &NtfsFileNameIndex,
                                         FALSE,
                                         NULL );

./base/fs/ntfs/ntfsdata.c:142:const UNICODE_STRING NtfsFileNameIndex = CONSTANT_UNICODE_STRING( L"$I30" );


PSCB
NtfsCreateScb (
    IN PIRP_CONTEXT IrpContext,
    IN PFCB Fcb,
    IN ATTRIBUTE_TYPE_CODE AttributeTypeCode,
    IN PCUNICODE_STRING AttributeName,
    IN BOOLEAN ReturnExistingOnly,
    OUT PBOOLEAN ReturnedExistingScb OPTIONAL
    )


        //
        //  If the attribute name exists then allocate a buffer for the
        //  attribute name and iniitalize it.
        //

        if (AttributeName->Length != 0) {

            //
            //  The typical case is the $I30 string.  If this matches then
            //  point to a common string.
            //

            if ((AttributeName->Length == NtfsFileNameIndex.Length) &&
                (RtlEqualMemory( AttributeName->Buffer,
                                 NtfsFileNameIndex.Buffer,
                                 AttributeName->Length ) )) {

                Scb->AttributeName = NtfsFileNameIndex;

            } else {

                Scb->AttributeName.Length = AttributeName->Length;
                Scb->AttributeName.MaximumLength = (USHORT)(AttributeName->Length + sizeof( WCHAR ));

                Scb->AttributeName.Buffer = UnwindStorage[1] =
                    NtfsAllocatePool(PagedPool, AttributeName->Length + sizeof( WCHAR ));

                RtlCopyMemory( Scb->AttributeName.Buffer, AttributeName->Buffer, AttributeName->Length );
                Scb->AttributeName.Buffer[AttributeName->Length / sizeof( WCHAR )] = L'\0';
            }
        }

0: kd> dx -r1 ((Ntfs!_SCB *)0x89797ce8)
((Ntfs!_SCB *)0x89797ce8)                 : 0x89797ce8 [Type: _SCB *]
    [+0x000] Header           [Type: _NTFS_ADVANCED_FCB_HEADER]
    [+0x040] FcbLinks         [Type: _LIST_ENTRY]
    [+0x048] Fcb              : 0x898f1e00 [Type: _FCB *]
    [+0x04c] Vcb              : 0x895d5100 [Type: _VCB *]
    [+0x050] ScbState         : 0x100006f0 [Type: unsigned long]
    [+0x054] NonCachedCleanupCount : 0x0 [Type: unsigned long]
    [+0x058] CleanupCount     : 0x0 [Type: unsigned long]
    [+0x05c] CloseCount       : 0x1 [Type: unsigned long]
    [+0x060] ShareAccess      [Type: _SHARE_ACCESS]
    [+0x07c] AttributeTypeCode : 0x80 [Type: unsigned long]
    [+0x080] AttributeName    : "" [Type: _UNICODE_STRING]
    [+0x088] FileObject       : 0x89529610 [Type: _FILE_OBJECT *]
    [+0x08c] NonpagedScb      : 0x898f2830 [Type: _SCB_NONPAGED *]
    [+0x090] Mcb              [Type: _NTFS_MCB]
    [+0x0a8] McbStructs       [Type: NTFS_MCB_INITIAL_STRUCTS]
    [+0x0f0] CompressionUnit  : 0x0 [Type: unsigned long]
    [+0x0f4] AttributeFlags   : 0x0 [Type: unsigned short]
    [+0x0f6] CompressionUnitShift : 0x0 [Type: unsigned char]
    [+0x0f7] PadUchar         : 0x0 [Type: unsigned char]
    [+0x0f8] ValidDataToDisk  : 0 [Type: __int64]
    [+0x100] TotalAllocated   : 10665984 [Type: __int64]
    [+0x108] EofListHead      [Type: _LIST_ENTRY]
    [+0x110] CcbQueue         [Type: _LIST_ENTRY]
    [+0x118] ScbSnapshot      : 0x0 [Type: _SCB_SNAPSHOT *]
    [+0x11c] EncryptionContext : 0x0 [Type: void *]
    [+0x120] EncryptionContextLength : 0x0 [Type: unsigned long]
    [+0x124] ScbPersist       : 0x0 [Type: unsigned long]
    [+0x128] IoAtEofThread    : 0x0 [Type: unsigned long *]
    [+0x130] ScbType          [Type: __unnamed]

http://www.xdnf.cn/news/8259.html

相关文章:

  • day19-20-四剑客-find-grep-sed-awk
  • OpenCV CUDA 模块图像过滤-----创建一个计算图像导数的滤波器函数createDerivFilter()
  • 深入剖析小红书笔记详情接口:技术原理与实战应用
  • 技术篇-2.1.C\C++应用场景及开发工具安装
  • Python训练营打卡——DAY33(2025.5.22)
  • 并发编程之异步线程池
  • 【运维实战】Python打造基于免费API的IP地址归属地批量查询工具!
  • 5.0.6 TreeView的使用介绍
  • find-chomd-read-ls和ll的区别
  • Crawl4AI:高效的AI数据抓取工具
  • Spring概念问题详解
  • [C++面试] 基础题
  • springboot 集成kerberos 用户认证 获取域账号
  • 完整改进RIME算法,基于修正多项式微分学习算子Rime-ice增长优化器,完整MATLAB代码获取
  • 【数据结构】 栈和队列
  • 微软全新开源的Agentic Web网络项目:NLWeb,到底是什么 ?
  • 鸿蒙App开发学习路径
  • JAVA|后端编码规范
  • 仿腾讯会议——视频发送接收
  • 计算机发展史
  • 从零基础到最佳实践:Vue.js 系列(7/10):《常用内置 API 与插件》
  • scratch课后一练--事件模块
  • Linux系统编程 | IPC对象---消息队列
  • DeepSeek:开启IT领域人效管理新时代
  • Java-根据路径获取JSON字符串的value值
  • zabbix 常见问题
  • 深入解析JVM垃圾回收器:原理、实践与调优指南
  • 实用重复文件批量处理工具
  • 关于SQL SERVER中round函数的用法和示例
  • 一台机器怎么部署k8s集群