Ollydbg 程序前指令
我是逆向工程的新手,我一直在研究一个简单的程序:
char* a = "hello world";
printf(a);
但是,当我在 ollydbg 中打开它时,我并没有像在 gdb 中那样直接进入程序集,首先还有更多指令。我想知道为什么会发生这种情况。
谢谢!
I am new to reverse engineering, and I have been looking at a simple program:
char* a = "hello world";
printf(a);
However, when I open this in ollydbg, I am not taken right to the assembly as I would have been in gdb, there are many more instructions first. I was wondering why this was happening.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您使用 olly 连接到程序的方式,您将被带到两个位置之一(如果没有发生错误):
main
/< 的系统粘合和 CRT 包装器code>WinMain/DllMain
):当您使用 olly 启动程序时会发生这种情况。NtUserBreakPoint
:这是当您附加到现有进程时的情况。要导航到您想要的位置,您可以使用 ctrl + e 调出模块窗口,从那里选择您想要的模块。然后使用 crtl + n 打开当前模块的符号窗口(注意:要使非导出符号可用,pdb 需要可用,或者您需要对您的模块执行对象扫描obj 用于该构建)。
如果您进入
ModuleEntryPoint
,您也可以直接深入调用链(通常您想要第二个调用/jmp),这将带您到达 crt 入口点,从那里只需查找带有 3 的调用/5/4 args,这将是main
/WinMain
/DllMain
:从这里:
我们转到这里:
然后向下滚动到这里:
我假设正在使用 ollydbg 1.10。
Depending how you attach to the program with olly, you'll be take to one of two places(if no errors occurred):
main
/WinMain
/DllMain
): this occurs when you start a program with olly.NtUserBreakPoint
: this is when you attach to an existing process.To navigate to where you want you can use
ctrl + e
to bring up the modules window, from there, select the module you want. Then usecrtl + n
to bring up the symbols window for your current module (note: for non-exported symbols to be available, the pdb's need to be available or you need to perform an object scan of your obj's for that build).if your taken to the
ModuleEntryPoint
you can also just spelunk down the call chain (generally you want the second call/jmp), this gets you to the crt entrypoint, from there just look for a call with 3/5/4 args, this will bemain
/WinMain
/DllMain
:from here:
we goto here:
then scroll down here:
I'm assuming ollydbg 1.10 is being used.