【问题标题】:olly debugger cannot find referenced textolly 调试器找不到引用的文本
【发布时间】:2015-09-18 22:42:08
【问题描述】:

我创建了一个非常简单的 c++ 控制台应用程序,它将用户输入的密码与硬编码的密码进行比较并打印相应的输出。

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
  string password;
  cout << "Enter the password"<<endl;
  getline (cin, password);

 if(password=="123"){

      cout << "correct password" <<endl;
 }else  {
      cout << "incorrect password" <<endl;
 }
  return 0;

}

我想调试并跳过特定行。为此,我想搜索correct password / incorrect password 行。所以我尝试使用“搜索所有引用的文本”选项,但问题是没有这样的文本。

我遵循了一些教程,他们在其中搜索引用的文本并找到那种硬编码的行。

【问题讨论】:

  • 要不要先拆机?
  • @ForceBru 实际上我遵循了一些教程。他们只是从 olly 打开 exe 文件

标签: c++ reverse-engineering ollydbg


【解决方案1】:

嗯,我试过了,它对我有用:

我用 onlinecompiler.net 编译了代码,据我所知,它使用mingw。这是link to the executable

这可能是您的编译器有问题,但gcc/mingwcl.exe 都没有在编译时修改硬编码字符串。

另外,您确定要在程序模块中进行搜索吗? (例如,不在 ntdll 中)

【讨论】:

  • 非常好的答案。我正在使用 Visual Studio 2013。
  • 那么你的编译器是微软的cl.exe,它是一个很常见的编译器,问题出在这里的可能性很小。同样,您是否从好模块中进行了搜索?
  • 在这里我拍了一张快照i.imgur.com/9GsvD32.png。实际上它显示了类似ntdll 的东西。我想我做错了什么。你能解释一下ntdll吗
  • 就是这样。 Ntdll 是一个系统层,它将从这里调用程序的入口点。您必须通过逐步执行程序来找到该入口点 (Step Over)。当你找到它时,只需Step into 然后进行搜索。 i.imgur.com/N1IUVt7.png
  • 是的,一步一步执行,在&lt;module entry point&gt;的左边你会找到你的exe名称。
猜你喜欢
  • 2012-03-22
  • 2012-05-12
  • 1970-01-01
  • 2011-05-26
  • 1970-01-01
  • 1970-01-01
  • 2023-03-11
  • 1970-01-01
  • 2011-06-12
相关资源
最近更新 更多