Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
NimSyscallPacker — Packs C# assemblies, PE files, or shellcode into encrypted Nim binaries with advanced evasion features including AMSI/ETW bypass, sandbox detection, and multiple injection techniques for red team operations. | Kitploit
Tools/GitHubGitHub/s3cur3th1ssh1t/nimsyscallpacker
Privilege EscalationPayload GenerationPersistence MechanismsExploitationLateral MovementShellcodePost-ExploitationPenetration TestingRed Teaming

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Binary Exploitation
GitHubs3cur3th1ssh1t/nimsyscallpacker

NimSyscallPacker

Packs C# assemblies, PE files, or shellcode into encrypted Nim binaries with advanced evasion features including AMSI/ETW bypass, sandbox detection, and multiple injection techniques for red team operations.

View Repository
20733791 month agoReviewed by Kitploit

NimSyscallPacker / Loader

This tool was made public after a talk at x33fcon. It was my private main coding project from 2021 - 2024 and is now considered deprecated and is not maintained anymore. Dont expect bug fixes or feature updates here from my side. Instead, RustPack is maintained now as a commercial and controlled version for vetted Red Teams and Pentesters which is even more feature rich but also much more OPSec save.

This Packer can be used to pack any C# Assembly, PE-File or Shellcode into a Nim binary. It will encrypt the target payload, build the corresponding Nim source code according to the given arguments and compiles it to an Nim binary.

Setup

A Video - if you prefer that - can be found here: https://youtu.be/0PwIn3Nxmgo

Windows

Git needs to be installed for Nim/Nimble to work properly.

Tested with Nim 2.2.10 and the MinGW-w64 GCC 11.1.0 bundle linked from the Nim Windows download page. Newer Nim releases default to a high PE image base on Windows, which breaks -static links with relocation truncated to fit: R_X86_64_32S against .bss; the packer now forces -Wl,--image-base=0x10000 to keep static builds working, so any MinGW-w64 11.x build should be fine. Only x64 is supported here — x86/--x86/--wow64 is not maintained.

  1. Download Nim and MinGW (x86_64):

    • nim-2.2.10_x64.zip
    • mingw64.7z (linked from the Nim Windows install page)
  2. Extract Nim with 7-Zip (not Windows' built-in Expand-Archive — it silently drops lib\system.nim because of the case-collision with the lib\system\ directory). The Nim zip ships bin\7zG.exe which you can use to extract MinGW.

  3. Add <nim>\bin and <mingw64>\bin to your %PATH%. Logoff/logon (or restart your shell) for the change to take effect.

  4. Install nimble dependencies:

    nimble install [email protected] docopt ptr_math winim https://github.com/S3cur3Th1sSh1t/nim-strenc/
    

    Versions known to work (as of Nim 2.2.10): nimcrypto 0.6.0, docopt 0.7.1, ptr_math 0.3.0, winim 3.9.4, nim-strenc (HEAD — the repo has no tagged releases).

  5. Disable Windows Defender Sample Submission (the Packer refuses to run otherwise):

    Set-MpPreference -SubmitSamplesConsent 2
    
  6. Compile the Packer:

    nim c NimSyscallLoader.nim
    

If you want to use the LLVM obfuscator on Windows, use the embedded modified denim version from denim. Install it via denim\denim.exe setup.

Linux

E.g. on Kali / Debian. The packer historically required nim 1.6.8 + mingw-64 8.0.0-1; with the static-link --image-base=0x10000 workaround now baked in, newer toolchains should work too. The Windows build is what's actively tested — Linux is best-effort.

apt-get install nim mingw-w64
nimble install [email protected] docopt ptr_math winim https://github.com/S3cur3Th1sSh1t/nim-strenc/

If --hellsgate fails to assemble on a newer mingw-w64, downgrade to mingw-64=8.0.0-1.

Install donut via pip3 install donut-shellcode. denim cannot be used from Unix so obfuscation via LLVM is not possible here. Same for Callobfuscator.

Compile the Packer via nim c -d:noRES NimSyscallLoader.nim. Ready to go. If you don't use -d:noRES you might get the following error:

/username/.nimble/pkgs/winim-3.7.1/winim/lib/winim64.res:(.rsrc+0x48): dangerous relocation: collect2: fatal error: ld terminated with signal 11 [Speicherzugriffsfehler]
compilation terminated.

Docker Setup

Needs to be built once (takes some time the first time, subsequent builds will be cached).

sudo docker build . -t nimsyscallloader

Then run the packer with:

sudo docker run -v $(pwd):/shared nimsyscallloader <ARGUMENTS> --output=/shared/packed.exe where $(pwd) is the directory on the host system that is shared with the container, i.e. the directory where the files to encrypt should be and where the output will be saved to.

Third party deps

If you want to make use of Code Signing certificates via LimeLighter you'll also need the following things installed and in your %PATH%: openssl - (for Windows) for example from here osslsigncode - for example from here

Third party tool support

I will not give Support for issues in the third party tools which are used here. So please open up an issue in the corresponsing repositories if you're facing problems with them. Third party tools in use:

  • Donut
  • Denim
  • LimeLighter
  • Callobfuscator
  • NimlineWhispers3
  • Koppeling

You can either use my precompiled binaries or of course compile them your own from the above links.

Usage

A Video - if you prefer that - can be found here: https://youtu.be/UHaIgdzqHDA

I also added short videos for some features as this was requested:

Caro-Kann:

https://youtu.be/etAFZrIyb44

ThreadlessInject Feature:

https://youtu.be/eRS-4AywrHI

Module Stomping Feature:

https://youtu.be/l-TmqqQ49UI

shellcodeURL Feature:

https://youtu.be/OYxcL4D7K0c

stegoFile Feature:

https://youtu.be/Vr58_R4rYDA

shellcodeFile Feature:

https://youtu.be/Oj55uilxEF4

Ruy Lopez for local processes

https://youtu.be/8fBkRo1zlIM

Shellcode output format

https://youtu.be/ZTiZA2fg3WM

Assembly output feature

https://youtu.be/TDEJ-U18UIk

And I made a public Video showcasing how to customize ThreadlessInject technique to other processes than the default one:

https://youtu.be/BYuAUYQcI-E

NimSyscall_Loader v 2.2

Usage:
  NimSyscall_Loader [--file=file_to_encrypt --key=<key> --keyfile=<keyFile> --dnsKey --dnsdomain=<sub.example.com> --environmentalKey=<domain,username> --output=<output> --large --metadata --shellcodeFile=<shellcodeFile> --shellcodeURL=<shellcodeURL> --dll --dllexportfunc=<exportfuncname> --dllhijack --noNimMain --clone=<dllToClone> --dllProxy --cpl --xll --service --arguments=<Hardcoded_Arguments> --csharp --noAMSI --noETW --noOneShot --PatchAMSI --PatchETW --AMSIProviderPatch --AMSINtCreateSectionHook --sleep=<10> --sleep-in-between=<10> --shellcode --RWX --CallbackExecute --localCreateThread --QueueApc --noWait --COMVARETW --remoteinject --customprocess=<processname> --blockDLLs --spoofArgs=<ArgumentstoSpoof> --parentProcess=<parentName> --remoteprocess=<processnames> --remotepatchAMSI --remotepatchETW --mapSection --unhook=<dllname1,dllname2> --reflective --obfuscate --macPayload --hide --APIhide --noArgs --peinject --peload --hellsgate --syswhispers --jump --sgn --replace --self-delete --sandbox=<check1,check2> --domain=<targetdomain> --pump=<words,size> --obfuscatefunctions --debug --verbose --noDInvoke --x86 --wow64 --llvm --sign --signdomain=<exampledomain> --noAntidebug --noDefaultSandBox --noAntiEmulate --sleepycrypt --fluctuate --interactivePS --psout --psobfs --pslyrics --csout --scout --sourceonly --jmpEntry --jmpEntryDLL=<example.dll> --jmpEntryFunc=<exampleFunc> --dripallocate --dripsleep=<sleeptime-ms> --stegofile=<filepath> --ruy-lopez --threadless --threadlessDll=<dllname.dll> --threadlessFunc=<dllfunc> --poolparty=<number> --Caro-Kann --Caro-Kann-Thread --stomb --stombDll=<dllname.dll> --stombFunc=<dllfunc> --stombFunc2=<dllfunc2> --restore]
  NimSyscall_Loader (-h | --help)
  NimSyscall_Loader --version

Options:

[general]
Download Tool