what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

scorchbugs.txt

scorchbugs.txt
Posted Nov 3, 2005
Authored by Luigi Auriemma | Site aluigi.altervista.org

Scorched 3D versions 39.1 and below are susceptible to various format string and buffer overflow vulnerabilities.

tags | advisory, overflow, vulnerability
SHA-256 | bc56360702fad8ca74f427a64e46ad227956f56e76088dfe8138c9b65b0d874b

scorchbugs.txt

Change Mirror Download

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

Luigi Auriemma

Application: Scorched 3D
http://www.scorched3d.co.uk
Versions: <= 39.1 (bf)
Platforms: Windows, Linux, MacOS, FreeBSD and Solaris
Bugs: A] format string and buffer-overflow in addLine and
SendString*
B] server freeze through negative numplayers
C] ComsMessageHandler buffer-overflow
D] various crashes and possible code execution in
Logger.cpp
Exploitation: remote, versus server
Date: 02 Nov 2005
Author: Luigi Auriemma
e-mail: aluigi@autistici.org
web: http://aluigi.altervista.org


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


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


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

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


Scorched 3D is a great and well known open source multiplayer game
inspired to the old classic Scorched Earth.


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

=======
2) Bugs
=======

---------------------------------------------------------------
A] format string and buffer-overflow in addLine and SendString*
---------------------------------------------------------------

The game is affected by many format string and buffer-overflow bugs
which are "mainly" located in the GLConsole::addLine, all the
ServerCommon::sendString* and ServerCommon::serverLog functions.
All these functions use vsprintf with static buffers of various lengths
(like 1024, 2048 and 10000) and some of them are called from
instructions that pass the user's input (like messages or commands and
values) directly as format argument opening the server also to format
string attacks.


--------------------------------------------
B] server freeze through negative numplayers
--------------------------------------------

Scorched 3D clients use a strange field called numplayers used for
creating a specific number of players in the server (although the
client is only one).
The problem is in the usage of a negative numplayers value which first
bypasses the (signed) check used in the code and then freezes the
server that enters in an almost endless loop located in
ServerConnectHandler.cpp:

for (unsigned int i=0; i<message.getNoPlayers(); i++)
{
addNextTank(destinationId,
ipAddress,
uniqueId.c_str(),
message.getHostDesc(),
false);
}

If the server is protected with a password the attacker must know the
right keyword.


-------------------------------------
C] ComsMessageHandler buffer-overflow
-------------------------------------

Exists a buffer-overflow in the creation of the following error
messages in ComsMessageHandler.cpp:

char buffer[1024];
sprintf(buffer, "Failed to find message type handler \"%s
\"", messageType.c_str());
and
char buffer[1024];
sprintf(buffer, "Failed to handle message type \"%s\"",
messageType.c_str());

For exploiting the bug is enough to use a command longer than the
buffer used by these instructions.


------------------------------------------------------------
D] various crashes and possible code execution in Logger.cpp
------------------------------------------------------------

When an attacker uses some long values, like a big UniqueID, the server
crashes immediately.
The problem is located in some of the functions of Logger.cpp and seems
also possible to execute remote code.
In one of the ways I have found to exploit the bug is needed to know
the keyword of the server if uses a password, but could exist other
better ways to exploit the vulnerability.


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

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


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


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

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


No fix.
No reply from the developers.


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


---
Luigi Auriemma
http://aluigi.altervista.org
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 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