-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
117 lines (99 loc) · 2.58 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
FROM phusion/baseimage:latest
RUN dpkg --add-architecture i386 && \
apt-get -y update && \
apt-get -y upgrade
apt install -y \
build-essential \
libc6-dbg \
lib32stdc++6 \
g++-multilib \
cmake \
gcc \
ipython \
vim \
net-tools \
curl \
libffi-dev \
libssl-dev \
python-dev \
build-essential \
tmux \
glibc-source \
cmake \
strace \
ltrace \
nasm \
socat\
netcat\
wget \
radare2 \
gdb \
gdb-multiarch \
netcat \
socat \
git \
patchelf \
gawk \
file \
zsh \
qemu \
bison --fix-missing \
gcc-multilib \
binwalk \
libseccomp-dev \
libseccomp2 \
seccomp \
proxychains \
openssh-server \
lrzsz \
RUN apt-add-repository ppa:brightbox/ruby-ng && \
apt update &&\
apt install -y ruby2.6 &&\
apt install -y ruby2.6-dev
RUN ulimit -c 0
RUN gem install one_gadget
RUN gem install seccomp-tools
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 \
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
# Oh-my-zsh
RUN chsh -s /bin/zsh
RUN sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.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/TacXingXing/peda.git ~/peda && \
cp ~/peda/.inputrc ~/
RUN git clone https://github.com/niklasb/libc-database.git libc-database && \
cd libc-database && ./get || echo "/libc-database/" > ~/.libcdb_path
RUN git clone https://github.com/pwndbg/pwndbg && \
cd pwndbg && ./setup.sh
# Vim-config
RUN git clone https://github.com/Tacxingxing/vimrc && \
cd vimrc && chmod u+x install.sh && ./install.sh && cd ..
WORKDIR /ctf/
# COPY linux_server linux_server64 /ctf/
COPY zshrc /root/.zshrc
COPY tmux.conf /root/.tmux.conf
COPY gdbinit /root/.gdbinit
# RUN chmod a+x /ctf/linux_server /ctf/linux_server64
ENTRYPOINT ["/bin/zsh"]