exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

la-gamespy.txt

la-gamespy.txt
Posted Dec 12, 2004
Authored by Luigi Auriemma | Site aluigi.altervista.org

Gamespy cd-key validation SDK toolkit suffers from an in-game buffer overflow vulnerability.

tags | advisory, overflow
SHA-256 | 77bedf1aa6487dec667bf59d02065c3be1789f19425ad5beefa3652de81af41a

la-gamespy.txt

Change Mirror Download

#######################################################################

Luigi Auriemma

Application: Gamespy cd-key validation SDK
http://www.gamespy.net
Versions: before 20 November 2004
Games: due to the implementation of this SDK is hard to test and
list all the vulnerable games, however the following is
the official list of games that use the various Gamespy
SDKs (so not only the cd-key SDK):
http://www.gamespy.net/partners/
While the following is a partial list, maintained by me,
of the games that use the cd-key validation SDK:
http://aluigi.altervista.org/papers/gshlist.txt
Platforms: any platform supported
Bug: buffer-overflow
Exploitation: remote, versus server (in-game)
Date: 10 December 2004
Author: Luigi Auriemma
e-mail: aluigi@autistici.org
web: http://aluigi.altervista.org


#######################################################################


1) Introduction
2) Bug
3) The Code
4) Fix


#######################################################################

===============
1) Introduction
===============


The Gamespy cd-key validation SDK is a toolkit developed by Gamespy
(http://www.gamespy.net) and used by many games to handle the
verification of the cd-keys online.


#######################################################################

======
2) Bug
======


Before explaining the bug is important to specify that this is an
in-game bug so the attacker needs to have access to the vulnerable
server and, in this specific case, also to know the game's protocol or
to use a debugger to exploit the vulnerability, and furthermore it
depends by how the developers have implemented the Gamespy SDK in their
games.

In fact the problem is a buffer-overflow caused by a too long response
string sent by the client to the server, so a game is not vulnerable
"only" if its developers have inserted a limitation in the length of
the string received from the client (but I doubt that someone did it).

When the server receives the client's string it calls the sprintf()
function to build the query for the cd-key validation:

query_length = sprintf(
query,
"\\auth\\\\pid\\%d\\ch\\%s\\resp\\%s\\ip\\%d\\skey\\%d",
pid, // product ID of the game
ch, // server challenge
resp, // client response <-- the cause of the bug!
ip, // client IP address
skey); // number to track the query

An explanation of the authentication method used by the Gamespy cd-key
validation SDK is available here:
http://aluigi.altervista.org/papers/gskey-auth.txt

The buffer-overflow happens just during this instruction and then the
query is encoded using the classical XOR operation with the word
"gamespy" to be sent to the Gamespy master server.


#######################################################################

===========
3) The Code
===========


I have written a proof-of-concept only for the game Gore because its
protocol is enough simple:

http://aluigi.altervista.org/poc/goregsbof.zip

For other games an idea is the usage of a debugger on the client for
the interception of the client string just generated that must be
substituited with a bigger one and then is needed to force the game to
use the entire big string since usually are used only the normal 73
bytes.


#######################################################################

======
4) Fix
======


The bug has been fixed the 19 November 2004, so the developers of the
vulnerable games have had a lot of time for checking their games and
patching them if needed.


#######################################################################


---
Luigi Auriemma
http://aluigi.altervista.org

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close