This repository was archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (47 loc) · 1.92 KB
/
Dockerfile
File metadata and controls
49 lines (47 loc) · 1.92 KB
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
FROM debian:11 AS afl_builder
WORKDIR /opt
RUN apt-get update && apt-get --no-install-recommends -y install ca-certificates build-essential
RUN echo "LLVM Toolchain and GCC" \
&& apt-get install --no-install-recommends -y \
llvm-13 llvm-13-dev lld-13 clang-13
RUN echo "GCC dev deps" \
&& apt-get install --no-install-recommends -y \
gcc-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-plugin-dev \
libstdc++-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-dev
RUN echo "AFL++ Deps" \
&& apt-get install --no-install-recommends -y \
build-essential python3-dev automake \
cmake git flex bison libglib2.0-dev \
libpixman-1-dev python3-setuptools cargo \
libgtk-3-dev
RUN echo "Install AFL++" \
&& git clone https://github.com/AFLplusplus/AFLplusplus \
&& cd AFLplusplus \
&& export LLVM_CONFIG='llvm-config-13' \
&& make source-only
FROM debian:11 AS radamsa_builder
WORKDIR /opt
RUN apt-get update && apt-get --no-install-recommends -y install ca-certificates build-essential
RUN echo "Radamsa Deps" \
&& apt-get --no-install-recommends -y \
install wget make gcc git
RUN echo "Install Radamsa" \
&& git clone https://gitlab.com/akihe/radamsa.git \
&& cd radamsa \
&& make
FROM debian:11 AS final_stage
COPY --from=afl_builder /opt/AFLplusplus /opt/AFLplusplus
COPY --from=radamsa_builder /opt/radamsa/bin/radamsa /usr/bin/radamsa
RUN apt-get update && apt-get --no-install-recommends -y install ca-certificates build-essential \
python3-dev python3-setuptools llvm-13 llvm-13-dev lld-13 clang-13 \
libglib2.0 valgrind \
git cmake make wget curl nano python3-pip \
&& cd /opt/AFLplusplus \
&& make install \
&& rm -rf /opt/AFLplusplus \
&& ln /usr/bin/clang-13 /usr/bin/clang
RUN useradd -ms /bin/bash -G sudo -u 69 compsec \
&& mkdir -p /home/compsec/.local/bin
ENV PATH=/home/compsec/.local/bin:$PATH
USER compsec
WORKDIR /home/compsec