WinDbg定位句柄泄露
1.安装WinDbg:
https://zhuanlan.zhihu.com/p/43972006
2.操作:
(1)Open Executable
(2)F5运行,然后!htrace -enable 命令开启句柄检测
(3)g运行,然后!htrace -snapshot 命令,获得此时进程句柄的镜像。并再次让程序运行
(4)!htrace -diff 命令获得当前句柄状态与第 3 步 snapshot 镜像句柄的差异
(5)lsa 或者 !handle xx f