Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a trouble solving this bomb (assembler code). I want to know what func6 does (0x08048efe ). I tried typing calling func6, and gdb

I have a trouble solving this bomb (assembler code).

I want to know what func6 does (0x08048efe <+70>). I tried typing calling func6, and gdb returns text variable, no debug info. What does this mean?

Is there any way of figuring out what func6 does?

I know return value is generally stored in eax after calling function, but in this case, a bomb will be exploded if I set breakpoint right after calling func6, so I cannot figure out any.

Also, it would be much more helpful If you explain what this assembler code does.

0x08048eb8 <+0>: sub $0x1c,%esp

0x08048ebb <+3>: mov %gs:0x14,%eax

0x08048ec1 <+9>: mov %eax,0xc(%esp)

0x08048ec5 <+13>: xor %eax,%eax

0x08048ec7 <+15>: lea 0x8(%esp),%eax

0x08048ecb <+19>: push %eax

0x08048ecc <+20>: lea 0x8(%esp),%eax

0x08048ed0 <+24>: push %eax

0x08048ed1 <+25>: push $0x804a601

0x08048ed6 <+30>: pushl 0x2c(%esp)

0x08048eda <+34>: call 0x80488b0 <__isoc99_sscanf@plt>

0x08048edf <+39>: add $0x10,%esp

0x08048ee2 <+42>: cmp $0x2,%eax

0x08048ee5 <+45>: jne 0x8048eee

0x08048ee7 <+47>: cmpl $0xe,0x4(%esp)

0x08048eec <+52>: jbe 0x8048ef3

0x08048eee <+54>: call 0x8049495

0x08048ef3 <+59>: sub $0x4,%esp

0x08048ef6 <+62>: push $0xe

0x08048ef8 <+64>: push $0x0

0x08048efa <+66>: pushl 0x10(%esp)

0x08048efe <+70>: call 0x8048e5f

0x08048f03 <+75>: add $0x10,%esp

0x08048f06 <+78>: cmp $0xd,%eax

0x08048f09 <+81>: jne 0x8048f12

0x08048f0b <+83>: cmpl $0xd,0x8(%esp)

0x08048f10 <+88>: je 0x8048f17

0x08048f12 <+90>: call 0x8049495

0x08048f17 <+95>: mov 0xc(%esp),%eax

0x08048f1b <+99>: xor %gs:0x14,%eax

0x08048f22 <+106>: je 0x8048f29

0x08048f24 <+108>: call 0x8048800 <__stack_chk_fail@plt>

0x08048f29 <+113>: add $0x1c,%esp

0x08048f2c <+116>: ret

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions