forked from googleprojectzero/functionsimsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (44 loc) · 1.43 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
FROM ubuntu:xenial
RUN apt-get update
RUN apt-get install -y git wget cmake gcc build-essential
# some deps via: https://github.com/richinseattle/Dockerfiles/blob/master/afl-dyninst.Dockerfile
RUN apt-get install -y libelf-dev libelf1 libiberty-dev libboost-all-dev
RUN mkdir /code
# build, install dyninst
RUN wget -O /code/dyninst.tar.gz https://github.com/dyninst/dyninst/archive/v9.3.2.tar.gz
RUN cd /code && \
tar xf /code/dyninst.tar.gz && \
mv dyninst-9.3.2 dyninst
RUN cd /code/dyninst && \
mkdir build && \
cd build && \
cmake .. && \
make -j8 && \
make install && \
ldconfig
# build functionsimsearch
RUN cd /code && \
git clone https://github.com/google/functionsimsearch.git && \
cd functionsimsearch && \
mkdir third_party && \
cd third_party && \
git clone https://github.com/okdshin/PicoSHA2.git && \
git clone https://github.com/trailofbits/pe-parse.git && \
git clone https://github.com/PetterS/spii.git && \
cd pe-parse && \
cmake . && \
make && \
cd ../spii && \
cmake . && \
make && \
cd ../.. && \
make
# dispatch via entrypoint script
# recommend mapping the /pwd volume, probably like (for ELF file):
#
# docker run -it --rm -v $(pwd):/pwd functionsimsearch disassemble ELF /pwd/someexe
VOLUME /pwd
WORKDIR /code/functionsimsearch
ADD ./entrypoint.sh /root/entrypoint.sh
RUN chmod +x /root/entrypoint.sh
ENTRYPOINT ["/root/entrypoint.sh"]