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.

Nimrod
  • 151
  • 1
  • 7

1 Answers1

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.