JustinFincher / mentohust

Automatically exported from code.google.com/p/mentohust
0 stars 0 forks source link

求助:openwrt下mentohust加入校验文件后运行出现seg fault(附gdb backtrace信息) #197

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
RT,在datafile参数指定的路径下加入8021x.exe等几个校验所需文�
��后,运行mento就会出现segmentation 
fault。不加则能正常运行,但无法认证成功。装gdbserver远程调
试,backtrace返回栈中为mycheck.c中的getVer函数出错(详细信息见�
��件截图),但不知为何无法确定是源码中的哪一行(gdb显示��
�出错行根本就不是getVer函数包含的范围)。注意到发出seg 
fault前定义为PPE_HEADER_MAP的hpe变量的地址很是奇怪,竟然是0x10
b72408,有点不可思议。对应回V2版本的源码为:
hpe = (PPE_HEADER_MAP)(data + LTOBL(((PIMAGE_DOS_HEADER)data)->e_lfanew));
(其中data 的地址0xb62408)
不知是不是在读取8021x.exe时出了什么问题,得出了个超大的��
�址。。同样的源码编译出来的x86版本、同样的8021x.exe,跑在P
C上却是完全没有问题的。好生奇怪。

小白一枚没看懂校验这一块的代码,前来求助。。

Original issue reported on code.google.com by yqt0...@gmail.com on 18 Oct 2012 at 4:00

Attachments:

GoogleCodeExporter commented 9 years ago
忘记附上环境了。
--
路由:MR11U(ar71xx) 4M ROM;32M RAM
系统:OpenWrt Firmware Attitude Adjustment (r31201)
     mentohust_0.3.1-1
     libpcap_1.0.0-2
     libc_0.9.33.2-1
     libgcc_4.6-linaro-1

编译package为mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2,固件是网上找的��
�

Original comment by yqt0...@gmail.com on 18 Oct 2012 at 4:14

GoogleCodeExporter commented 9 years ago
./configure --host=mips-linux --disable-encodepass --disable-arp 
--disable-notify --disable-nls --with-pcap=dylib
不要自己写个不正确的Makefile编译

Original comment by HUSTPub...@gmail.com on 19 Oct 2012 at 12:10

GoogleCodeExporter commented 9 years ago
感谢楼上回复,不过表示用你的参数编译同样出现seg fault.

Original comment by yqt0...@gmail.com on 20 Oct 2012 at 4:23

GoogleCodeExporter commented 9 years ago
http://blog.csdn.net/warriorpaw/article/details/7990226
按我这个  编下试试呗   我在3个不同CPU的路由上测试通过

Original comment by z.warrio...@gmail.com on 1 Nov 2012 at 3:17