diff --git a/basic_setup.sh b/basic_setup.sh new file mode 100644 index 0000000..9704d8a --- /dev/null +++ b/basic_setup.sh @@ -0,0 +1,8 @@ +apt-get upgrade -y +apt-get install vim gdb git -y +git clone https://github.com/pwndbg/pwndbg +cd pwndbg +./setup.sh +cd .. +apt-get install rubygems -y +gem install one_gadget diff --git a/ctf/Dockerfile b/ctf/Dockerfile index f9f7809..3da1766 100644 --- a/ctf/Dockerfile +++ b/ctf/Dockerfile @@ -8,14 +8,34 @@ FROM ubuntu:19.10 ENV LC_CTYPE C.UTF-8 ENV DEBIAN_FRONTEND=noninteractive -RUN 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 && \ +RUN dpkg --add-architecture i386 + +# Configure apt-get with ubuntu archive repo +RUN rm /etc/apt/sources.list +COPY sources.list /etc/apt/ +RUN apt-get update + +# install sudo command (needed by pwndbg setup script :/) +RUN apt-get install -y sudo + +# Install basic tools and dependencies via apt-get +RUN apt-get install -y build-essential nmap ncat 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 make libreadline-dev libgc-dev gettext libjson-c-dev libtool flex bison pkg-config texinfo autopoint help2man gawk pwgen socat + +# Install basic pwning tools via pipy +RUN pip install capstone requests pwntools r2pipe +RUN pip3 install pwntools keystone-engine unicorn capstone ropper + +# Install pwndbg +RUN git clone https://github.com/pwndbg/pwndbg +RUN cd pwndbg && git checkout stable && ./setup.sh + +# Install radare2 and ROPgadget into dedicated tools directory +RUN 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 && git checkout stable && ./setup.sh && \ -cd .. && git clone https://github.com/niklasb/libc-database && cd libc-database && ./get && \ -gem install one_gadget +git clone https://github.com/radare/radare2 && \ +cd radare2 && \ +sys/install.sh + +# Install one_gadget +RUN gem install one_gadget diff --git a/ctf/sources.list b/ctf/sources.list new file mode 100644 index 0000000..0f1a8a7 --- /dev/null +++ b/ctf/sources.list @@ -0,0 +1,51 @@ +# deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted + +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. +deb http://old-releases.ubuntu.com/ubuntu eoan main restricted +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb http://old-releases.ubuntu.com/ubuntu eoan-updates main restricted +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb http://old-releases.ubuntu.com/ubuntu eoan universe +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan universe +deb http://old-releases.ubuntu.com/ubuntu eoan-updates universe +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +deb http://old-releases.ubuntu.com/ubuntu eoan multiverse +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan multiverse +deb http://old-releases.ubuntu.com/ubuntu eoan-updates multiverse +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan-updates multiverse + +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +deb http://old-releases.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse +# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. +## This software is not part of Ubuntu, but is offered by Canonical and the +## respective vendors as a service to Ubuntu users. +# deb http://archive.canonical.com/ubuntu eoan partner +# deb-src http://archive.canonical.com/ubuntu eoan partner + +deb http://old-releases.ubuntu.com/ubuntu eoan-security main restricted +# deb-src http://security.ubuntu.com/ubuntu eoan-security main restricted +deb http://old-releases.ubuntu.com/ubuntu eoan-security universe +# deb-src http://security.ubuntu.com/ubuntu eoan-security universe +deb http://old-releases.ubuntu.com/ubuntu eoan-security multiverse +# deb-src http://security.ubuntu.com/ubuntu eoan-security multiverse