【问题标题】:How to evaluate RtlDecodePointer from a dump in WinDBG?如何从 WinDBG 中的转储评估 RtlDecodePointer?
【发布时间】:2023-02-19 00:54:35
【问题描述】:

我有一个用户模式 ​​Windows 程序的故障转储,我想模拟 RtlDecodePointer(),即解码一些用 RtlEncodePointer() 编码的指针。我怎么做?

【问题讨论】:

    标签: windows debugging windbg dump


    【解决方案1】:

    我能够编写以下 WinDBG 表达式:

    r $t0 = 86aaaa40`0007ff77 // put value to decoded here
    r $t1 = dwo(ntdll!`RtlpGetCookieValue'::`2'::CookieValue)
    r $t2 = @$t1 & 3f
    r $t3 = (@$t0 >> (0x40 - @$t2)) | (@$t0 << @$t2)
    .printf "Decoded pointer: %p
    ", @$t3 ^ @$t1
    

    或者,作为单行:

    r $t0 = 86aaaa40`0007ff77 // put value to decoded here
    r $t1 = dwo(ntdll!`RtlpGetCookieValue'::`2'::CookieValue); r $t2 = @$t1 & 3f; r $t3 = (@$t0 >> (0x40 - @$t2)) | (@$t0 << @$t2); .printf "Decoded pointer: %p
    ", @$t3 ^ @$t1
    

    即使在没有完整内存的小型转储上,这也能很好地工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多