nimprotect
NimProtect is a tiny single-macro library for protecting sensitive strings in compiled binaries
Summary
| Latest Version | 0.2.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-08-04 05:09 |
Tags
Authors
- Itay Migdal
Installation
nimble install nimprotect
choosenim install nimprotect
git clone https://github.com/itaymigdal/NimProtect
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| nimprotect | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.4.8 | No |
| RC4 | - | No |
Source
| Repository | https://github.com/itaymigdal/NimProtect |
|---|---|
| Homepage | https://github.com/itaymigdal/NimProtect |
| Registry Source | nimble_official |
README
NimProtect
NimProtect is a tiny macro library for protecting sensitive strings in compiled binaries.
I built it in order to fullfill the need for compile-time string encryptor that will decrypt the strings at runtime whenever needed, just as the great but abandoned nim-strenc did.
Every string is RC4 encrypted with different MD5 key (quick disclaimer: remember that RC4 is insecure algorithm and all strings can be decrypted with some reverse engineering work).
Compile with: --benchmarkVM:on
Update:
Added splitString() macro to split and hide big suspicious strings (takes LONG to compile!)
Installation
nimble install NimProtect
Usage
import nimprotect
let c2_url = protectString("https://protected-c2-server.com")
let malicious_base64_shellcode_blob = protectString(splitString("H4sIAAAAAAAACuy9eXgUxdYw3hMyEBCYY...")) # Takes long to compile, be patient