使用程序集调试资源中的字符串
这是我的问题。我正在尝试学习如何使用 OllyDBG 进行汇编调试。通常,当一个字符串确实存在于应用程序中时,我可以找到指向它的东西,但是,这个字符串来自资源文件(在进行 WinAPI 编程时,使用资源 .rc)。因此,鉴于它在资源数据中,我如何才能找到在反汇编中调用该字符串的位置?
谢谢
Here is my issue. I'm trying to learn how to do debugging in assembly with OllyDBG. Usually, when a string is literally in the application, I can find something that points to it, however, this string is from the resource file (when doing WinAPI programming, a resource, .rc, is used). Therefore, given that it is in resource data, how can I find out where this string is called upon in the disassembly?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将断点设置到 LoadStringW 并等待该字符串。
(当然有条件BP比反复按[F9]要好)
但最好先进行静态分析(反汇编文件),然后在需要时使用OllyDbg进行调试。
例如,在静态分析期间,您可以找到所有 LoadStringW 调用,并通过 ID 查找加载字符串的调用。
Put breakpoint to LoadStringW and wait this string.
(Of course conditional BP is better than repeatedly press [F9])
But it's better first to do a static analysis (disassemble file), then use OllyDbg to debug it, if needed.
For example during static analysis you can find all LoadStringW calls, and find which loads the string by its ID.
您应该使用某些资源编辑器(例如 ResEdit)检查字符串表,并找到您正在搜索的字符串的 ID。然后您应该在 LoadString 函数调用上打断并检查它加载的 ID。
You should check string table using some resource editor (for example ResEdit) and find ID of string that you are searching. Then you should put the break on LoadString function calls and check what ID it loads.