hypelevels
Reverse-engineering notes for the Steam Connection Manager and Game Coordinator protocols, with the immediate goal of fetching CS2 player level / XP / Prime / Premier rating from the GC. The four detail notes below were produced from a top-to-bottom pass over the upstream open-source implementations (SteamKit, node-steam-user, node-globaloffensive) and the SteamDatabase protobuf mirror, with every claim anchored to a file_path:line in the local clones.
Read order
These notes are intended to be read in sequence: this landing page → Steam Protocol Overview for the synthesis → TCP Transport and Handshake / Auth v2 Login Flow / CS2 Game Coordinator for the layer-specific details, as needed.
For Agents
Source repos are checked out under
/Volumes/bandi/coding/hypelevels/:SteamKit/(C# reference),node-steam-user/(Node.js production code),node-globaloffensive/(CS2 GC client),Protobufs/(SteamDatabase mirror). Allfile_path:linecitations in these notes are absolute filesystem paths into those clones — treat them as inline code, not URLs.
Audit pass: four EMsg corrections + two unverified GC claims
An audit pass surfaced four EMsg corrections and two unverified GC claims (Prime detection mechanism, Premier
rank_type_idvalue). See Validation Report for the full audit trail.
Companion notes
- Steam Protocol Overview — layered synthesis, end-to-end byte sequence, constants quick-reference, common pitfalls.
- Validation Report — per-claim audit trail; what’s verified, what’s caveated, what’s still empirically unconfirmed.
- TCP Transport and Handshake — TCP frame, three-message handshake, AES-256-CBC bulk encryption with HMAC-SHA1 IV derivation, RSA-OAEP-SHA1 key wrap.
- Auth v2 Login Flow — Unified Messages transport,
GetPasswordRSAPublicKey→BeginAuthSessionViaCredentials→ optionalUpdateAuthSessionWithSteamGuardCode→PollAuthSessionStatus→ JWT →CMsgClientLogon. - CS2 Game Coordinator —
CMsgGCClientenvelope, mounting appid 730 viaCMsgClientGamesPlayed, the two-hello dance (ClientHello4006 /MatchmakingClient2GCHello9109), parsing the 9110 response to extractplayer_level,player_cur_xp, Prime bit, and Premier rating.
Quick reference — protocol constants
| Item | Value |
|---|---|
| TCP frame magic | "VT01" = 0x31305456 LE |
EMsg.ChannelEncryptRequest | 1303 |
EMsg.ChannelEncryptResponse | 1304 |
EMsg.ChannelEncryptResult | 1305 |
EMsg.ClientLogon | 5514 |
EMsg.ClientLogonResponse | 751 |
EMsg.ClientHeartBeat | 703 |
EMsg.ClientGamesPlayed | 742 |
EMsg.ServiceMethodCallFromClient | 151 |
EMsg.ServiceMethodCallFromClientNonAuthed | 9804 |
EMsg.ServiceMethodResponse | 147 |
EMsg.ClientToGC | 5452 |
EMsg.ClientFromGC | 5453 |
| Transport RSA padding | OAEP-SHA1, 1024-bit modulus, exponent 0x11 |
| Password RSA padding | PKCS#1 v1.5 (different layer!) |
| AES key size | 256 bits, key = sessionKey[0..32] |
| HMAC-SHA1 key | sessionKey[0..16] (first 16 bytes!) |
| IV length | 16 bytes (13 bytes HMAC ‖ 3 bytes random) |
| AES mode | CBC, PKCS7 padding |
| IV-of-IV mode | ECB, no padding |
| GC proto-mask high bit | 0x80000000 |
| CS2 appid | 730 |
k_EMsgGCClientHello | 4006 |
k_EMsgGCClientWelcome | 4004 |
k_EMsgGCCStrike15_v2_MatchmakingClient2GCHello | 9109 |
k_EMsgGCCStrike15_v2_MatchmakingGC2ClientHello | 9110 |
Prime bit in player_xp_bonus_flags | bit 4 (value 0x10) |
rank_type_id for Premier | 11 |