
SDK di protezione software C++20 a singolo header con virtualizzazione del codice tramite VM polimorfica, offuscamento MBA e delle stringhe a tempo di compilazione, oltre 25 primitive crittografiche, anti-debug/anti-dump e licenza basata su HWID.
aegis_protection.hpp)SDK single-header C++20 per virtualizzazione del codice, offuscamento, crittografia e anti-tamper
SDK di protezione software single-header C++20 a dipendenze zero di livello industriale (oltre 10.145 righe di codice in un singolo file .hpp): macchina virtuale ibrida stack-register con bytecode polimorfico, compilatore da script in stile C a V-ISA, oltre 25 primitive crittografiche, offuscamento a tempo di compilazione, anti-debugging, watchdog di integrità della memoria a runtime, VFS cifrato e licenza vincolata all'hardware.
Nessuna dipendenza esterna, script di build complessi o confusione — rigorosamente l'SDK single-header e la sua suite di test di verifica:
├── aegis_protection.hpp # Single-header C++20 SDK (10,145 LOC, 67 integrated subsystems)
├── test_all_in_one.cpp # Complete verification suite (20 test suites + 12 crypto KAT checks)
└── README.md # Bilingual documentation & developer manual (EN / RU)
Includi aegis_protection.hpp direttamente nel tuo progetto C++20:
#include "aegis_protection.hpp"
cl /std:c++20 /EHsc /W4 /O2 test_all_in_one.cpp /Fe:test_all_in_one.exe
.\test_all_in_one.exe
clang++ -std=c++20 -O2 -Wall -Wextra test_all_in_one.cpp -o test_all_in_one
./test_all_in_one
flowchart LR
A["Source Logic / Script"] --> B["AegisScript / BytecodeBuilder"]
B --> C["IR Obfuscation Passes<br/>(Constant Blinding, MBA, Junk)"]
C --> D["Polymorphic Opcode Map<br/>(Compile-Time Shuffle)"]
D --> E["Rolling-Key Cipher<br/>+ BytecodeEnvelope"]
E --> F["Aegis Virtual Machine<br/>(MBA Dispatch + Ephemeral Wipe)"]
G["IntegrityWatchdog + VEH Guard"] --> F
| Categoria | Namespace | Classi chiave e funzionalità |
|---|---|---|
| Virtualizzazione del codice (VM) | aegis::vm | VirtualMachine, BytecodeBuilder, BytecodeChunk, VMContext, NativeBridge, PolymorphicOpcodeMap (permutazione di 256 opcode Fisher-Yates a tempo di compilazione), V-ISA esteso (OP_BSWAP, OP_POPCNT, OP_VMEMCPY, OP_VMEMSET, OP_REKEY, OP_JUNK) |
| Compilatore VM e toolchain | aegis::vm::* | AegisScriptCompiler (compila script in stile C in bytecode V-ISA), VmTextAssembler (assembler testuale con etichette), BytecodeDisassembler (+ costruttore CFG), BytecodeDecompiler (solleva il bytecode a pseudocodice C), BytecodeObfuscationPipeline, SsaLifter (SSA + allocatore Linear Scan), BytecodeAbstractInterpreter, VMProfiler, VMDebugger |
| Offuscamento a tempo di compilazione | aegis::obf | Mba (Mixed Boolean Arithmetic), AEGIS_STR / AEGIS_STR_OBJ (cifratura di stringhe constexpr con azzeramento automatico dello stack), AEGIS_INT / ObfuscatedInt, predicati Opaque, FlatteningMachine (Control Flow Flattening), EncryptedDispatchTable |
| Cifrari simmetrici e AEAD | aegis::crypto | Aes256 (ECB/CBC/CTR + PKCS#7), ChaCha20, ChaCha20Poly1305 (AEAD RFC 8439), XChaCha20 (nonce a 192 bit), Salsa20, Camellia256 (RFC 3713), Serpent256 (SPN a 32 round), Threefish512 (72 round), Blowfish, Rc6_256, Speck128, Simon128, Sm4, XTea |
| Hash crittografici e KDF | aegis::crypto | Sha256 (FIPS 180-4 + HMAC), Sha512 / Sha384 (+ HMAC), Keccak1600 (sha3_256, sha3_512, shake256), Blake2b, Blake2s, Ascon320 (NIST SP 800-232), Sm3, Poly1305, SipHash24, KdfEngine (pbkdf2_hmac_sha256, hkdf_extract/expand, memory_hard_derive), ChaCha20Drbg (CSPRNG + UUIDv4) |
| Chiave pubblica, condivisione di segreti ed ECC | aegis::crypto / aegis::math | X25519 (ECDH Curve25519 RFC 7748), Uint256 (mod_add, mod_mul, mod_pow), ShamirSecretSharing (soglia $(K, N)$ in $GF(2^8)$), SelfHealingBuffer (Hamming SEC-DED + recupero tramite parità XOR in RAM), MerkleTree (prove di inclusione), WhiteBoxByteNetwork |
| Anti-debug e difesa della memoria | aegis::anti / aegis::veh / aegis::watchdog / aegis::syscall | AntiDebug (PEB, NtGlobalFlag, Dr0–Dr7, RDTSC, ThreadHideFromDebugger, ProcessDebugPort), AntiVm (vendor hypervisor via CPUID, MAC, registro), EmulatorDetector (fedeltà del payload NaN IEEE-754), AntiDump (erase_pe_headers), IntegrityScanner, CodePatchGuard, ApiResolver (AEGIS_API senza IAT), SyscallResolver (estrazione SSN da ntdll.dll e rilevamento hook), VehGuard (ripulitore di breakpoint hardware), IntegrityWatchdog (thread di monitoraggio in background) |
| Licenze, VFS e watermarking | aegis::license / aegis::archive / aegis::watermark | LicenseManager (chiavi AEGIS-XXXX-... con binding HWID e ChaCha20-Poly1305), AegisVfsArchive (filesystem virtuale cifrato con compressione LZSS), BytecodeWatermarker (watermark steganografici per cliente), HardwareId (TPM 2.0 EKPub + CPUID), PeImageAnalyzer, UniversalBinaryInspector (PE/ELF64/Mach-O), SecurePacketChannel, EncryptedRingLogger, JsonParser |
aegis_protection.hpp è al 100% header-only. Su Windows, le librerie di sistema richieste (ncrypt.lib, crypt32.lib, advapi32.lib, psapi.lib, iphlpapi.lib) vengono collegate automaticamente tramite #pragma comment(lib, ...).
Visual Studio (.vcxproj):
aegis_protection.hpp nella directory del tuo progetto.ISO C++20 Standard (/std:c++20).#include "aegis_protection.hpp" al tuo file .cpp.CMake (CMakeLists.txt):
cmake_minimum_required(VERSION 3.20)
project(ProtectedApp LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(ProtectedApp main.cpp aegis_protection.hpp)