日期:2014-05-16  浏览次数:20876 次

gdb 找密码
二进制文件反汇编的结果如下(只有可执行文件)
08048414 <main>:
 8048414: 55 push %ebp
 8048415: 89 e5 mov %esp,%ebp
 8048417: 83 e4 f0 and $0xfffffff0,%esp
 804841a: 83 ec 20 sub $0x20,%esp
 804841d: c7 44 24 1c fe 07 00 movl $0x7fe,0x1c(%esp)
 8048424: 00 
 8048425: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
 804842c: 00 
 804842d: c7 04 24 54 85 04 08 movl $0x8048554,(%esp)
 8048434: e8 e7 fe ff ff call 8048320 <puts@plt>
 8048439: b8 70 85 04 08 mov $0x8048570,%eax
 804843e: 8d 54 24 18 lea 0x18(%esp),%edx
 8048442: 89 54 24 04 mov %edx,0x4(%esp)
 8048446: 89 04 24 mov %eax,(%esp)
 8048449: e8 02 ff ff ff call 8048350 <__isoc99_scanf@plt>
 804844e: 8b 44 24 18 mov 0x18(%esp),%eax
 8048452: 3b 44 24 1c cmp 0x1c(%esp),%eax
 8048456: 75 0e jne 8048466 <main+0x52>
 8048458: c7 04 24 73 85 04 08 movl $0x8048573,(%esp)
 804845f: e8 bc fe ff ff call 8048320 <puts@plt>
 8048464: eb 0c jmp 8048472 <main+0x5e>
 8048466: c7 04 24 8f 85 04 08 movl $0x804858f,(%esp)
 804846d: e8 ae fe ff ff call 8048320 <puts@plt>
 8048472: c9 leave  
 8048473: c3 ret  
 8048474: 90 nop
 8048475: 90 nop
 8048476: 90 nop
 8048477: 90 nop
 8048478: 90 nop
 8048479: 90 nop
 804847a: 90 nop
 804847b: 90 nop
 804847c: 90 nop
 804847d: 90 nop
 804847e: 90 nop
 804847f: 90 nop
怎么用gdb工具找到它的密码是多少呢?(要用gdb工具,虽然能直接看出密码...)请各位大仙帮帮忙了,我是第一次接触,完全不懂的小白。。

------解决方案--------------------
一个懂安全的人编写的规范的程序,无论你怎么gdb,都不可能看到密码

直接在程序里写死密码的SB程序根本用不着gdb那么麻烦,直接把程序的字符串段dump出来,找里面像密码的试就行了