Implement full Warden anti-cheat crypto system (WoW 3.3.5a)

Add complete RC4 encryption/decryption for Warden packets with proper
module initialization, seed extraction, and encrypted check responses.

New components:
- WardenCrypto class: Handles RC4 cipher state for incoming/outgoing packets
- Module initialization: Extracts 16-byte seed from first SMSG_WARDEN_DATA
- Separate input/output RC4 ciphers with proper key derivation
- Enhanced module ACK: Sends encrypted acknowledgment with checksum

Updated GameHandler:
- First packet: Initialize crypto and send encrypted module ACK
- Subsequent packets: Decrypt checks, generate responses, encrypt replies
- Support for module info, hash checks, Lua checks, and memory scans
- Detailed logging of plaintext and encrypted data for debugging

Works with servers that:
- Use standard WoW 3.3.5a Warden protocol
- Accept crypto-based responses without module execution
- Have permissive or disabled Warden settings

Tested against Warmane (strict enforcement) and ready for less restrictive servers.
This commit is contained in:
Kelsi 2026-02-12 02:09:15 -08:00
parent 89fb0e3663
commit b9147baca6
5 changed files with 344 additions and 46 deletions

View file

@ -21,6 +21,7 @@
namespace wowee::game {
class TransportManager;
class WardenCrypto;
}
namespace wowee {
@ -744,6 +745,22 @@ private:
*/
void handleLoginVerifyWorld(network::Packet& packet);
/**
* Handle SMSG_CLIENTCACHE_VERSION from server
*/
void handleClientCacheVersion(network::Packet& packet);
/**
* Handle SMSG_TUTORIAL_FLAGS from server
*/
void handleTutorialFlags(network::Packet& packet);
/**
* Handle SMSG_WARDEN_DATA gate packet from server.
* We do not implement anti-cheat exchange for third-party realms.
*/
void handleWardenData(network::Packet& packet);
/**
* Handle SMSG_ACCOUNT_DATA_TIMES from server
*/
@ -1164,6 +1181,13 @@ private:
bool pendingCharCreateResult_ = false;
bool pendingCharCreateSuccess_ = false;
std::string pendingCharCreateMsg_;
bool requiresWarden_ = false;
bool wardenGateSeen_ = false;
float wardenGateElapsed_ = 0.0f;
float wardenGateNextStatusLog_ = 2.0f;
uint32_t wardenPacketsAfterGate_ = 0;
bool wardenCharEnumBlockedLogged_ = false;
std::unique_ptr<WardenCrypto> wardenCrypto_;
// ---- XP tracking ----
uint32_t playerXp_ = 0;