Nim-RunPE – A Nim Implementation Of Reflective PE-Loading From Memory

You’ll need to install the following dependencies:

nimble install ptr_math winim

If you want to pass arguments on runtime or don’t want to pass arguments at all compile via:

nim c NimRunPE.nim

If you want to hardcode custom arguments modify const exeArgs to your needs and compile with:

If you plan to load e.g. Mimikatz with this technique – make sure to compile a version from source on your own, as the release binaries don’t accept arguments after being loaded reflectively by this loader. Why? I really don’t know it’s strange but a fact. If you compile on your own it will still work: