-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
82 lines (65 loc) · 2.49 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
FROM ubuntu:tag
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/root/bin:${PATH}"
ENV LANG="en_US.UTF-8"
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN <<EOF
set -eux
apt-get update
apt-get -qqq install -y --no-install-recommends \
sudo file less zsh tmux git vim wget curl rsync htop zip unzip \
strace ltrace tree make cmake elfutils locales net-tools \
binutils g++ g++-multilib musl-tools nasm gdb patchelf \
lib32z1 libseccomp-dev \
build-essential perl openssl ruby-dev socat xinetd \
python3-dev python3-pip python-is-python3 \
glibc-source gawk bison
(apt-get -qqq install -y --no-install-recommends netcat || true)
(apt-get -qqq install -y --no-install-recommends ncat || true)
locale-gen --purge "en_US.UTF-8"
printf 'LANG="en_US.UTF-8"\nLANGUAGE="en_US:en"\n' >> /etc/default/locale
dpkg-reconfigure locales
cd /usr/src/glibc
tar xf glibc-*.tar.xz
mkdir glibc_dbg && cd glibc_dbg
../glibc-*/configure --prefix $PWD --enable-debug
make -j$(nproc) > /dev/null
make -j$(nproc) clean > /dev/null
rm -rf /var/lib/apt/lists/*
EOF
RUN <<EOF
set -eux
apt-get update
LIBS="libncurses-dev libssl-dev libffi-dev cargo ninja-build meson"
apt-get -qqq install -y --no-install-recommends $LIBS
YNETD_VERSION=v0.14
wget -qO /tmp/ynetd.zip https://github.com/rwstauner/ynetd/releases/download/$YNETD_VERSION/ynetd-linux-amd64.zip
unzip -d /usr/local/bin/ /tmp/ynetd.zip
rm -f /tmp/ynetd.zip
python -m pip install --no-cache-dir -U \
pip setuptools
python -m pip install --no-cache-dir -U \
pwntools unicorn capstone ropper keystone-engine ptrlib \
pycryptodome tqdm joblib
gem install --no-document one_gadget seccomp-tools
wget -O /opt/gdbinit-gef.py -q https://gef.blah.cat/py
cd /opt && git clone https://github.com/pwndbg/pwndbg && cd pwndbg && ./setup.sh
cd /opt && git clone https://github.com/jerdna-regeiz/splitmind
cd /opt
git clone --depth=1 https://github.com/radareorg/radare2
radare2/sys/install.sh
r2pm -U
r2pm -ci r2ghidra r2dec
python -m pip install --no-cache-dir -U r2pipe
apt-get remove -y --auto-remove $LIBS
apt-get purge --auto-remove $LIBS
apt-get clean
rm -rf /var/lib/apt/lists/*
EOF
COPY ./root/ /root/
RUN <<EOF
set -eux
echo set substitute-path ../ /usr/src/glibc/glibc-*/ | tee -a ~/.gdbinit
echo set substitute-path ./ /usr/src/glibc/glibc-*/ | tee -a ~/.gdbinit
EOF
CMD ["/usr/bin/zsh"]