$ show massgravel/TSforge
TSforge is a CLI utility that directly manipulates the Windows Software Protection Platform (SPP) physical store to achieve permanent activation or extended evaluation periods for Windows Vista through 11 and associated add-ons (e.g., ESU). The codebase is a well-structured C# application targeting .NET Framework 3.5, consisting of a library (LibTSforge) and a command-line entry point (TSforgeCLI). It implements multiple activation methods (KMS4k, AVMA4k, ZeroCID) and modifiers for resetting grace periods, clearing tamper flags, and installing generated product keys. The architecture involves decrypting the encrypted physical store file, parsing its block-based structure, inserting new activation data (timers, bindings, HWID blocks), re-encrypting, and writing back while managing the SPP service. The code demonstrates deep reverse engineering of Windows licensing internals, with careful handling of different store formats across OS versions. Despite targeting a deprecated .NET version and using legacy cryptographic primitives (SHA1, RSA PKCS#1 v1.5), the code remains functional for its niche purpose.
The LLM identified 2 files worth highlighting for reuse:
Implements Windows product key generation for both PKEY2005 and PKEY2009 algorithms. The class constructs product keys from internal parameters (group, serial, security, upgrade flag), handles CRC-based checksum, and generates the human-readable key string. It also derives product IDs (Pid2, Pid3, Pid4) and phone activation data. This component is self-contained (only depends on standard .NET and basic utility classes) and could be extracted to generate or validate product keys independently of the rest of the tool.
Handles the complete encryption/decryption cycle of the Windows physical store file. It verifies RSA signatures, decrypts an AES key, decrypts the data, and validates an HMAC (or salted SHA1 on Vista). The encryption path reverses this for writing. The logic is version-aware and uses production or test RSA keys. This pattern of asymmetric key exchange + symmetric encryption + integrity check is a reusable design for protected binary stores, though the specific key material and format are SPP-specific.