fix: replace placeholder Warden RSA modulus with real Blizzard key

Replace the incorrectly extracted RSA-2048 modulus (which contained
the exponent bytes embedded inside it) with the verified Blizzard
public key used across all pre-Cataclysm clients (1.12.1, 2.4.3,
3.3.5a).

Key confirmed against two independent sources:
- namreeb/WardenSigning ClientKey.hpp (72 verified sniffed modules)
- SkullSecurity wiki Warden_Modules documentation

The modulus starts with 0x6BCE F52D... and ends with ...03F4 AFC7.
Exponent remains 65537 (0x010001).

Verification algorithm: SHA1(module_data + "MAIEV.MOD"), 0xBB-padded
to 256 bytes, RSA verify-recover with raw (no-padding) mode.

Signature failures are non-fatal (log warning, continue loading) so
private-server modules signed with custom keys still work. This is
necessary because servers like ChromieCraft/AzerothCore may use their
own signing keys.

Also update warden_module.hpp status: all implementation items now .
This commit is contained in:
Kelsi 2026-03-30 22:50:47 -07:00
parent 88d047d2fb
commit 32bb0becc8
2 changed files with 30 additions and 33 deletions

View file

@ -39,17 +39,17 @@ struct WardenFuncList {
* IMPLEMENTATION STATUS: * IMPLEMENTATION STATUS:
* Module metadata parsing and validation * Module metadata parsing and validation
* RC4 decryption (WardenCrypto) * RC4 decryption (WardenCrypto)
* RSA-2048 signature verification (OpenSSL EVP placeholder modulus) * RSA-2048 signature verification (OpenSSL EVP real Blizzard modulus)
* zlib decompression * zlib decompression
* Custom executable format parsing (3 pair-format variants) * Custom executable format parsing (3 pair-format variants)
* Address relocation (delta-encoded fixups) * Address relocation (delta-encoded fixups)
* x86 emulation via Unicorn Engine (cross-platform) * x86 emulation via Unicorn Engine (cross-platform)
* Client callbacks (sendPacket, validateModule, generateRC4) * Client callbacks (sendPacket, validateModule, generateRC4)
* API binding / IAT patching (stub module imports not yet resolved) * API binding / IAT patching (parses import table, auto-stubs unknown APIs)
* RSA modulus needs verification against real WoW.exe build * RSA modulus verified (Blizzard key, same across 1.12.1/2.4.3/3.3.5a)
* *
* For strict servers, the API binding stub may cause module init to fail. * Non-fatal verification: RSA mismatch logs warning but continues loading,
* For permissive servers, fake responses in WardenHandler work. * so private-server modules signed with custom keys still work.
*/ */
class WardenModule { class WardenModule {
public: public:

View file

@ -87,12 +87,10 @@ bool WardenModule::load(const std::vector<uint8_t>& moduleData,
// Step 3: Verify RSA signature // Step 3: Verify RSA signature
if (!verifyRSASignature(decryptedData_)) { if (!verifyRSASignature(decryptedData_)) {
// Expected with placeholder modulus — verification is skipped gracefully // Signature mismatch is non-fatal — private-server modules use a different key.
} }
// Step 4: Strip RSA-2048 signature (last 256 bytes = 2048 bits) then zlib decompress. // Step 4: Strip RSA-2048 signature (last 256 bytes = 2048 bits) then zlib decompress.
// Blizzard signs each Warden module to prevent tampering; we strip it since we
// use a placeholder RSA modulus and can't verify the signature.
static constexpr size_t kRsaSignatureSize = 256; static constexpr size_t kRsaSignatureSize = 256;
std::vector<uint8_t> dataWithoutSig; std::vector<uint8_t> dataWithoutSig;
if (decryptedData_.size() > kRsaSignatureSize) { if (decryptedData_.size() > kRsaSignatureSize) {
@ -345,30 +343,30 @@ bool WardenModule::verifyRSASignature(const std::vector<uint8_t>& data) {
// Extract data without signature // Extract data without signature
std::vector<uint8_t> dataWithoutSig(data.begin(), data.end() - 256); std::vector<uint8_t> dataWithoutSig(data.begin(), data.end() - 256);
// Hardcoded WoW 3.3.5a Warden RSA public key // Hardcoded WoW Warden RSA public key (same across 1.12.1, 2.4.3, 3.3.5a)
// Exponent: 0x010001 (65537) // Exponent: 0x010001 (65537)
const uint32_t exponent = 0x010001; const uint32_t exponent = 0x010001;
// Modulus (256 bytes) - Extracted from WoW 3.3.5a (build 12340) client // Modulus (256 bytes) — RSA-2048 public key used by the WoW client to verify
// Extracted from Wow.exe at offset 0x005e3a03 (.rdata section) // Warden module signatures. Confirmed against namreeb/WardenSigning ClientKey.hpp
// This is the actual RSA-2048 public key modulus used by Warden // and SkullSecurity wiki (Warden_Modules page).
const uint8_t modulus[256] = { const uint8_t modulus[256] = {
0x51, 0xAD, 0x57, 0x75, 0x16, 0x92, 0x0A, 0x0E, 0xEB, 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x0D, 0x6F, 0x70, 0x9E, 0x34, 0xA6, 0xC7, 0x31, 0xBE, 0x56,
0x00, 0x12, 0x93, 0xF8, 0x5B, 0x83, 0xED, 0x52, 0x77, 0x4E, 0x38, 0x08, 0x16, 0x23, 0x10, 0x85, 0xDE, 0xDD, 0x02, 0x92, 0xF8, 0xA0, 0x58, 0x0B, 0xFC, 0xFA, 0xBA, 0x49, 0xB4, 0x48, 0xDB, 0xEC,
0x4C, 0x0B, 0xA9, 0x8C, 0x9C, 0x40, 0x4C, 0xAF, 0x6E, 0xA7, 0x89, 0x02, 0xC5, 0x06, 0x96, 0x99, 0x25, 0xF3, 0x18, 0x8F, 0x2D, 0xB3, 0xC0, 0xB8, 0xDD, 0xBC, 0xD6, 0xAA, 0xA6, 0xDB, 0x6F, 0x7D,
0x41, 0xD4, 0x31, 0x03, 0x4A, 0xA9, 0x2B, 0x17, 0x52, 0xDD, 0x5C, 0x4E, 0x5F, 0x16, 0xC3, 0x81, 0x7D, 0x25, 0xA6, 0xCD, 0x39, 0x6D, 0xDA, 0x76, 0x0C, 0x79, 0xBF, 0x48, 0x25, 0xFC, 0x2D, 0xC5,
0x0F, 0x2E, 0xE2, 0x17, 0x45, 0x2B, 0x7B, 0x65, 0x7A, 0xA3, 0x18, 0x87, 0xC2, 0xB2, 0xF5, 0xCD 0xFA, 0x53, 0x9B, 0x4D, 0x60, 0xF4, 0xEF, 0xC7, 0xEA, 0xAC, 0xA1, 0x7B, 0x03, 0xF4, 0xAF, 0xC7
}; };
// Compute expected hash: SHA1(data_without_sig + "MAIEV.MOD") // Compute expected hash: SHA1(data_without_sig + "MAIEV.MOD")
@ -439,12 +437,11 @@ bool WardenModule::verifyRSASignature(const std::vector<uint8_t>& data) {
} }
} }
LOG_WARNING("WardenModule: RSA signature verification skipped (placeholder modulus)"); LOG_WARNING("WardenModule: RSA signature mismatch — module may be corrupt or from a different build");
LOG_WARNING("WardenModule: Extract real modulus from WoW.exe for actual verification");
// For development, return true to proceed (since we don't have real modulus) // With the real modulus in place, signature failure means the module is invalid.
// TODO: Set to false once real modulus is extracted // Return true anyway so private-server modules (signed with a different key) still load.
return true; // TEMPORARY - change to false for production return true;
} }
bool WardenModule::decompressZlib(const std::vector<uint8_t>& compressed, bool WardenModule::decompressZlib(const std::vector<uint8_t>& compressed,