-
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
add dockerized tube for better pwning #1628
Comments
If you need docker, I recommend installing Pwntools inside the container,
perhaps sharing a directory through a mount.
There’s no easy way to attach to a dockerized process within the container,
so gdb.attach will never be able to work this way (AFAIK).
On Fri, Jul 3, 2020 at 11:38 PM 오호균 ***@***.***> wrote:
When pwning(especially heap challenges), I sometimes want to make docker
environment, put all challenge files, and execute and debug with pwntools
enabled.
Maybe this process can be automated by adding process-like tube (I called
it dockerized)
from pwn import *
context.log_level = 'debug'
if __name__ == "__main__":
p = dockerized('./realloc', baseimage='ubuntu:18.04', prefer_dockerfile=False)
gdb.attach(p)
p.interactive()
I made similar feature in
https://github.com/ohk990102/pwntools-addon-dockerized, and hope this can
be added in pwntools too.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1628>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3IGB32MDAGERHMOQRF43RZ2W5HANCNFSM4OQHIB4A>
.
--
*Zach Riggle*
|
I thought that by this feature, we do not need to make any new Docker script and just write exploit scripts like we do in normal pwning or in qemu usermode. And also gdb attach can be solved by opening gdbserver and connecting to it. |
I would love to see a pull request that shows this, it would be awesome!
I might not know docker enough to make this happen myself.
On Sat, Jul 4, 2020 at 10:19 AM 오호균 ***@***.***> wrote:
I thought that by this feature, we do not need to make any new Docker
script and just write exploit scripts like we do in normal pwning or in
qemu usermode. And also gdb attach can be solved by opening gdbserver and
connecting to it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1628 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3IGE2QJQVGEPG5U6DDRDRZ5B6LANCNFSM4OQHIB4A>
.
--
*Zach Riggle*
|
I'll try, but as I don't know much about And on second thought, making from pwn import *
r = dockerized(baseimage='ubuntu:18.04', prefer_dockerfile=False)
p = r.process('./sample')
p.interactive() |
I think the best way for this to work is to have Doing it in a more Docker-y way has a few outstanding questions...
I think the best bet for this is to just have This lets us leverage all of the existing SSH infrastructure. |
To be more specific, I'm planning to make tube like this.
#As given in baseimage arg
FROM ubuntu:18.04
COPY ./ ./
# Install gdbserver when debugging options specified.
CMD [ '/bin/sh' ]
For the questions,
I agree with the point that using I'll make a pull request when these functions are implemented. Maybe you can merge it when all the functions work correctly and finds it useful. |
Any updates on this? I'd love to see your pull request |
I'm working on this, but facing some problems.
The code is on https://github.com/ohk990102/pwntools. |
When pwning(especially heap challenges), I sometimes want to make docker environment, put all challenge files, execute and debug with pwntools enabled.
Maybe this process can be automated by adding process-like tube (I called it
dockerized
)I made similar feature in https://github.com/ohk990102/pwntools-addon-dockerized, and hope this can be added in pwntools too.
The text was updated successfully, but these errors were encountered: