-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
97 lines (85 loc) · 2.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM ubuntu:latest
MAINTAINER Frank Spierings
# Base setup
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt install -y -o APT::Immediate-Configure=0 libstdc++6:i386 \
&& apt install -f \
&& rm -rf /var/lib/apt/lists/*
# Locales setup
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" \
&& apt-get install -y \
locales \
tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Convenience setup
RUN apt-get update \
&& apt-get install -y \
bsdmainutils \
ltrace \
python3 \
python3-pip \
qemu \
strace \
tmux \
vim \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install --upgrade ipython
# GDB setup
RUN apt-get update \
&& apt-get install -y \
gdbserver \
gdb-multiarch \
&& rm -rf /var/lib/apt/lists/*
# Pwndbg
RUN apt-get update \
&& apt-get install -y \
git \
sudo \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --upgrade ropper \
&& DSTDIR=/opt \
&& cd ${DSTDIR} \
&& git clone https://github.com/pwndbg/pwndbg \
&& cd pwndbg && ./setup.sh
# Peda (default disabled)
RUN DSTDIR=/opt \
&& cd ${DSTDIR} \
&& git clone https://github.com/longld/peda.git ${DSTDIR}/peda \
&& echo "# source ${DSTDIR}/peda/peda.py" >> ~/.gdbinit
# Gef (default disabled)
RUN apt-get update \
&& apt-get install -y \
cmake \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --upgrade keystone-engine \
&& DSTDIR=/opt \
&& mkdir -p ${DSTDIR}/gef \
&& wget -O "${DSTDIR}/gef/gdbinit-gef.py" -q "https://github.com/hugsy/gef/raw/master/gef.py" \
&& echo "# source ${DSTDIR}/gef/gdbinit-gef.py" >> ~/.gdbinit
# Pwntools
RUN apt-get update \
&& apt-get install -y \
build-essential \
git \
libffi-dev \
libssl-dev \
python3 \
python3-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install --upgrade pwntools
# Angr for symbolic execution
RUN python3 -m pip install --upgrade angr
###
### Build this file: `docker build -t pwntools .`
### Run (iTerm2): `docker run -it -v /tmp/data:/tmp/data --privileged --name pwntools --hostname pwntools pwntools tmux -CC`
###