I am having a binary which takes an input from user and checks every bit of our character using the check_value function which does some stuff. The disassembly of the interested function is:
.text:000000000005620B loc_5620B: ; CODE XREF: main+A1j
.text:000000000005620B movzx edi, byte ptr [rbx+rdx]
.text:000000000005620F mov rsi, [r8+rdx*8]
.text:0000000000056213 call check_value
.text:0000000000056218 inc rdx
.text:000000000005621B and ecx, eax
.text:000000000005621D cmp rdx, 3Bh <----**This condition**
.text:0000000000056221 jnz short loc_5620B
.text:0000000000056223 test cl, cl
.text:0000000000056225 lea rdi, aYouDidnTGetItM ; "You didn't get it, much sadness :("
.text:000000000005622C jz short loc_5623E
.text:000000000005622E lea rdi, aYouGotItCorrec ; "You got it! correct! awesome!"
.text:0000000000056235 call _puts
.text:000000000005623A xor eax, eax
.text:000000000005623C jmp short loc_56248
What I understand is the cmp
instruction is where the execution is getting diverted and I want to do a straight bruteforce. How can i do using either a gdb
script or angr
framework?