简体   繁体   English

在大型 MEMORY.DMP 文件中搜索字符串

[英]Search strings in a large MEMORY.DMP file

How can I search a string in a large MEMORY.DMP file generated by Windows BSOD (Windows 8.1 64 bit)?如何在 Windows BSOD(Windows 8.1 64 位)生成的大 MEMORY.DMP 文件中搜索字符串?

On 32-bit Windows, the command在 32 位 Windows 上,命令

s -a 0 ffffffff "my pattern"

seems to work.似乎工作。

But for 64-bit windows,但是对于 64 位窗口,

s -a 0 ffffffff`ffffffff "my pattern"

takes almost infinite time, even though the total size of the MEMORY.DMP is about 400MB only, while a simple grep can find the pattern within seconds.花费几乎无限的时间,即使 MEMORY.DMP 的总大小只有大约 400MB,而简单的grep可以在几秒钟内找到模式。

My goal is to find the virtual address of the string to determine which stack/heap/text area is overwritten by it.我的目标是找到字符串的虚拟地址,以确定哪个堆栈/堆/文本区域被它覆盖。

I would finally resort to interpret the file format of MEMORY.DMP by hand if the reference or specification of the file format is available.如果文件格式的参考或规范可用,我最终会求助于手动解释 MEMORY.DMP 的文件格式。 Any hints?任何提示?

Currently this is how I do it:目前我是这样做的:

  1. !heap -a !heap -a

Which will provide some output like below:这将提供一些输出,如下所示:

HEAPEXT: Unable to get address of ntdll!RtlpHeapInvalidBadAddress. Index   Address  Name      Debugging options enabled   1:   1b9be450000 
    Segment at 000001b9be450000 to 000001b9be54f000 (0008b000 bytes committed)   2:   1b9be1f0000 
    Segment at 000001b9be1f0000 to 000001b9be200000 (00001000 bytes committed)   3:   1b9bfe10000 
    Segment at 000001b9bfe10000 to 000001b9bfe1f000 (0000f000 bytes committed)
    Segment at 000001b9c3a40000 to 000001b9c3b3f000 (00005000 bytes committed)   4:   1b9be440000 
    Segment at 000001b9be440000 to 000001b9be44f000 (00007000 bytes committed)
  1. Search between the start and end addresses of each segment until you find your data在每个段的起始地址和结束地址之间搜索,直到找到你的数据
  2. For example: s -a 000001b9be450000 000001b9be54f000 "my pattern"例如:s -a 000001b9be450000 000001b9be54f000 “我的模式”

This may not work in every scenario but for me it allowed me to find the data I was looking for.这可能不适用于所有场景,但对我来说,它允许我找到我正在寻找的数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM