我想知道如何手动执行附加应用程序中存在的函数?我到处找遍了,找不到任何有用的信息。在IDA中,它被称为appCall,那么对olly来说它等同于什么呢?
发布于 2015-02-19 19:39:43
手动调用任何函数都相当于将函数调用组装到inplace中。
假设在ollydbg下运行calc.exe
内部函数SetBox(< x >、)以科学的方式在inv和hyp复选框中设置复选标记。
可以有两个值设置为== 1和unset == 0
== Id的CheckBox,您已经确定Id为0x8c和0x8d
您还确定此函数为__stdcall。
假设您希望手动调用此函数,并希望设置id 0x8c复选框,只需找到一个位置并组装以下序列并执行它们
push 1
push 0x8c
call calc.SetBox在执行此操作时,您需要注意的是不要损坏堆栈,并且在执行完代码片段后,返回到原来从
ollydbg.exe calc.exe ->f9运行exe,然后f12暂停注意ollydbg已暂停的地址(for xpsp3将是ntdll!KiFastSystemCallRet())
现在,找到一个代码洞穴汇编在这里使用新的来源来将eip传输到新组装的代码,执行代码段执行代码段,选择原始的暂停地址(对于xpsp3 ntdll!kiFastSystemCallRet())和将eip重置回这个地址和f9,您会注意到在没有单击复选框的情况下设置了复选标记:
有时我会手动执行(f12书签eip向下滚动到空空间、组装、执行并通过书签返回)
或者使用脚本并使用ODBGSCRIPT运行它。
当您在下面的f12中暂停ollydbg时,上面描述的scenerio脚本(calc复选框)
编辑注释脚本并添加malloc以消除洞穴搜索杂务。
var myret ;variable
var cave ;variable
var mem ;variable
mov myret , eip ;save current eip
alloc 1000 ;allocate memory (no need to search for code caves
mov mem, $RESULT ;save for freeing the allocated memory
mov cave,$RESULT ;mov newly allocated space to var cave
mov eip , cave ;detour current eip to cave
asm cave, "push 01" ;assemble instruction (pop all push dont corrupt stack)
add cave,$RESULT ;lenght added to find next address for assembling
asm cave, "push 08c" ;assemble next instruction
add cave,$RESULT ;len of previous instruction added to current address
asm cave, "call calc.SetBox" ; assemble call
step ; we assembled 3 instructions lets step thrice
step ;
step ;
mov eip , myret ;restore saved eip
free mem,1000 ;free
go ;run the binary to notice the check box ticked发布于 2015-02-19 14:54:37
对于Ollydbg中的应用程序,还没有内置的方法来实现这一点。为此,您可能需要编写一个插件。
但是,如果目标是DLL中的导出函数,则可以在Ollydbg中使用“调用DLL导出”功能。使用“调用导出”功能,您可以调用带有参数的导出函数,如下面的屏幕截图所示。


https://stackoverflow.com/questions/28595906
复制相似问题