Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfile and documentation #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM nimlang/nim

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc mingw-w64 xz-utils git

RUN nimble --accept install winim nimcrypto docopt ptr_math strenc
RUN git clone https://github.com/icyguider/Nimcrypt2.git && \
cd Nimcrypt2 && \
nim c -d=release --cc:gcc --embedsrc=on --hints=on --app=console --cpu=amd64 --out=nimcrypt nimcrypt.nim

RUN cp /Nimcrypt2/nimcrypt /nimcrypt && \
cp /Nimcrypt2/syscalls.nim / && \
mkdir pack && cd /

CMD ["./nimcrypt"]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ amd64.windows.clang.cpp.linkerexe = "x86_64-w64-mingw32-clang++"

There is probably a better way to do this but this is what worked for me. If you have issues, just keep trying and ensure that you can run `x86_64-w64-mingw32-clang -v` and it shows "Obfuscator-LLVM" in the output. Also ensure MinGW is using the Obfuscator-LLVM library files: Nim will give you an error if not.

#### Usage with Docker

If you run into issues getting the nim toolchain to work on your system, you can build and run nymcrypt inside docker instead.

To build the docker image from a checkout of the git repository:
```
docker build -t nimcrypt .
```

To run nimcrypt inside docker on a binary called `to-pack.exe`:
```
docker run -v $PWD:/pack nimcrypt ./nimcrypt -f /pack/to-pack.exe -t pe -o /pack/packed.exe
```

Here the local directory ($PWD) is assigned the /pack/ directory in the container using a docker volume with `-v`.


#### Known Bugs:
* As [described](https://github.com/S3cur3Th1sSh1t/Nim-RunPE/blob/a117ecec635824703047c1d850607bdf2cfa628b/README.md?plain=1#L13) by ShitSecure, if the release version of mimikatz is loaded via the PE loader, it will not accept commands for some unknown reason. Using a version of mimikatz that was compiled from source fixes this issue.

Expand Down