私は現在、爆弾の爆縮に取り組んでおり、爆弾の第4段階にありますが、問題が発生しました。私はコードのこの部分が何を意味するのか分かりません。このアセンブリを理解しようとしています。
0x08048f64 <phase_4+81>: mov 0x804a20c(,%edx,4),%eax
0x08048f6b <phase_4+88>: jmp *%eax
私はこのコード行がそれに$ eaxにジャンプに入力するコードのいくつかの行を意味していることと思いますが、私は0x804a20cでどのような値の分からないので、しかしそうかわかりません。私は組み立てに少し新しいです。これまでのところ、入力は2つの数字で構成されていなければならず、2番目の数字は126でなければならないことがわかります。最初の数字が何であるかはわかりません。毎回xと126の数値を持つコードを実行します.Xは最終ステップに到達する任意の数値ですが、そのステップでは-0x8(ebp)の0の値を文字列の長さと比較します。 56行目では-0x8(ebp)に0を入力します。上記のコードがこれと何か関係があるのだろうかと思います。例えば
、I入力「100 126」は、プログラムは私が行の最後の爆発191
ここでは完全なコードだがジャンプしましょう0に7の値を比較しない場合。
0x08048f13 <phase_4+0>: push %ebp
0x08048f14 <phase_4+1>: mov %esp,%ebp
0x08048f16 <phase_4+3>: push %ebx
0x08048f17 <phase_4+4>: sub $0x24,%esp
0x08048f1a <phase_4+7>: lea -0x14(%ebp),%eax
0x08048f1d <phase_4+10>: mov %eax,0xc(%esp)
0x08048f21 <phase_4+14>: lea -0x10(%ebp),%eax
0x08048f24 <phase_4+17>: mov %eax,0x8(%esp)
0x08048f28 <phase_4+21>: movl $0x804a206,0x4(%esp)
0x08048f30 <phase_4+29>: mov 0x8(%ebp),%eax
0x08048f33 <phase_4+32>: mov %eax,(%esp)
0x08048f36 <phase_4+35>: call 0x8048b10 <[email protected]>
0x08048f3b <phase_4+40>: cmp $0x2,%eax
0x08048f3e <phase_4+43>: je 0x8048f45 <phase_4+50>
0x08048f40 <phase_4+45>: call 0x8049e74 <explosion>
0x08048f45 <phase_4+50>: mov -0x10(%ebp),%eax
0x08048f48 <phase_4+53>: mov %eax,-0xc(%ebp)
0x08048f4b <phase_4+56>: movl $0x0,-0x8(%ebp)
0x08048f52 <phase_4+63>: mov -0x14(%ebp),%eax
0x08048f55 <phase_4+66>: sub $0x74,%eax
0x08048f58 <phase_4+69>: mov %eax,-0x18(%ebp)
0x08048f5b <phase_4+72>: cmpl $0xa,-0x18(%ebp)
0x08048f5f <phase_4+76>: ja 0x8048fb5 <phase_4+162>
0x08048f61 <phase_4+78>: mov -0x18(%ebp),%edx
0x08048f64 <phase_4+81>: mov 0x804a20c(,%edx,4),%eax
0x08048f6b <phase_4+88>: jmp *%eax
0x08048f6d <phase_4+90>: addl $0x1,-0x8(%ebp)
0x08048f71 <phase_4+94>: movl $0x72,-0xc(%ebp)
0x08048f78 <phase_4+101>: shll -0x8(%ebp)
0x08048f7b <phase_4+104>: jmp 0x8048fba <phase_4+167>
0x08048f7d <phase_4+106>: addl $0x38,-0xc(%ebp)
0x08048f81 <phase_4+110>: addl $0x1,-0xc(%ebp)
0x08048f85 <phase_4+114>: movl $0x7a,-0x8(%ebp)
0x08048f8c <phase_4+121>: jmp 0x8048fba <phase_4+167>
0x08048f8e <phase_4+123>: movl $0x44,-0xc(%ebp)
0x08048f95 <phase_4+130>: subl $0x1,-0xc(%ebp)
0x08048f99 <phase_4+134>: shll -0x8(%ebp)
0x08048f9c <phase_4+137>: jmp 0x8048fba <phase_4+167>
0x08048f9e <phase_4+139>: subl $0x1,-0x8(%ebp)
0x08048fa2 <phase_4+143>: subl $0x7a,-0xc(%ebp)
0x08048fa6 <phase_4+147>: jmp 0x8048fba <phase_4+167>
0x08048fa8 <phase_4+149>: movl $0x3,-0xc(%ebp)
0x08048faf <phase_4+156>: addl $0x1,-0x8(%ebp)
0x08048fb3 <phase_4+160>: jmp 0x8048fba <phase_4+167>
0x08048fb5 <phase_4+162>: call 0x8049e74 <explosion>
0x08048fba <phase_4+167>: mov -0xc(%ebp),%eax
0x08048fbd <phase_4+170>: imul -0x8(%ebp),%eax
0x08048fc1 <phase_4+174>: mov %eax,%ebx
0x08048fc3 <phase_4+176>: mov 0x8(%ebp),%eax
0x08048fc6 <phase_4+179>: mov %eax,(%esp)
0x08048fc9 <phase_4+182>: call 0x8048a20 <[email protected]>
0x08048fce <phase_4+187>: cmp %eax,%ebx
0x08048fd0 <phase_4+189>: je 0x8048fd7 <phase_4+196>
0x08048fd2 <phase_4+191>: call 0x8049e74 <explosion>
0x08048fd7 <phase_4+196>: add $0x24,%esp
0x08048fda <phase_4+199>: pop %ebx
0x08048fdb <phase_4+200>: pop %ebp
0x08048fdc <phase_4+201>: ret
ご了承ください。ありがとうございました。
「x86」のように見えません –
@Roman R .:なぜですか? – BlackBear
windows dudeが検出されました:-) – horsh