1

I've been trying to debug a binary file in radare2 but it throws me this error.

$ r2 -d bin                      
Killing child process 1688 due to an error
Killing child process 1689 due to an error
[w] Cannot open 'dbg://./bin' for writing.

So I ran it without the -d parameter but I'm unable to execute the program by dc as the error below is shown

[0x00000610]> dc
Cannot continue, run ood?

I tried running ood but following prompt is received

[0x00000610]> ood
Killing child process 1711 due to an error
Killing child process 1712 due to an error
r_core_file_reopen: Cannot reopen file: dbg:///home/kali/Downloads/bin  with perms 0x7, attempting to open read-only.

Is this the problem with the binary or am I doing something wrong? Some help is appreciated.

2
  • 2
    what is this bin file? did you set it as an executable chmod +x bin? Commented May 18, 2021 at 8:06
  • No I didn't, I'm an absolute beginner so thanks for pointing that to me
    – Nimrod
    Commented May 18, 2021 at 9:37

1 Answer 1

1

So I ran it without the -d parameter but I'm unable to execute the program by dc as the error below is shown

[0x00000610]> dc
Cannot continue, run ood?

radare2 will NOT continue or run the target program's execution because without the -d option, it'll run the program in static analysis mode(Static analysis of a program is the analysis of the code without regard to its execution or input.)

if you intend to do dynamic analysis, add the -d option, for your example, you could do this:

r2 -d ./bin
  • But also make sure the target program's file path is accurate.

  • If the binary is 32bit, consider checking if radare2 is installed

    with 32bit support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.