debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Sending input to stdin does not work when doing remote debugging from macOS to Linux

Open xusheng6 opened this issue 2 years ago • 2 comments

While working with this ctf challenge, I noticed that sending input to stdin does not work when doing remote debugging. The target runs on a Linux box and I connected to it from macOS. After the target asks for input, and I typed something into the console, the target does not stop. Interrupting the target, I can see it is still waiting for input, which means the input was not sent to stdin.

This is a rust binary, not sure it it is relevant.

wargame.zip

xusheng6 avatar Jul 03 '23 14:07 xusheng6

Having the same issue while working on CGI binaries waiting for POST through STDIN.

Sharing a work around:

# term1, create fifo
$ mknod myinput p
$ cat myinput|/bin/binary

# term2, launch lldb debug platform
$ /root/rd/lldb-server p --server --listen 0.0.0.0:1234

# binaryninja
- connect to remote debug server, attach process, it's waiting for stdin anyway

# term4, send input to fifo
$ echo hello > myinput

gboddin avatar Mar 11 '24 09:03 gboddin

I have a similar issue when using binja from a linux machine with lldb running in a linux vm Is there a better workaround yet?

CHr15W3 avatar Jul 30 '24 20:07 CHr15W3