Question: Hello, I am working on the Binary Bomb Lab and am struggling with phase 4 of it. The ultimate goal is to find the input

Hello, I am working on the Binary Bomb Lab and am struggling with phase 4 of it. The ultimate goal is to find the input needed to go onto the next phase using the provided assembly code and gdb to debug it. I would really appreciate help on this problem as I am stuck. I have attached the code for phase_4 and func4 which is called. Thank you

Hello, I am working on the Binary Bomb Lab and am struggling

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 Dump of assembler code for function phase_4: => 0x0000555555555380 : sub $0x18,%rsp 0x0000555555555384 : mov *fs: 0x28,%rax Ox000055555555538d : mov %rax, 0x8(%rsp) 0x0000555555555392 ; xor %eax,seax 0x0000555555555394 ; lea 0x4(%rsp),%rcx 0x0000555555555399 : mov %rsp, %rdx 0x000055555555539C ; lea 0x15cc (%rip),%rsi # Ox55555555696f 0x00005555555553a3 : calla 0x555555554ef0 <_isoc99_sscanf> Ox00005555555553a8 : cmp $0x2, %eax 0x00005555555553ab ; jne 0x5555555553b3 0x00005555555553ad : cmpl $0xe, (%rsp) 0x00005555555553b1 : jbe 0x555555555368 0x00005555555553b3 : calla Ox5555555557e3 0x00005555555553b8 : mov $0xe, %edx 0x00005555555553bd ; mov $0x0, Sesi 0x00005555555553c2 ; mov (%rsp), %edi 0x00005555555553c5 : calla 0x555555555341 0x00005555555553ca : cmp $0x1, %eax 0x00005555555553cd : jne 0x5555555553d6 0x00005555555553cf ; cmpl $0x1,0x4(%rsp) 0x00005555555553d4 ; je 0x5555555553db Ox00005555555553d6 : calla 0x5555555557e3 Ox00005555555553db ; mov 0x8(%rsp),%rax 0x00005555555553e0 : xor %fs: 0x28,%rax 0x00005555555553e9 : jne 0x5555555553f0 0x00005555555553eb ; add $0x18,%rsp Ox00005555555553ef : reta 0x00005555555553f0 : callq Ox555555554e50 Dump of assembler code for function funct: => 0x0000555555555341 ; sub $0x8,%rsp 0x0000555555555345 ; mov %edx, Seax 0x0000555555555347 ; sub %esi, %eax 0x0000555555555349 : mov %eax,secx 0x000055555555534b ; shr $0x1f, %ecx 0x000055555555534e : add %eax, %ecx 0x0000555555555350 : sar %ecx 0x0000555555555352 : add %esi, %ecx 0x0000555555555354 : cmp %edi, %ecx 0x0000555555555356 : jg 0x555555555366 0x0000555555555358 ; mov $0x0, %eax 0x000055555555535d : cmp %edi, %ecx 0x000055555555535f : jl 0x555555555372 0x0000555555555361 : add $0x8,%rsp 0x0000555555555365 ; reta Ox0000555555555366 : lea -Ox1(%rcx), %edx 0x0000555555555369 : calla Ox555555555341 0x000055555555536e : add %eax,seax Ox0000555555555370 : jmp 0x555555555361 0x0000555555555372 ; lea 0x1(%rcx), Sesi 0x0000555555555375 ; calla 0x555555555341 0x000055555555537a : lea 0x1(%rax,%rax, 1), %eax 0x000055555555537e ; jmp 0x555555555361 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 Dump of assembler code for function phase_4: => 0x0000555555555380 : sub $0x18,%rsp 0x0000555555555384 : mov *fs: 0x28,%rax Ox000055555555538d : mov %rax, 0x8(%rsp) 0x0000555555555392 ; xor %eax,seax 0x0000555555555394 ; lea 0x4(%rsp),%rcx 0x0000555555555399 : mov %rsp, %rdx 0x000055555555539C ; lea 0x15cc (%rip),%rsi # Ox55555555696f 0x00005555555553a3 : calla 0x555555554ef0 <_isoc99_sscanf> Ox00005555555553a8 : cmp $0x2, %eax 0x00005555555553ab ; jne 0x5555555553b3 0x00005555555553ad : cmpl $0xe, (%rsp) 0x00005555555553b1 : jbe 0x555555555368 0x00005555555553b3 : calla Ox5555555557e3 0x00005555555553b8 : mov $0xe, %edx 0x00005555555553bd ; mov $0x0, Sesi 0x00005555555553c2 ; mov (%rsp), %edi 0x00005555555553c5 : calla 0x555555555341 0x00005555555553ca : cmp $0x1, %eax 0x00005555555553cd : jne 0x5555555553d6 0x00005555555553cf ; cmpl $0x1,0x4(%rsp) 0x00005555555553d4 ; je 0x5555555553db Ox00005555555553d6 : calla 0x5555555557e3 Ox00005555555553db ; mov 0x8(%rsp),%rax 0x00005555555553e0 : xor %fs: 0x28,%rax 0x00005555555553e9 : jne 0x5555555553f0 0x00005555555553eb ; add $0x18,%rsp Ox00005555555553ef : reta 0x00005555555553f0 : callq Ox555555554e50 Dump of assembler code for function funct: => 0x0000555555555341 ; sub $0x8,%rsp 0x0000555555555345 ; mov %edx, Seax 0x0000555555555347 ; sub %esi, %eax 0x0000555555555349 : mov %eax,secx 0x000055555555534b ; shr $0x1f, %ecx 0x000055555555534e : add %eax, %ecx 0x0000555555555350 : sar %ecx 0x0000555555555352 : add %esi, %ecx 0x0000555555555354 : cmp %edi, %ecx 0x0000555555555356 : jg 0x555555555366 0x0000555555555358 ; mov $0x0, %eax 0x000055555555535d : cmp %edi, %ecx 0x000055555555535f : jl 0x555555555372 0x0000555555555361 : add $0x8,%rsp 0x0000555555555365 ; reta Ox0000555555555366 : lea -Ox1(%rcx), %edx 0x0000555555555369 : calla Ox555555555341 0x000055555555536e : add %eax,seax Ox0000555555555370 : jmp 0x555555555361 0x0000555555555372 ; lea 0x1(%rcx), Sesi 0x0000555555555375 ; calla 0x555555555341 0x000055555555537a : lea 0x1(%rax,%rax, 1), %eax 0x000055555555537e ; jmp 0x555555555361

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!