Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions basic_setup.sh
Original file line number Diff line number Diff line change
@@ -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
40 changes: 30 additions & 10 deletions ctf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
51 changes: 51 additions & 0 deletions ctf/sources.list
Original file line number Diff line number Diff line change
@@ -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