.NET Framework 4.7.2+ · dnlib 3.6.0 · MIT License**
Hisn packs your .NET app into encrypted resource chunks, embeds a tiny runtime (Hisn.Runtime.dll), loads it from memory at run time, and calls your Startup method—so you don’t ship extra files with the protected app.
- Resource packing: split payload into chunks, AES-CBC encrypt, add HMAC integrity tags, write a manifest (
HISN|v1|<nonce>). - In-memory load: embed
Hisn.Runtime.dllas a resource and load it viaAssemblyResolve. - Auto startup: patch
<Module>..cctorto invokeHisn.Runtime.Bootstrapper.Startup. - method trapping: replace method bodies with a safe
throwto deter quick inspection. - Modular design: clear separation of packer, loader embedding, runtime, and crypto helpers.
- .NET Framework 4.7.2+
- dnlib 3.6.0
Hisn.Runtime.dllavailable at protect-time (it is embedded as a resource)
Build hisn.main.manifest + encrypted chunk resources hisn.main.cXX.
Embed Hisn.Runtime.dll as a resource (e.g., "RT").
Patch ..cctor to install the resolver and call Bootstrapper.Startup.
ResourcePacker → creates the manifest and AES/HMAC chunks and embeds them as resources.
DllEmbedHooker → embeds Hisn.Runtime.dll and injects a call in ..cctor.
EmbeddedResolver → handles AppDomain.AssemblyResolve, loads the embedded runtime from memory, and calls Startup.
Hisn.Runtime → parses the manifest, verifies/decrypts chunks, assembles the payload, and loads/executes it from memory.
Change secrets/keys (e.g., default MasterKey, "BuildSecret-CHANGE-ME").
Rename resource IDs (manifest/chunk prefixes, embedded DLL resource name).
Adjust startup: update startupType/startupMethod if your bootstrap signature differs.
Use Anti-Dump