diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..ceb4004a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:bullseye-slim + +RUN apt update -qq && apt upgrade -y && apt install -y wget tar libglib2.0-0 && \ + wget https://github.com/horsicq/DIE-engine/releases/download/3.01/die_lin64_portable_3.01.tar.gz && \ + tar -xzf die_lin64_portable_3.01.tar.gz + +# db update +RUN rm -rf /die_lin64_portable/base/db +COPY ./db /die_lin64_portable/base/db + +ENTRYPOINT ["/die_lin64_portable/diec.sh"] diff --git a/README.md b/README.md index 6f5ac37d9..d48d573bd 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,30 @@ Changelog: https://github.com/horsicq/Detect-It-Easy/blob/master/changelog.txt ![alt text](https://github.com/horsicq/Detect-It-Easy/blob/master/mascots/die.jpg "Mascot") + +Run with Docker +======= + +You can also run DIE with [Docker](https://www.docker.com/community-edition)! Of course, this requires that you have git and Docker installed. + +Here's how to use DIE with Docker: + +```bash +git clone https://github.com/horsicq/Detect-It-Easy +cd Detect-It-Easy/ +docker build . -t horsicq:diec +docker/diec.sh ~/example/infected.exe + +filetype: PE32 +arch: I386 +mode: 32 +endianess: LE +type: GUI + protector: Themida/Winlicense(2.X)[-] + linker: Turbo Linker(2.25*,Delphi)[GUI32] +``` + + How to build on Linux ======= diff --git a/docker/diec.sh b/docker/diec.sh new file mode 100755 index 000000000..105e9ad53 --- /dev/null +++ b/docker/diec.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# This will simply take the argument passed to it, +# parse the directory and bind it as a read-only mount point on the container +# and pass in the filename as the argument to diec.sh +# This assumes file target is last argument! + +# Build with: +# docker build . -t horsicq:diec + +TARGET="${@: -1}" # last argument is target file +INPUT_DIR=$(cd $(dirname "$TARGET") && pwd -P) +INPUT_FILE=$(basename $TARGET) + + +if [ "$#" -eq 0 ]; then + docker run -i horsicq:diec +elif [ "$#" -eq 1 ]; then + docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE"; +else + docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE" "${@:1:$#-1}"; +fi