Register | Forget Password | Login
Search :
SecurityReason

News

Search

SecurityAlert

About SecurityAlert

ExploitAlert

SecurityReason Research

WLB

WLB Database

Send to WLB

About WLB

RSS

News

SecurityAlert

World Laboratory of Bugtraq

ExploitAlert

Apache

PHP

Corporate

Contact

About us

Services

SecurePHP

Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Details : SecurityAlert

  Topic : Multiple vulnerabilities in Outgun 1.0.3 bot 2
  SecurityAlert : 898
  CVE : CVE-2006-2402
  CVE : CVE-2006-2401
  CVE : CVE-2006-2400
  CVE : CVE-2006-2399
  SecurityRisk : Medium  alert  (About)
  Remote Exploit : Yes
  Local Exploit : Yes
  Exploit Given : Yes
  Credit : Luigi Auriemma (aluigi autistici org)
  Published : 17.05.2006

  Affected Software : Outgun <= 1.0.3 bot 2



  Advisory Text :  

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

Luigi Auriemma

Application: Outgun
http://koti.mbnet.fi/outgun/
Versions: <= 1.0.3 bot 2
Platforms: Windows, *nix, *BSD and more
Bugs: A] data_file_request buffer-overflow
B] exception with big data
C] invalid memory access in messages handling
D] harmless buffer-overflow on a global variable in
changeRegistration
Exploitation: remote, versus server
Date: 12 May 2006
Author: Luigi Auriemma
e-mail: aluigi (at) autistici (dot) org [email concealed]
web: aluigi.org

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

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

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

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

Outgun is an open source 2D capture-the-flag game with multiplayer
support for LAN and Internet through a centralized master server.

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

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

--------------------------------------------
A] data_file_request command buffer-overflow
--------------------------------------------

The game supports the downloading of map files directly from the server
in which the clients want to play.
The request for the downloading of the map is composed by the command
data_file_request and two text strings for the type and name of the
requested file.
The buffers in which the server stores these two strings have a size of
64 and 256 bytes and the function readString doesn't check the length
of the destination buffer during the copying.

From src/servnet.cpp:

void ServerNetworking::incoming_client_data(int id, char *data, int length)
{
...
else if (code == data_file_request) {
char ftype[64];
char fname[256];
readString(msg, count, ftype);
readString(msg, count, fname);
...

--------------------------
B] exception with big data
--------------------------

The leetnet functions used in the game for handling the packets
automatically raise an exception (throw) if a data bigger than 512
(DATA_BUF_SIZE) bytes is received.
The effect is the immediate interruption of the game.

From src/leetnet/rudp.cpp:

class data_ci : public data_c {
public:

//allocated length, used length
int alen, ulen;

//data buffer
char buf[DATA_BUF_SIZE];

//extend buffer to fit additional len
void extend(int len) {
if (len + ulen > DATA_BUF_SIZE) {
throw 66677;
}
...

---------------------------------------------
C] invalid memory access in messages handling
---------------------------------------------

The leetnet functions support a maximum amount of 64 messages in each
incoming packet but no checks are made for avoiding the reading of the
unallocated memory after the packet if an attacker uses wrong message
sizes.

From src/leetnet/rudp.cpp:

virtual char* process_incoming_packet(int *size, bool *special) {
...
NLulong msgid;
NLshort msgsize;
for (i=0; i<nreliable; i++) { // read all reliable msgs
readLong(udp_data, count, msgid); //id
readShort(udp_data, count, msgsize); //size

//if (debug) printf("(%i,%i)", msgid, msgsize);

// station will process the incoming reliable message
process_incoming_message(msgid, (udp_data + count), msgsize);

//advance count since we didn't "readBlock"
count += msgsize;

//p->add_reliable(msgid, (udp_data + count), msgsize); //data
}
...

----------------------------------------------------------------------
D] harmless buffer-overflow on a global variable in changeRegistration
----------------------------------------------------------------------

changeRegistration is the function for handling the changing of the
registration informations of the clients.
This function uses strcpy for copying the client's token in a buffer of
64 bytes located in the global array of the clients informations.
During my tests (limited by the problem described in bug B) was not
possible to exploit this bug for crashing the server but I was only
able to modify some of the informations of the other players in the
server.

From src/servernet.cpp:

bool Server::changeRegistration(int id, const string& token) {
const int intoken = atoi(token.c_str());
if (intoken == client[id].intoken)
return false;

// v0.4.9 FIX : IF HAD previous token have/valid, then FLUSH his stats
network.client_report_status(id);

strcpy(client[id].token, token.c_str());
...

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

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

http://aluigi.org/poc/outgunx.zip

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

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

Some of the bugs will be fixed in the next "bot" release.

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

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




  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

Microsoft VISTA TCP/IP stack buffer overflow

high- 2008-11-27

Microsoft Device IO Control wrapped by the iphlpapi.dll API shipping with Windows Vista 32 bit and 64 bit contains a possibly exploitable, buffer overflow corrupting kernel memory.

Apache rss

» Apache Tomcat information
   disclosure

» Apache Tomcat <=
   6.0.18 UTF8 Directory
   Traversal Vulnerability

» Apache Tomcat information
   disclosure vulnerability

» Apache Tomcat XSS
   vulnerability

PHP rss

» PHP 5.2.6 SAPI
   php_getuid() overload

» PHP
   ZipArchive::extractTo()
   Directory Traversal
   Vulnerability

» PHP 5.2.6 dba_replace()
   destroying file

» PHP 5.2.6 (error_log)
   safe_mode bypass

Copyright © SecurityReason. All Rights Reserved.