Skip to content

Instantly share code, notes, and snippets.

@turnipsoup
Last active July 20, 2020 00:13
Show Gist options
  • Select an option

  • Save turnipsoup/aa928ec43dbd953210efac0e51ffe1c6 to your computer and use it in GitHub Desktop.

Select an option

Save turnipsoup/aa928ec43dbd953210efac0e51ffe1c6 to your computer and use it in GitHub Desktop.
Dockerfile build for generic CTF pwnable challenges.
# When you run, do it like this:
# docker run -it -v $PWD:/pwn pwnable /bin/bash
FROM ubuntu:latest
RUN mkdir /pwn
WORKDIR /pwn
# Since our install of h4ck1n6 tools involves a TZ setting...
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# So gef is happy
ENV LC_CTYPE=C.UTF-8
# Install stuff for 1337 h4ck1n6
RUN apt-get update && apt-get -y install build-essential \
gdb strace ltrace libc6 libc6-i386 curl wget netcat
# Install gef for gdb
RUN curl https://raw.githubusercontent.com/hugsy/gef/master/scripts/gef.sh | sh
CMD /bin/bash
@turnipsoup
Copy link
Copy Markdown
Author

When you run, do it like this: docker run -it -v $PWD:/pwn pwnable /bin/bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment