GDB Errors: Cannot insert breakpoint. Cannot access memory at address

47 views Asked by At

I am trying to defuse a binary bomb using GDB. But my GDB shows these errors:

PS D:\binarybomb> gdb bomb
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...

warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB.  Attempting to continue with the default i386:x86-64 settings.

Reading symbols from bomb...
(gdb) b phase_1
Breakpoint 1 at 0x1234
(gdb) r
Starting program: D:\binarybomb\bomb
Error creating process D:\binarybomb\bomb, (error 193: unknown win32 error (193))

And on Ubuntu (WSL):

kitsune@LAPTOP-MMDG3JER:/mnt/d/binarybomb$ gdb bomb
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bomb...
(gdb) b phase_1
Breakpoint 1 at 0x1234
(gdb) r
Starting program: /mnt/d/binarybomb/bomb
warning: opening /proc/PID/mem file for lwp 29.29 failed: No such file or directory (2)
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x800123

I have searched for many solutions but none of them worked, for example: run as administrator, disable antivirus, use sudo, ... Why my GDB behaves like this? I hope someone could help me.

Here is the link to my binary bomb in case you want to try it out.

Thank you so much!

0

There are 0 answers