diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 65b326f7..00000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore everything, the dockerfile always pulls from https://github.com/mvt-project/mvt.git@main -* diff --git a/Dockerfile b/Dockerfile index faa1c0fa..3f42c192 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,6 +110,7 @@ LABEL org.opencontainers.image.documentation="https://docs.mvt.re" LABEL org.opencontainers.image.source="https://github.com/mvt-project/mvt" LABEL org.opencontainers.image.title="Mobile Verification Toolkit" LABEL org.opencontainers.image.description="MVT is a forensic tool to look for signs of infection in smartphone devices." +LABEL org.opencontainers.image.licenses="MVT License 1.1" LABEL org.opencontainers.image.base.name=docker.io/library/ubuntu:22.04 # Install runtime dependencies @@ -130,20 +131,25 @@ COPY --from=build-libusbmuxd /build / COPY --from=build-libimobiledevice /build / COPY --from=build-usbmuxd /build / -# Install mvt +# Install mvt using the locally checked out source +COPY . mvt/ RUN apt-get update \ - && apt-get install -y git python3-pip \ - && PIP_NO_CACHE_DIR=1 pip3 install git+https://github.com/mvt-project/mvt.git@main \ - && apt-get remove -y python3-pip git && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* + && apt-get install -y git python3-pip \ + && PIP_NO_CACHE_DIR=1 pip3 install --upgrade pip \ + && PIP_NO_CACHE_DIR=1 pip3 install ./mvt \ + && apt-get remove -y python3-pip git && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf mvt # Installing ABE -ADD https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar /opt/abe/abe.jar +ADD --checksum=sha256:a20e07f8b2ea47620aff0267f230c3f1f495f097081fd709eec51cf2a2e11632 \ + https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar /opt/abe/abe.jar # Create alias for abe RUN echo 'alias abe="java -jar /opt/abe/abe.jar"' >> ~/.bashrc # Generate adb key folder -RUN mkdir /root/.android && adb keygen /root/.android/adbkey +RUN echo 'if [ ! -f /root/.android/adbkey ]; then adb keygen /root/.android/adbkey 2&>1 > /dev/null; fi' >> ~/.bashrc +RUN mkdir /root/.android # Setup investigations environment RUN mkdir /home/cases diff --git a/Dockerfile.android b/Dockerfile.android index be441677..6056e456 100644 --- a/Dockerfile.android +++ b/Dockerfile.android @@ -6,6 +6,7 @@ LABEL org.opencontainers.image.documentation="https://docs.mvt.re" LABEL org.opencontainers.image.source="https://github.com/mvt-project/mvt" LABEL org.opencontainers.image.title="Mobile Verification Toolkit (Android)" LABEL org.opencontainers.image.description="MVT is a forensic tool to look for signs of infection in smartphone devices." +LABEL org.opencontainers.image.licenses="MVT License 1.1" LABEL org.opencontainers.image.base.name=docker.io/library/python:3.10.14-alpine3.20 # Install runtime dependencies @@ -17,16 +18,19 @@ RUN apk add --no-cache \ sqlite # Install mvt -RUN apk add --no-cache git \ - && PIP_NO_CACHE_DIR=1 pip3 install git+https://github.com/mvt-project/mvt.git@main \ - && apk del git +COPY ./ mvt +RUN apk add --no-cache --virtual .build-deps gcc musl-dev \ + && PIP_NO_CACHE_DIR=1 pip3 install ./mvt \ + && apk del .build-deps gcc musl-dev && rm -rf ./mvt # Installing ABE -ADD https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar /opt/abe/abe.jar +ADD --checksum=sha256:a20e07f8b2ea47620aff0267f230c3f1f495f097081fd709eec51cf2a2e11632 \ + https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar /opt/abe/abe.jar # Create alias for abe RUN echo 'alias abe="java -jar /opt/abe/abe.jar"' >> ~/.bashrc # Generate adb key folder -RUN mkdir /root/.android && adb keygen /root/.android/adbkey +RUN echo 'if [ ! -f /root/.android/adbkey ]; then adb keygen /root/.android/adbkey 2&>1 > /dev/null; fi' >> ~/.bashrc +RUN mkdir /root/.android ENTRYPOINT [ "/usr/local/bin/mvt-android" ] diff --git a/Dockerfile.ios b/Dockerfile.ios index ed3ec998..d5387fb5 100644 --- a/Dockerfile.ios +++ b/Dockerfile.ios @@ -111,6 +111,7 @@ LABEL org.opencontainers.image.documentation="https://docs.mvt.re" LABEL org.opencontainers.image.source="https://github.com/mvt-project/mvt" LABEL org.opencontainers.image.title="Mobile Verification Toolkit (iOS)" LABEL org.opencontainers.image.description="MVT is a forensic tool to look for signs of infection in smartphone devices." +LABEL org.opencontainers.image.licenses="MVT License 1.1" LABEL org.opencontainers.image.base.name=docker.io/library/python:3.10.14-alpine3.20 # Install runtime dependencies @@ -127,9 +128,10 @@ COPY --from=build-libusbmuxd /build / COPY --from=build-libimobiledevice /build / COPY --from=build-usbmuxd /build / -# Install mvt -RUN apk add --no-cache git \ - && PIP_NO_CACHE_DIR=1 pip3 install git+https://github.com/mvt-project/mvt.git@main \ - && apk del git +# Install mvt using the locally checked out source +COPY ./ mvt +RUN apk add --no-cache --virtual .build-deps git gcc musl-dev \ + && PIP_NO_CACHE_DIR=1 pip3 install ./mvt \ + && apk del .build-deps git gcc musl-dev && rm -rf ./mvt ENTRYPOINT [ "/usr/local/bin/mvt-ios" ] diff --git a/docs/docker.md b/docs/docker.md index ca98185e..be8631ce 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -2,7 +2,22 @@ Using Docker simplifies having all the required dependencies and tools (includin Install Docker following the [official documentation](https://docs.docker.com/get-docker/). -Once installed, you can clone MVT's repository and build its Docker image: +Once Docker is installed, you can run MVT by downloading a prebuilt MVT Docker image, or by building a Docker image yourself from the MVT source repo. + +### Using the prebuilt Docker image + +```bash +docker pull ghcr.io/mvt-project/mvt +``` + +You can then run the Docker container with: + +``` +docker run -it ghcr.io/mvt-project/mvt +``` + + +### Build and run Docker image from source ```bash git clone https://github.com/mvt-project/mvt.git @@ -18,6 +33,9 @@ docker run -it mvt If a prompt is spawned successfully, you can close it with `exit`. + +## Docker usage with Android devices + If you wish to use MVT to test an Android device you will need to enable the container's access to the host's USB devices. You can do so by enabling the `--privileged` flag and mounting the USB bus device as a volume: ```bash diff --git a/docs/requirements.txt b/docs/requirements.txt index 74acabfa..37fb7d1e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ -mkdocs==1.2.3 -mkdocs-autorefs -mkdocs-material -mkdocs-material-extensions -mkdocstrings +mkdocs==1.6.1 +mkdocs-autorefs==1.2.0 +mkdocs-material==9.5.42 +mkdocs-material-extensions==1.3.1 +mkdocstrings==0.23.0 \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 6c410dd1..7918ec60 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,8 +7,8 @@ markdown_extensions: - attr_list - admonition - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg - pymdownx.superfences - pymdownx.inlinehilite - pymdownx.highlight: