文章作者:无敌最寂寞 [E.S.T]
信息来源:邪恶八进制信息安全团队
从国外又淘到一段代码,是一段寻找制定模块的跳转指令的地址的东东。大家都知道,在溢出的时候一些指令的地址对溢出来说是至关重要的。像什么jmp esp/jmp ebx/call ebx/pop pop ret等这些指令的地址在溢出中起了决定性的作用。网上也有很多关于查找指令地址的工具。。。但自我感觉还不是很完善。。。当我拿到这个代码的时候,就产生了写一个功能比较全一点的工具。。。
先说一下原程序代码的功能,他可以查找任何jmp/call/pop pop ret的指令的地址。比如,如果你要查找kernel32.dll中的jmp esp/call esp/ 的指令地址你可以这样实用这款工具:findaddr kernel32.dll esp
输出结果如下:
引用:
E:\lcc\c\findaddr\Release>findaddr kernel32.dll esp
Findjmp, Eeye, I2S-LaB Findjmp2, Hat-Squad FindJmp DLL register
super address finder v1.0
rewritten by 无敌最寂寞@[EST]
Program compiled and Tested on Windows server 2003 EN
[+]Scanning kernel32.dll for code useable with the esp register
[+]0x77e839b3 call esp
[+]0x77e843eb call esp
[+]Finished Scanning kernel32.dll for code useable with the esp register
[+]Found 2 usable addresses
查找其它寄存器时只要更改后面的esp为相应的寄存器就是了,目前支持的寄存器有:
EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP
我再此基础上,暂时增加了两个功能。一个是查找默认异常处理地址。一个是查找call [esi+4c]的地址。
默认异常处理地址主要用在堆溢出的跳转地址,使用很简单,如下:
引用:
E:\lcc\c\findaddr\Release>findaddr -seh
Findjmp, Eeye, I2S-LaB Findjmp2, Hat-Squad FindJmp DLL register
super address finder v1.0
rewritten by 无敌最寂寞@[EST]
Program compiled and Tested on Windows server 2003 EN
[+]default top seh address: 0x77ebe210 in kernel32.dll module
而call [esi+4c]指令的地址也是在构造堆溢出的时候要用到的。。。至于如何使用可以看看那个Q版的缓冲区溢出教程,写得很不错的。
使用也很简单,如下:
引用:
E:\lcc\c\findaddr\Release>findaddr -esi user32.dll
Findjmp, Eeye, I2S-LaB Findjmp2, Hat-Squad FindJmp DLL register
super address finder v1.0
rewritten by 无敌最寂寞@[EST]
Program compiled and Tested on Windows server 2003 EN
[esi+0x4c] address found at 0x77d497e9 of user32.dll module
[-]REACHED the END of user32.dll memory
功能暂时就提供了这三个,如果可能,我会考虑在下一个版本增加新的功能。
使用说明如下:
引用:
E:\lcc\c\findaddr\Release>findaddr
Findjmp, Eeye, I2S-LaB Findjmp2, Hat-Squad FindJmp DLL register
super address finder v1.0
rewritten by 无敌最寂寞@[EST]
Program compiled and Tested on Windows server 2003 EN
Syntax:
findaddr <-seh> get address of top seh
findaddr <-esi> <dllname> get address of call [esi+0x4c]
findaddr <dllname> <regname> get address of jmp reg
(Currently supported registre are: EAX, EBX, ECX, EDX, ESI, EDI, ESP, EB
P)
Example:
findaddr -seh
findaddr -esi kernel32.dll
findaddr kernel32.dll esp
so much for it,have a good time and enjoy it!