-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gef
39 lines (33 loc) · 1.34 KB
/
Dockerfile.gef
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
FROM ubuntu:xenial
LABEL maintainer "https://github.com/blacktop"
ENV TERM screen-256color
ENV GDB_VERSION 7.11.1-0ubuntu1~16.5
RUN buildDeps='ca-certificates git build-essential wget cmake pkg-config python3-pip' \
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -yq $buildDeps \
sudo \
ltrace \
strace \
python3 \
binutils \
libc6:i386 \
libstdc++6:i386 \
gdb=$GDB_VERSION \
gdb-multiarch=$GDB_VERSION \
&& export PIP_NO_CACHE_DIR=off \
&& export PIP_DISABLE_PIP_VERSION_CHECK=on \
&& pip3 install --upgrade pip wheel \
&& pip3 install capstone unicorn keystone-engine ropper retdec-python\
&& echo "===> Adding gef user..." \
&& useradd -ms /bin/bash gef \
&& echo "===> Install GEF..." \
&& wget --progress=bar:force -O /home/gef/.gdbinit-gef.py https://github.com/hugsy/gef/raw/master/gef.py \
&& chmod o+r /home/gef/.gdbinit-gef.py \
&& echo "===> Clean up unnecessary files..." \
&& apt-get purge -y --auto-remove $buildDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/*
USER gef
RUN echo "source /home/gef/.gdbinit-gef.py" > /home/gef/.gdbinit
ENTRYPOINT ["bash"]