Skip to content
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

Add DOCKER_GDBSERVER_PORT option #24

Open
C0deH4cker opened this issue Oct 7, 2023 · 1 comment
Open

Add DOCKER_GDBSERVER_PORT option #24

C0deH4cker opened this issue Oct 7, 2023 · 1 comment
Assignees
Milestone

Comments

@C0deH4cker
Copy link
Owner

It would be very useful during challenge development to run the challenge in the container and attach gdb to it. I think the best way to enable this is to allow opening a port to a listening instance of gdbserver.

The Build.mk variable could be called DOCKER_GDBSERVER_PORT. When this is set to a port number, it'll do one of two things (I still need to think about this):

  1. Override the container's entrypoint to run pwnable_server under gdbserver, which will listen on the given port.
  2. Override the command launched by pwnable_server upon receiving a connection to instead run it under gdbserver.

PwnableHarness will also need to add the port forwarding options. The gdbserver port should only ever be exposed on localhost.

@C0deH4cker C0deH4cker self-assigned this Oct 7, 2023
@C0deH4cker
Copy link
Owner Author

C0deH4cker commented Oct 10, 2024

Option 2 definitely makes more sense to me now.

@C0deH4cker C0deH4cker added this to the v2.2 milestone Oct 21, 2024
@C0deH4cker C0deH4cker modified the milestones: v2.2, v2.3 Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant