hook ZwCreateFile遇到的获取文件名字和文件全路径的困惑??

liutingting2020 2014-08-05 10:02:27
在我的hook ZwCreateFile函数中,我用KdPrint输出

(1)KdPrint(("文件的根目录是: %x \n",ObjectAttributes->RootDirectory));



有时候输出结果是754,有时候输出结果是一连串类似数据流的东东。

(2)KdPrint(("文件名为:%wZ\n",ObjectAttributes->ObjectName));

有时候输出结果为\??\C:\IVU\ivu\123456.txt:|Raec25ph4sudbf0hAaq5ehw34Nf:$DATA

有时候输出结果为:|SummaryInformation:$DATA
...全文
284 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
liutingting2020 2014-08-05
  • 打赏
  • 举报
回复
引用 2 楼 Huntercao 的回复:
[quote=引用 1 楼 liutingting2020 的回复:] Summary information of files: When you right-click on a file in Explorer and go to the 'Summary' tab, you can add summary information for the file, like title, subject, author, and so on. This summary information is also saved into alternate stream. The stream name in this case is SummaryInformation:$DATA. 文件的摘要信息:当你在资源管理器中右键单击文件,然后转到“摘要”选项卡中,可以添加摘要信息的文件,如标题,主题,作者,等等。本摘要信息也保存在备用流。在这种情况下,数据流的名称是的SummaryInformation:$ DATA。 估计有时候ObjectAttributes->ObjectName中存储的是备用流吧??
看起来是的。[/quote]可以多说点吗?ObjectAttributes中存储的不一定是文件名,有时候也是流信息: 比如我打印出来的数据是: {4c8cc155-6c1e-11d1_8e41-00c04fb9386d}:$DATA
曹大夯 2014-08-05
  • 打赏
  • 举报
回复
引用 1 楼 liutingting2020 的回复:
Summary information of files: When you right-click on a file in Explorer and go to the 'Summary' tab, you can add summary information for the file, like title, subject, author, and so on. This summary information is also saved into alternate stream. The stream name in this case is SummaryInformation:$DATA. 文件的摘要信息:当你在资源管理器中右键单击文件,然后转到“摘要”选项卡中,可以添加摘要信息的文件,如标题,主题,作者,等等。本摘要信息也保存在备用流。在这种情况下,数据流的名称是的SummaryInformation:$ DATA。 估计有时候ObjectAttributes->ObjectName中存储的是备用流吧??
看起来是的。
liutingting2020 2014-08-05
  • 打赏
  • 举报
回复
Summary information of files: When you right-click on a file in Explorer and go to the 'Summary' tab, you can add summary information for the file, like title, subject, author, and so on. This summary information is also saved into alternate stream. The stream name in this case is SummaryInformation:$DATA. 文件的摘要信息:当你在资源管理器中右键单击文件,然后转到“摘要”选项卡中,可以添加摘要信息的文件,如标题,主题,作者,等等。本摘要信息也保存在备用流。在这种情况下,数据流的名称是的SummaryInformation:$ DATA。 估计有时候ObjectAttributes->ObjectName中存储的是备用流吧??
liutingting2020 2014-08-05
  • 打赏
  • 举报
回复
引用 4 楼 Huntercao 的回复:
[quote=引用 3 楼 liutingting2020 的回复:] 可以多说点吗?ObjectAttributes中存储的不一定是文件名,有时候也是流信息: 比如我打印出来的数据是: {4c8cc155-6c1e-11d1_8e41-00c04fb9386d}:$DATA
其实我是来学习的。不太明白你的问题是什么。俺也没有去hook过ZwCreateFile的ObjectAttributes。 我觉得你可以从ZwCreateFile API的文档去分析一下该函数都支持哪些类别的Object。 也许你把ObjectAttributes所有参数都打印出来就明白对应的Object是什么。[/quote]这样哦。都没有其他人回答、
曹大夯 2014-08-05
  • 打赏
  • 举报
回复
引用 3 楼 liutingting2020 的回复:
可以多说点吗?ObjectAttributes中存储的不一定是文件名,有时候也是流信息: 比如我打印出来的数据是: {4c8cc155-6c1e-11d1_8e41-00c04fb9386d}:$DATA
其实我是来学习的。不太明白你的问题是什么。俺也没有去hook过ZwCreateFile的ObjectAttributes。 我觉得你可以从ZwCreateFile API的文档去分析一下该函数都支持哪些类别的Object。 也许你把ObjectAttributes所有参数都打印出来就明白对应的Object是什么。

21,616

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧