-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.full-afl2.52b
80 lines (66 loc) · 1.51 KB
/
Dockerfile.full-afl2.52b
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
FROM ubuntu:16.04
ARG DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list
RUN apt-get update && apt-get upgrade -y
RUN apt-get build-dep -y qemu
# FirmAFL Deps
RUN apt-get install -y \
automake \
binutils-dev \
bison \
flex \
git \
libboost-all-dev \
libtool \
locales
# Firmadyne Deps
RUN apt-get install -y \
busybox-static \
ca-certificates \
fakeroot \
dmsetup \
kpartx \
netcat-openbsd \
nmap \
python-psycopg2 \
python-pip \
python3-pip \
python3-psycopg2 \
snmp \
sudo \
uml-utilities \
util-linux \
vlan \
postgresql \
wget \
qemu-system-arm \
qemu-system-mips \
qemu-system-x86 \
qemu-utils \
unzip \
python-lzma \
multipath-tools
# Create firmafl user
#RUN useradd -m firmafl
#RUN echo "firmafl:firmafl" | chpasswd && adduser firmafl sudo
#
#USER firmafl
RUN locale-gen en_US.UTF-8
ENV FIRMAFL_COMMIT=1cb62a3e418622a84b2ca6fdeaa5086ab41006cb
ENV FIRMAFL_MODE=full
ENV PGPASSWORD=firmadyne
ENV USER=root
WORKDIR /workspaces/firmafl-repro
COPY build.sh .
RUN ./build.sh
# Patches for "fair" mode using same AFL version
COPY triforceafl_for_afl_2.52b.diff .
RUN git clone https://github.com/Fuzzers-Archive/afl-2.52b.git
RUN cd afl-2.52b && \
git apply ../triforceafl_for_afl_2.52b.diff && \
make && \
cp ./afl-fuzz ../FirmAFL/FirmAFL_config/afl-fuzz-full
COPY extract_one.sh .
COPY run_experiment.sh .
COPY start_full.sh .
ENTRYPOINT /bin/bash