forked from superkojiman/pwnbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
190 lines (161 loc) · 4.97 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#----------------------------------------------------------------#
# Dockerfile to build a container for binary reverse engineering #
# and exploitation. Suitable for CTFs. #
# #
# See https://github.com/superkojiman/pwnbox for details. #
# #
# To build: docker build -t superkojiman/pwnbox #
#----------------------------------------------------------------#
FROM phusion/baseimage:0.9.19
MAINTAINER [email protected]
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get -y upgrade
#-------------------------------------#
# Install packages from Ubuntu repos #
#-------------------------------------#
RUN apt-get install -y \
sudo \
build-essential \
gcc-multilib \
g++-multilib \
gdb \
gdb-multiarch \
python-dev \
python3-dev \
python-pip \
python3-pip \
ipython \
default-jdk \
net-tools \
nasm \
cmake \
rubygems \
vim \
tmux \
git \
binwalk \
strace \
ltrace \
autoconf \
socat \
netcat \
nmap \
wget \
tcpdump \
exiftool \
squashfs-tools \
unzip \
virtualenvwrapper \
upx-ucl \
man-db \
manpages-dev \
libtool-bin \
bison \
libini-config-dev \
libssl-dev \
libffi-dev \
libglib2.0-dev \
libc6:i386 \
libncurses5:i386 \
libstdc++6:i386 \
libc6-dev-i386
RUN apt-get -y autoremove
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#-------------------------------------#
# Install stuff from pip repos #
#-------------------------------------#
RUN pip install \
pycipher \
uncompyle \
ropgadget \
distorm3 \
filebytes \
r2pipe \
scapy \
python-constraint
# setup angr virtualenv
RUN bash -c 'source /etc/bash_completion.d/virtualenvwrapper && \
mkvirtualenv angr && \
pip install angr && \
deactivate'
# install pwntools 3
RUN pip install --upgrade pwntools
# install docopt for xortool
RUN pip install docopt
#-------------------------------------#
# Install stuff from GitHub repos #
#-------------------------------------#
# install capstone
RUN git clone https://github.com/aquynh/capstone.git /opt/capstone && \
cd /opt/capstone && \
./make.sh && \
./make.sh install && \
cd bindings/python && \
make install && \
make install3
RUN git clone https://gist.github.com/47e3a5ac99867e7f4e0d.git /opt/binstall && \
cd /opt/binstall && \
chmod 755 binstall.sh && \
./binstall.sh amd64 && \
./binstall.sh i386
# install radrare2
RUN git clone https://github.com/radare/radare2.git /opt/radare2 && \
cd /opt/radare2 && \
git fetch --tags && \
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && \
./sys/install.sh && \
make symstall
# install ropper
RUN git clone https://github.com/sashs/Ropper.git /opt/ropper && \
cd /opt/ropper && \
python setup.py install
RUN rm -rf /opt/ropper
# install ropeme
RUN git clone https://github.com/packz/ropeme.git /opt/ropeme && \
sed -i 's/distorm/distorm3/g' /opt/ropeme/ropeme/gadgets.py
# install rp++
RUN mkdir /opt/rp
RUN wget https://github.com/downloads/0vercl0k/rp/rp-lin-x64 -P /opt/rp
RUN wget https://github.com/downloads/0vercl0k/rp/rp-lin-x86 -P /opt/rp
# install retargetable decompiler scripts
RUN git clone https://github.com/s3rvac/retdec-sh.git /opt/retdec-sh
# install villoc
RUN git clone https://github.com/wapiflapi/villoc.git /opt/villoc
# install libformatstr
RUN git clone https://github.com/hellman/libformatstr.git /opt/libformatstr && \
cd /opt/libformatstr && \
python setup.py install
RUN rm -rf /opt/libformatstr
# install preeny
RUN git clone https://github.com/zardus/preeny.git /opt/preeny && \
cd /opt/preeny && \
make
# install xortool
RUN git clone https://github.com/hellman/xortool.git /opt/xortool && \
cd /opt/xortool && \
python setup.py install
# install tmux-resurrect
RUN git clone https://github.com/tmux-plugins/tmux-resurrect.git /opt/tmux-resurrect
# install libc-database
RUN git clone https://github.com/niklasb/libc-database /opt/libc-database
# install peda
RUN git clone https://github.com/longld/peda.git /opt/peda && \
echo "source /opt/peda/peda.py" >> ~/.gdbinit
# install gef
RUN git clone https://github.com/hugsy/gef.git /opt/gef
# install pwndbg
RUN git clone https://github.com/pwndbg/pwndbg.git /opt/pwndbg && \
cd /opt/pwndbg && \
./setup.sh
# install libseccomp
RUN git clone https://github.com/seccomp/libseccomp.git /opt/libseccomp && \
cd /opt/libseccomp && \
./autogen.sh && ./configure && make && make install
# install PinCTF
RUN git clone https://github.com/ChrisTheCoolHut/PinCTF.git /opt/PinCTF && \
cd /opt/PinCTF && \
./installPin.sh
# install one_gadget
RUN gem install one_gadget
ENTRYPOINT ["/bin/bash"]