Mines! bomb-whu, phase-1

6 points, the difficulty level with the lifting upgrade;
be inferred by interpretation assembler code corresponding function structure (not unique inference process), some points are not the only answer;
best effort, it can be turned through a few few off.
Tip:
First off (knowledge: string, the function call stack)
second pass (knowledge: loop, array)
third, (knowledge: switch statement)
fourth off (knowledge: recursion)
fifth off (knowledge: string conversion, ASCII translation, addressing)
The sixth pass (knowledge: addressing)

(1-5 off, each 15 minutes. 10. 6 off. Experimental summary 15 minutes.)

Note 1: The
current user may not perform bomb file permissions, it is recommended to view the file permissions with ls, if no execute permissions, add execute permission to bomb the current user file with the command chmod + x bomb.
Note 2:

   If ./bomb execute the file no such file with the command prompt, switch to using su szu szu account, then enter the command sudo apt-get install lib32z1, wait for the download can be installed.

Third, the experimental environment:
1. Computer (Intel the CPU)
2. Linux64-bit operating system (Ubuntu 17)
3. GDB debugging tool

4. objdump disassembler

Four, experimental methods and procedures

1. First disassemble bomb files, and outputs the result to 1.txt.

$ objdump -d bomb_64 > 1.txt


080488c0 <phase_1>: 80488c0: 83 ec 1c sub $0x1c,%esp 80488c3: c7 44 24 04 3c 93 04 movl $0x804933c,0x4(%esp) 80488ca: 08 80488cb: 8b 44 24 20 mov 0x20(%esp),%eax 80488cf: 89 04 24 mov %eax,(%esp) 80488d2: e8 93 04 00 00 call 8048d6a <strings_not_equal> 80488d7: 85 c0 test %eax,%eax 80488d9: 74 05 je 80488e0 <phase_1+0x20> 80488db: e8 95 05 00 00 call 8048e75 <explode_bomb> 80488e0: 83 c4 1c add $0x1c,%esp 80488e3: c3 ret
这个是
phase_1 assembly code, a first comparison string is equality
<Strings_not_equal>, are equal je 80488e0 <phase_1 + 0x20>
不相等则 <explode_bomb>

 

找到地址
0x804933c
得到答案。phase-1到这里,下次更新2

 
参考:https://www.cnblogs.com/Cherrison-Time/p/10085616.html
https://blog.csdn.net/Xindolia_Ring/article/details/80142345

Guess you like

Origin www.cnblogs.com/0001lizhubo/p/11470465.html