-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add example case for tuple
(host, port pair) in gdb.attach
#2504
base: dev
Are you sure you want to change the base?
Conversation
Is the example added in #2291 lacking? Or how does your setup differ here? Is bash and gdbserver running on a different host? |
In my setup, both gdbserver and the target program are on the "remote" machine (I use 127.0.0.1 as an example), while #2291 launches local gdbserver. As the old doc launches gdbserver locally, that confuses me a bit as I had to make debugging remotely instead of locally. Maybe that part of doc could be deleted? Because |
Can you add a socat listener somewhere? So that the tests really test. |
OK, I could do that. But what about the similar doc in #2291? How can I modify my doc? |
I think it's enough to change the documentation showing you can use Lines 1041 to 1062 in fb2ee19
|
If you have ssh access you can use |
Well, I come up with this idea when I'm reproducing CVE-2024-2961. Though ssh forwarding is suitable for a real machine or virtual machine, it's too heavy for container. As the cve has been fixed already, and the lib with bug is loaded dynamically, it's hard to reproduce the bug just with patchelf. As a result, I start a In this case, if I start a ssh, obviously it will cost too much. So I start a xinted to deliver |
In
gdb.attach
,target
can be host, port pair, but this is not documented below. Recently I ran into a case where I need to debug the remote binary while I still would like to utilize local gdb.I started
xinetd
on port A to delivergdbserver
which listens on port B. To debug the target binary, I first connected to port A withremote
and started gdb to attach to port B, then I could interact with the target while I was able to set breakpoints.I realize this is a perfect example case to demonstrate how could pwntools debug remote apps with local gdb.