OllyDbg 无法调试 Visual Studio exe
我刚刚用这个简单的代码创建了一个新的 vc++ exe:
#include<stdio.h>
#include<string.h>
#include<windows.h>
int ExceptionHandler(void);
int main(int argc,char *argv[]){
char temp[512];
printf("Application launched");
try
{
throw "error";
}
catch (... )
{
ExceptionHandler();
}
return 0;
}
int ExceptionHandler(void)
{
printf("Exception");
return 0;
}
该应用程序非常简单,并且创建了一个依赖于 kernel32.dll 和 MSVCR100D.dll 的 exe 文件。
当我尝试将其导入并调试到 OllyDbg 中时(我只是想在堆栈窗口中查看 SEH 链),它显示“模块‘testseh’在代码外部有入口点(如 PE 头中指定)。也许这个文件是设置断点时请记住自解压或自修改!”并且没有执行任何代码,它直接跳转到ntdll.dll崩溃部分(实际上exe崩溃了,但我无法一步步执行printf指令)
这是怎么回事?该exe既不依赖CLI也不依赖CLR,我错过了什么吗?
I've just created a new vc++ exe with this simple code:
#include<stdio.h>
#include<string.h>
#include<windows.h>
int ExceptionHandler(void);
int main(int argc,char *argv[]){
char temp[512];
printf("Application launched");
try
{
throw "error";
}
catch (... )
{
ExceptionHandler();
}
return 0;
}
int ExceptionHandler(void)
{
printf("Exception");
return 0;
}
The app is extremely simple, and an exe file depending on kernel32.dll and MSVCR100D.dll is created.
When I try to import and debug it into OllyDbg (I just wanted to see the SEH chain in the stack window) it says "Module 'testseh' has entry point outside the code (as specified in the PE header). Maybe this file is self-extracting or self-modifying. Please keep it in mind when setting breakpoints!" and no code is executed, it jumps directly to the ntdll.dll crash part (in fact the exe is crashing but I can't step by step the printf instructions)
How come this behaviour? The exe doesn't rely on CLI neither CLR, am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 olly 获取的编译器异常为关键(错误设置)
Compiler exceptions taken from olly as critical (wrong settings)