Git Product home page Git Product logo

pwn_docker_example's Introduction

pwn_docker_example

Example pwnable CTF challenge hosted with docker. We used this code to run a challenge in a server setup with docker, and then use a docker container as a CTF OS to write and run the exploit.

Related Binary Exploitation Resources:

There is also a whole playlist using challenges from https://exploit.education. Later episodes explore some 64bit challenges and goes over various pitfalls:

More Docker Videos

pwn_docker_example's People

Contributors

jonyluke avatar liveoverflow avatar sirdarckcat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwn_docker_example's Issues

after building the ctf docker image running it results in an error

i built the docker image for ctf but on running this command

sudo docker run --rm -v $PWD:/pwd --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -d --name ctf -i ctf:ubuntu19.1

i get this error

Unable to find image 'ctf:ubuntu19.1' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/ctf/manifests/ubuntu19.1: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fctf%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.

have i done something wrong or is there an issue i with the script.

on manjaro kyria 19.0.1

CTF Container Building results in an error

Hey folks,
during the Docker Build Process, while cloning the pwndbg repository, I get an error and the build fails.

I would prefer, that the Installation of the packages (and the different Git clones) are in a seperate RUN Command than the Git clones, so in the event of an unsuccessful build, the package installation is still cached.

The error is:

Cloning into 'pwndbg'...
/bin/sh: 1: checkout: not found
The command '/bin/sh -c dpkg --add-architecture i386 && apt-get update && apt-get install -y build-essential jq strace ltrace curl wget rubygems gcc dnsutils netcat gcc-multilib net-tools vim gdb gdb-multiarch python python3 python3-pip python3-dev libssl-dev libffi-dev wget git make procps libpcre3-dev libdb-dev libxt-dev libxaw7-dev python-pip libc6:i386 libncurses5:i386 libstdc++6:i386 && pip install capstone requests pwntools r2pipe && pip3 install pwntools keystone-engine unicorn capstone ropper && mkdir tools && cd tools && git clone https://github.com/JonathanSalwan/ROPgadget && git clone https://github.com/radare/radare2 && cd radare2 && sys/install.sh && cd .. && git clone https://github.com/pwndbg/pwndbg && cd pwndbg && checkout stable && ./setup.sh && cd .. && git clone https://github.com/niklasb/libc-database && cd libc-database && ./get && gem install one_gadget' returned a non-zero code: 127

I could build it when I changed checkout stable to git checkout stable

using vscode remote to develop inside the container

Hi,
I saw your video about your ctf setup and remembered that vscode had a remote feature to connect to the windows subsystem for linux.

turns out you can do the same with docker containers. this should provide vscode with stuff like codecompletion for the installed python packages.
also you'd be able to use the integrated terminal in vscode to run your exploits in the container.

I have not tested this but it should work.
thought I'd share this to see if you're interested.

https://code.visualstudio.com/docs/remote/containers

"FROM ubuntu:19.10" does not work anymore

In the DOCKERFILE, you need to write "FROM ubuntu:latest" else it does not create the docker image stating-->
Step 2/12 : RUN apt-get update
---> Running in ee013a735874
Ign:1 http://archive.ubuntu.com/ubuntu eoan InRelease
Ign:2 http://archive.ubuntu.com/ubuntu eoan-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu eoan-backports InRelease
Ign:4 http://security.ubuntu.com/ubuntu eoan-security InRelease
Err:5 http://archive.ubuntu.com/ubuntu eoan Release
404 Not Found [IP: 91.189.88.142 80]
Err:6 http://security.ubuntu.com/ubuntu eoan-security Release
404 Not Found [IP: 91.189.91.38 80]
Err:7 http://archive.ubuntu.com/ubuntu eoan-updates Release
404 Not Found [IP: 91.189.88.142 80]
Err:8 http://archive.ubuntu.com/ubuntu eoan-backports Release
404 Not Found [IP: 91.189.88.142 80]

repository err

Docker gives error

E: The repository 'http://security.ubuntu.com/ubuntu eoan-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu eoan Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu eoan-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu eoan-backports Release' does not have a Release file.

Change this

FROM ubuntu:19.10

to

FROM ubuntu

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.