How get file path by handle in windbg?

匿名 (未验证) 提交于 2019-12-03 00:56:02

问题:

How I can obtain file path from handle with windbg/kd in kernel mode?

回答1:

Use !handle <handle_num> 7 <proc_id> to display detailed information for that handle where <handle_num> is the handle value and <proc_id> is the process id value (both hex based) see this msdn link for further information.

You can gleam your process id from a user mode session, this is the easiest method, just attach in user mode and enter the pipe command | and it will output like so:

. 0 id: 1680 attach name: D:\test\MyApp.exe

so 1680 would be the proc id, then list the handles using !handle and then in kernel mode enter:

!handle <handle_num> 7 1680 

will display what you want, there is a useful blog entry on this here.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!