-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile_base
executable file
·157 lines (149 loc) · 3.86 KB
/
Dockerfile_base
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
#
# This Dockerfile for ProphetFuzz-experiments uses Ubuntu 20.04 and
# installs LLVM 12 for afl-clang-lto support.
#
From ubuntu:20.04
# Install required dependencies
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
build-essential \
python3-dev \
python3-pip \
python3-setuptools \
automake \
cmake \
git \
flex \
bison \
libglib2.0-dev \
libpixman-1-dev \
cargo \
libgtk-3-dev \
linux-headers-$(uname -r) \
vim \
wget \
curl \
gnupg \
autoconf \
libtool \
screen \
jq \
asciidoctor \
lsb-release \
xvfb \
libpcap-dev
# Install clang-12
RUN echo deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs) main >> /etc/apt/sources.list
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-get update && apt-get upgrade -y
RUN apt install -y \
clang-12 \
clang-tools-12 \
libc++1-12 \
libc++-12-dev \
libc++abi1-12 \
libc++abi-12-dev \
libclang1-12 \
libclang-12-dev \
libclang-common-12-dev \
libclang-cpp12 \
libclang-cpp12-dev \
liblld-12 \
liblld-12-dev \
liblldb-12 \
liblldb-12-dev \
libllvm12 \
lld-12 \
lldb-12 \
llvm-12 \
llvm-12-dev \
llvm-12-runtime \
llvm-12-tools
RUN apt install -y \
gcc-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-plugin-dev \
libstdc++-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-dev
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 100 && \
update-alternatives --install /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-12 100 && \
update-alternatives --install /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-12 100 && \
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-12 100 && \
update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-12 100 && \
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-12 100
# Install netmap, which has stringent requirements for the system and kernel version, and is prone to errors.
RUN git clone https://github.com/luigirizzo/netmap
RUN cd netmap; git reset --hard d67a604e805b67efb563ea8d5eb2d1318acf6ed8; cd LINUX; ./configure; make -j; make install
# Prepare ProphetFuzz
WORKDIR /root/
## ProphetFuzz
RUN mkdir ProphetFuzz
WORKDIR /root/ProphetFuzz
COPY ./ /root/ProphetFuzz
RUN cd fuzzer; make clean all
# Prepare afl++ for afl-cmin and afl-showmap (not yet ported)
RUN mkdir /root/fuzzer
WORKDIR /root/fuzzer
RUN git clone https://github.com/AFLplusplus/AFLplusplus afl++; cd afl++; git reset --hard 2d640558a09b03e9416b5d87e98cf938b38def9e; make clean all
# Prepare third-party libraries and command-line tools for file generation
RUN pip install opencv-python \
Pillow \
scapy \
lxml \
numpy \
wave \
pydub \
fpdf \
cryptography \
reportlab \
pyreadstat \
pandas \
matplotlib \
datetime \
PyPDF2 \
moviepy \
pyelftools \
pyshark \
pypcap \
piexif \
cairosvg \
pytest-shutil \
tinytag \
pycryptodomex \
pathlib \
dpkt \
Crypto \
pycryptodome \
pyopenssl \
pyasn1 \
savReaderWriter \
asn1tools \
asn1
RUN DEBIAN_FRONTEND=noninteractive apt -y install ffmpeg \
lrzip \
gcc \
iputils-ping \
tcpdump \
binutils \
gpac \
speex \
imagemagick \
tshark \
wireshark-common \
sudo \
netcat \
nasm \
exiv2 \
libsixel-bin \
lrzip \
lame \
binutils-arm-linux-gnueabi \
vorbis-tools \
opus-tools \
sox \
openssl \
xxd \
libtiff-tools \
netpbm \
yara
RUN ln -s /usr/bin/ffmpeg /usr/bin/avconv
### Finished
WORKDIR /root/ProphetFuzz