forked from skysider/pwndocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
94 lines (78 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
FROM phusion/baseimage:latest
MAINTAINER skysider <[email protected]>
RUN dpkg --add-architecture i386 && \
apt-get -y update && \
apt install -y \
libc6:i386 \
libc6-dbg:i386 \
libc6-dbg \
lib32stdc++6 \
g++-multilib \
cmake \
ipython \
vim \
net-tools \
libffi-dev \
libssl-dev \
python-dev \
build-essential \
ruby2.3 \
tmux \
strace \
ltrace \
nasm \
wget \
radare2 \
gdb \
gdb-multiarch \
netcat \
socat \
git \
patchelf \
gawk \
file \
bison --fix-missing && \
rm -rf /var/lib/apt/list/*
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN python3 -m pip install -U pip && \
python3 -m pip install --no-cache-dir \
-i https://pypi.doubanio.com/simple/ \
--trusted-host pypi.doubanio.com \
ropper \
unicorn \
keystone-engine \
capstone
RUN pip install --upgrade setuptools && \
pip install --no-cache-dir \
-i https://pypi.doubanio.com/simple/ \
--trusted-host pypi.doubanio.com \
ropgadget \
pwntools \
zio \
smmap2 \
z3-solver \
apscheduler && \
pip install --upgrade pwntools
RUN gem install one_gadget && rm -rf /var/lib/gems/2.3.*/cache/*
RUN git clone https://github.com/pwndbg/pwndbg && \
cd pwndbg && chmod +x setup.sh && ./setup.sh
RUN git clone https://github.com/scwuaptx/Pwngdb.git /root/Pwngdb && \
cd /root/Pwngdb && cat /root/Pwngdb/.gdbinit >> /root/.gdbinit && \
sed -i "s?source ~/peda/peda.py?# source ~/peda/peda.py?g" /root/.gdbinit
RUN git clone https://github.com/niklasb/libc-database.git libc-database && \
cd libc-database && ./get || echo "/libc-database/" > ~/.libcdb_path
WORKDIR /ctf/work/
COPY --from=skysider/glibc_builder64:2.19 /glibc/2.19/64 /glibc/2.19/64
COPY --from=skysider/glibc_builder32:2.19 /glibc/2.19/32 /glibc/2.19/32
COPY --from=skysider/glibc_builder64:2.24 /glibc/2.24/64 /glibc/2.24/64
COPY --from=skysider/glibc_builder32:2.24 /glibc/2.24/32 /glibc/2.24/32
COPY --from=skysider/glibc_builder64:2.27 /glibc/2.27/64 /glibc/2.27/64
COPY --from=skysider/glibc_builder32:2.27 /glibc/2.27/32 /glibc/2.27/32
COPY --from=skysider/glibc_builder64:2.28 /glibc/2.28/64 /glibc/2.28/64
COPY --from=skysider/glibc_builder32:2.28 /glibc/2.28/32 /glibc/2.28/32
COPY linux_server linux_server64 /ctf/
RUN chmod a+x /ctf/linux_server /ctf/linux_server64
ENTRYPOINT ["/bin/bash"]