mvt/Dockerfile

81 lines
3.1 KiB
Docker
Raw Permalink Normal View History

FROM ubuntu:22.04
# Ref. https://github.com/mvt-project/mvt
2021-08-19 21:26:00 +00:00
LABEL url="https://mvt.re"
LABEL vcs-url="https://github.com/mvt-project/mvt"
LABEL description="MVT is a forensic tool to look for signs of infection in smartphone devices."
ENV PIP_NO_CACHE_DIR=1
ENV DEBIAN_FRONTEND=noninteractive
2021-08-19 21:26:00 +00:00
# Fixing major OS dependencies
# ----------------------------
RUN apt update \
&& apt install -y python3 python3-pip libusb-1.0-0-dev wget unzip default-jre-headless adb \
# Install build tools for libimobiledevice
# ----------------------------------------
2021-08-19 21:26:00 +00:00
build-essential \
checkinstall \
git \
autoconf \
automake \
libtool-bin \
libplist-dev \
libusbmuxd-dev \
libssl-dev \
sqlite3 \
pkg-config \
# Clean up
# --------
2021-08-19 21:26:00 +00:00
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt
# Build libimobiledevice
# ----------------------
2021-08-19 21:26:00 +00:00
RUN git clone https://github.com/libimobiledevice/libplist \
&& git clone https://github.com/libimobiledevice/libimobiledevice-glue \
2021-08-19 21:26:00 +00:00
&& git clone https://github.com/libimobiledevice/libusbmuxd \
&& git clone https://github.com/libimobiledevice/libimobiledevice \
&& git clone https://github.com/libimobiledevice/usbmuxd \
&& cd libplist && ./autogen.sh && make && make install && ldconfig \
&& cd ../libimobiledevice-glue && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh --prefix=/usr && make && make install && ldconfig \
2021-08-19 21:26:00 +00:00
&& cd ../libusbmuxd && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh && make && make install && ldconfig \
2021-08-19 21:26:00 +00:00
&& cd ../libimobiledevice && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh --enable-debug && make && make install && ldconfig \
2021-08-19 21:26:00 +00:00
&& cd ../usbmuxd && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --runstatedir=/run && make && make install \
2021-08-19 21:26:00 +00:00
# Clean up.
&& cd .. && rm -rf libplist libimobiledevice-glue libusbmuxd libimobiledevice usbmuxd
# Installing MVT
# --------------
RUN pip3 install git+https://github.com/mvt-project/mvt.git@main
# Installing ABE
# --------------
2021-08-19 21:26:00 +00:00
RUN mkdir /opt/abe \
&& wget https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar -O /opt/abe/abe.jar \
# Create alias for abe
2021-08-19 21:26:00 +00:00
&& echo 'alias abe="java -jar /opt/abe/abe.jar"' >> ~/.bashrc
2021-08-21 15:43:41 +00:00
# Generate adb key folder
# ------------------------------
RUN mkdir /root/.android && adb keygen /root/.android/adbkey
2021-08-21 15:43:41 +00:00
# Setup investigations environment
# --------------------------------
RUN mkdir /home/cases
WORKDIR /home/cases
2021-08-19 21:26:00 +00:00
RUN echo 'echo "Mobile Verification Toolkit @ Docker\n------------------------------------\n\nYou can find information about how to use this image for Android (https://github.com/mvt-project/mvt/tree/master/docs/android) and iOS (https://github.com/mvt-project/mvt/tree/master/docs/ios) in the official docs of the project.\n"' >> ~/.bashrc \
&& echo 'echo "Note that to perform the debug via USB you might need to give the Docker image access to the USB using \"docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb mvt\" or, preferably, the \"--device=\" parameter.\n"' >> ~/.bashrc
CMD /bin/bash