1

I'm debugging a vulnerable app on a remote host. I've set up gbserver on the host with:

gdbserver host:1234 /my/target/app

On my local host I've connected with:

$ gdb /same/target/app
gdb$ target extended-remote 192.168.0.100:1234

I connect successfully and can proceed to set a breakpoint on a target instruction, ie:

$gdb disas vuln_function
....
   0x08048e6b <+116>:   ret
End of assembler dump.
gdb$ b *0x08048e6b
Breakpoint 1 at 0x8048e6b

Looking at the disassembled function code and having tested this on the host itself, I'm 100% sure I'm breaking on the right address and in any case I'm triggering a buffer overflow which should make gdb break by itself.

But instead of getting the usual breakpoint on my gdb client, nothing happens. gdbserver freezes on the BO (so I'm guessing it did break on the ret) without throwing the segfault. gdb doesn't seem to be crashing or behaving abnormally other than not giving me a prompt on the breakpoint.

Is there a special way to set breakpoints when debugging with gdbserver?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.