so the two numbers i need to enter as input would be entered in reverse order? i.e. if input = 3 6
(ebp+8) = 6
(ebp+4) = 3
Also I've been looking at the conditionals and it seems (ebp - 4) has to be either 2,3, or 4 and then based on which value it is there would be a jump to one of these memory locations
if 2 jump to 0x08048d53
if 3 jump to 0x08048d58
if 4 jump to 0x08048d5d
then after performing a calculation at those locations set = eax
a conditional that if *(ebp-4) > 5 or eax != *(ebp-8) equals tru the bomb explodes otherwise diffused
that being said i could use 2,3 or 4 and then based on which i choose and where it jumps from on the conditional i would need to solve the calculation for the second user input?
Is the what is happening and upon doing so I would get the needed second value?
Main Topics
Browse All Topics





by: Infinity08Posted on 2009-10-19 at 15:28:47ID: 25609563
>> The first input would be stored at
>> 0x08048cd7 <phase_3+6>: lea -0x8(%ebp),%eax
>> stored at (ebp-8)
>>
>> then the second input would be stored at
>> 0x08048cde <phase_3+13>: lea -0x4(%ebp),%eax
>> stored at (ebp-4)
It's the other way around (the parameters to sscanf are pushed on the stack in reverse order), but those two addresses will indeed contain the two values read from the string by sscanf.
>> Am i interpreting this correctly?
The rest is pretty much what happens :) Now just put some actual values in your description of what happens, and figure out what the input needs to be ;)