Skip to content

Instantly share code, notes, and snippets.

@murx-
Created December 4, 2020 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save murx-/55bdc90a55979d5958b6cb4dc3fa88f4 to your computer and use it in GitHub Desktop.
Save murx-/55bdc90a55979d5958b6cb4dc3fa88f4 to your computer and use it in GitHub Desktop.
rtaint dockerfile
FROM ubuntu:bionic
RUN apt-get update
RUN apt-get install -y git wget gcc build-essential automake python
RUN mkdir /code
# build, install valgrind
RUN wget -O /code/valgrind.tar.bz2 https://sourceware.org/pub/valgrind/valgrind-3.16.0.tar.bz2
RUN cd /code && \
tar jxf /code/valgrind.tar.bz2 && \
mv valgrind-3.16.0 valgrind
RUN cd /code/valgrind && \
./autogen.sh && \
./configure --prefix=`pwd`/build && \
make && \
make install
# clone taintgrind
RUN cd /code/valgrind && \
git clone https://github.com/wmkhoo/taintgrind
# build capstone
RUN cd /code/valgrind/taintgrind && \
wget https://github.com/aquynh/capstone/archive/3.0.4.tar.gz -O capstone.tar.gz && \
tar xf capstone.tar.gz && \
sh configure_capstone.sh `pwd`/../build && \
cd capstone-3.0.4 && \
sh make_capstone.sh
# build taintgrind
RUN cd /code/valgrind/taintgrind && \
../autogen.sh && \
./configure --prefix=`pwd`/../build && \
make && \
make install && \
make check
RUN apt-get update && apt-get install -y wget git make automake gcc python python3 python3-pip
RUN pip3 install setuptools
WORKDIR /code
RUN git clone https://github.com/Cycura/rtaint.git
WORKDIR /code/rtaint
RUN python3 setup.py install
# dispatch via entrypoint script
# recommend mapping the /pwd volume, probably like (for ELF file):
#
# docker run -it --rm -v $(pwd):/pwd taintgrind /pwd/someexe
VOLUME /pwd
WORKDIR /code/valgrind/taintgrind
RUN chmod +x /code/valgrind/taintgrind/entrypoint.sh
#ENTRYPOINT ["/code/valgrind/taintgrind/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment