Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames > DarkOrbit
You last visited: Today at 15:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Security Issues in most public Private Servers

Discussion on Security Issues in most public Private Servers within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
»jD«'s Avatar
 
elite*gold: 237
Join Date: Sep 2010
Posts: 1,152
Received Thanks: 4,910
Security Issues in most public Private Servers

Greetings Mortals!

Hope you are all well this festive season

I decided to audit some "publicly" available backpage releases for security issues and was surprised by how many public servers were actually run these epic'ly flawed packages. I'd like to disclose this now before I start, I WILL NOT BE RELEASING ANY INFORMATION ABOUT THE SECURITY ISSUES OR DATA RETRIEVED EXCEPT TO THOSE WHO RUN EACH INDIVIDUAL SERVER. In case the bold red words still didn't get it across to you, leave now, or I will hurt you.

Icon8
Lets start with the Icon8 project which from some open web audits around 75% of private servers are running or based on, including LightOrbit, SkyUniverse and other big name servers.

Icon8 not only suffers from massive amounts of SQL Injection holes, but also does nothing to defend against them. Along with that there are numerous issues with the configuration it comes with and the actual GameServer itself is flawed in the fact that you can actually SQL Inject the GAME SERVER itself for information (second order attack). Need proof? Like I said I'm not disclosing any private information here nor am I going to show you how to do it, but I will point out some things so you can fix it if you wish to do so.

Lets start with the way Icon8 handles SQL Injection prevention. Some extracts from its source code show two methods of sanitization: `GetSQLValueString` and `addslashes`. Both are extremely easy to bypass with a bug in character encoding. magic_quotes_gpc is not meant for SQL sanitization either and is just as easy to bypass. This is the only protection used to sanitize EVERYTHING that comes from the user and is poor. It gets worst as there are numerous places where there is no protection at all! Take a look here:

externalSignup.php: Lines 6-12
PHP Code:
$MM_flag="MM_insert";
if (isset(
$_POST[$MM_flag])) {
  
$loginUsername $_POST['signup_username'];
  
$LoginRS__query "SELECT usuario FROM cuentas WHERE usuario='" $loginUsername "'";
  
mysql_select_db($database_DO$DO);
  
$LoginRS=mysql_query($LoginRS__query$DO) or die(mysql_error());
  
$loginFoundUser mysql_num_rows($LoginRS); 
A simple Error-based MySQL Injection could easily exploit this due to two things. First, they use a POST parameter directly in a query, and second, they `or die` the query, meaning that any error in the query will be printed plain to see by everyone when they try to signup.

Then you have Time-based SQL exploitation in SkyUniverse's "buy.php" script.

For those of you who don't believe it or need more motivation to actually fix it... here is some table schema I dumped from SkyUniverse (Sorry Requi for using you as an example):
Code:
8 tables -
+------------+
| accounts   |
| clans      |
| maps       |
| ranks      |
| servers    |
| settings   |
| ships      |
| useronline |
+------------+

accounts.csv -

id,uridium,ep,pi,hp,gfx,pos,sex,age,lvl,rank,ship,maps,mun2,city,mun1,clan,speed,cargo,hpMax,files,slot4,title,honor,shield,drones,skylab,lastIP,petlvl,config,petname,jackpot,premium,credits,configs,fraction,cargoMax,password,username,interests,bootykeys,shieldMax,inventario,cario,createdate,teihfactory,jump_voucher,ultimaConexion,repair_voucher,status_message
Like I said, I managed to dump almost 50% of their database (it glitched out after their DB died), but those details won't be published here.

More details on other backpage packages will be added here when I get the time to look over them.

Fixing this is reasonably easy to be honest. I'm not gonna teach you how to do decent sanitization of EVERYTHING, but I will show you how to do MySQL Sanitization to stop 99.99% of all SQL Injections (the rest are unknown 0days :P). For starters in Icon8, where ever you use a variable in a query, escape it with the official escaping function, not some makeshift missmatch of other PHP functions. `mysql_real_escape_string` is there for a reason! An example on how to fix the above injection?

PHP Code:
$MM_flag="MM_insert";
if (isset(
$_POST[$MM_flag])) {
  
$loginUsername mysql_real_escape_string($_POST['signup_username']);
  
$LoginRS__query "SELECT usuario FROM cuentas WHERE usuario='" $loginUsername "'";
  
mysql_select_db($database_DO$DO);
  
$LoginRS=@mysql_query($LoginRS__query$DO);
  
$loginFoundUser mysql_num_rows($LoginRS); 
This prevents against error messages giving away information on your queries AND protects against any SQL Injection in the 'signup_username' parameter. I also suggest replacing every single one of these:

PHP Code:
get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']) 
with this:

PHP Code:
mysql_real_escape_string($_SESSION['MM_Username']) 
(Obviously don't just do it for $_SESSION['MM_Username'] but do it anywhere you see get_magic_quotes_gpc and addslashes).
You can also replace every single GetSQLValueString with mysql_real_escape_string

I suggest you to change your password for any accounts where the password is the same as one you have used on any private server, you don't know who has access to it... and the fact that Icon8 uses unsalted MD5 hashes for passwords simply adds to the entire security issues.

-jD
»jD« is offline  
Thanks
28 Users
Old 12/11/2013, 08:38   #2

 
Luffa's Avatar
 
elite*gold: 61
Join Date: Oct 2010
Posts: 1,188
Received Thanks: 2,403
Thumps up jD, i hope some of the servers see this as a wake-up call to start re-doing their coding on the website of theirs.

Best Regards RQ
Luffa is offline  
Thanks
3 Users
Old 12/11/2013, 08:46   #3
 
»jD«'s Avatar
 
elite*gold: 237
Join Date: Sep 2010
Posts: 1,152
Received Thanks: 4,910
DrSkyfall, I see your thanks

Just to let you know, there were numerous other issues with LightOrbit that weren't directly related to SQL Injection... PM me if you want more details...

Also, not sure if you took your site down coz you saw me auditing it or if it legit crashed :P

-jD
»jD« is offline  
Thanks
3 Users
Old 12/11/2013, 08:56   #4
 
elite*gold: 25
Join Date: Oct 2013
Posts: 194
Received Thanks: 184
Yeah it's an automatic system when someone try to SQL injection on LightOrbit .

No just kidding, I got some problems with nice russians hackers, I just killed the webserver so, you are just unlucky xD.

Yeah I will Pm you.
I think to use POO and PDO soon ..


#Edit : Did you get access to my dedicated server with these ? I'm really mad right now, I'm anothter guy got my FTP, DB and Webserver password today. I don't know if it's about the same problem that you have saw.


DrS.
DrSkyfall is offline  
Old 12/11/2013, 09:45   #5
 
»jD«'s Avatar
 
elite*gold: 237
Join Date: Sep 2010
Posts: 1,152
Received Thanks: 4,910
Quote:
Originally Posted by DrSkyfall View Post
Yeah it's an automatic system when someone try to SQL injection on LightOrbit .

No just kidding, I got some problems with nice russians hackers, I just killed the webserver so, you are just unlucky xD.

Yeah I will Pm you.
I think to use POO and PDO soon ..


#Edit : Did you get access to my dedicated server with these ? I'm really mad right now, I'm anothter guy got my FTP, DB and Webserver password today. I don't know if it's about the same problem that you have saw.


DrS.
Don't pay him. There ask him for proof that he has them, because from what I saw, there isn't any way to exploit that.

-jD
»jD« is offline  
Old 12/11/2013, 09:53   #6
 
elite*gold: 25
Join Date: Oct 2013
Posts: 194
Received Thanks: 184
Yeah I don't, But he send me a picture with all my work, vhosts servers, emulator source, ******* crazy, , If it's not about exploit of the website, it's about the fact that my dedicated server was a Windows Emulated on Linux..

500 Euros for files who cost me less than the /2 ..
All Epvp guys will be happy to see PvpU Source thread in 7 days ...

DrS.
DrSkyfall is offline  
Thanks
1 User
Old 12/11/2013, 10:22   #7


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Was it really needed to use SU?
Well. I didn't give a look for injections yet and the buy.php shouldn't exist anymore. Thought I deleted it, because i'm going to code it on my own.

But thank you for all this

Edit: And you forgot, that SU won't use such crappy emus like icon8 and azure.
Requi is offline  
Thanks
1 User
Old 12/11/2013, 13:57   #8
 
Sήøwy's Avatar
 
elite*gold: 1
Join Date: Aug 2010
Posts: 1,330
Received Thanks: 1,724
The main important thing is the server.

The website should have also protection for sql inject. It can be easy hacked if you don't know how to use POST, REQUEST and others. You must know PHP and SQL programming to know what to do.

As i can see you are talking only about the website. I think because they use the same servers and that's why you don't talk about the server application.
Sήøwy is offline  
Thanks
3 Users
Old 12/11/2013, 14:54   #9
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
Hey thx jd I made a fix for the passwords. would you like to link it in your thread?
UND3RW0RLD is offline  
Thanks
1 User
Old 12/11/2013, 15:32   #10
 
CrazyLazyGuy's Avatar
 
elite*gold: 70
Join Date: Jun 2012
Posts: 440
Received Thanks: 126
There are tons of more work on the website part.
P.S. endless in the password encryption why do you use md5 and not sha1?
I am not saying it's wrong or that sha1 is better, I just want to know because maybe I am doing mistakes in using them . I don't argue with you, just a question ;d .
P.S2. jD why don't you use pdo or mysqli ? I prefer mysqli because pdo is a little bit hard for me but .. Again that's not an argue, just a question.
P.S3 Highly recommend to DON'T use $_REQUEST . Or don't use it if you don't know what does it do.
CrazyLazyGuy is offline  
Thanks
1 User
Old 12/11/2013, 15:38   #11
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
Quote:
Originally Posted by CrazyLazyGuy View Post
P.S. endless ... why do you use md5 and not sha1?
it's safe enough.. it's not worth the work to decrypt ^^ (in fact it's almost impossible even with good rainbow-tables..)
UND3RW0RLD is offline  
Thanks
1 User
Old 12/11/2013, 22:09   #12
 
linkpad's Avatar
 
elite*gold: 260
Join Date: Jul 2012
Posts: 299
Received Thanks: 812
Have you find any exploits on ? Just for let me know
linkpad is offline  
Old 12/11/2013, 22:31   #13
 
cryz35's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,718
Received Thanks: 2,382
Nice thread, are you going to add aurora-azure security holes? Just wonder.

I know some not important ones, may you see when you have free time?
cryz35 is offline  
Old 12/11/2013, 22:54   #14
 
»jD«'s Avatar
 
elite*gold: 237
Join Date: Sep 2010
Posts: 1,152
Received Thanks: 4,910
Quote:
Originally Posted by CrazyLazyGuy View Post
There are tons of more work on the website part.
P.S. endless in the password encryption why do you use md5 and not sha1?
I am not saying it's wrong or that sha1 is better, I just want to know because maybe I am doing mistakes in using them . I don't argue with you, just a question ;d .
P.S2. jD why don't you use pdo or mysqli ? I prefer mysqli because pdo is a little bit hard for me but .. Again that's not an argue, just a question.
P.S3 Highly recommend to DON'T use $_REQUEST . Or don't use it if you don't know what does it do.
1. You shouldn't be using MD5 or SHA1, bcrypt is industry standard these days as MD5/SHA1 can be brute force pretty quickly!
2. I do use PDO, however I was offering an easy and simple solution without having to give a tutorial on PDO.
3. Yes. $_REQUEST opens up holes in parameter substitutions :P

-jD
»jD« is offline  
Thanks
1 User
Old 12/11/2013, 23:12   #15
 
linkpad's Avatar
 
elite*gold: 260
Join Date: Jul 2012
Posts: 299
Received Thanks: 812
Quote:
Originally Posted by cryz35 View Post
Nice thread, are you going to add aurora-azure security holes? Just wonder.

I know some not important ones, may you see when you have free time?

Your website is vulnerable, I can dump every database.

Quote:
information_schema
cdcol
chatserver
mysql
newdo
Quote:
users
ships_designs
ships
servers
server_galaxygate
server_1_players_galaxygate
server_1_players
rank
online
maps
equipment
ekipman
clannews
clan
performance_schema
phpmyadmin
test
webauth
I can even access account by decrypting md5 hash...
linkpad is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
Collection Issues on Servers?
08/26/2012 - DarkOrbit - 9 Replies
Hello ive recently checked my GA2 acc and ive made within 12 hours 12k uri and 24 gg spins have DO reduced drops or somethink on X2 MAPS? As normally i would make in 12 hours 50-60k uri and 200-300 spins
Public connection issues(Am I this nooby)
02/13/2012 - Shaiya Private Server - 2 Replies
Ok I need a little help...... I have made my Server public for my team to test. Now I can connect using my public IP, however my team cannot they get "cannot connect to game server" after selecting server. I have opened Game(30800), Login(30810) ports(and port 80 jus to be sure)-checked all open I had to do loopback for me to be able to log(Fixed myself)- can log myself Checked Linked server test connection is good- all passed Double checked they have the right .exe.- they must to be...
Issues with getting my pserver public.
08/19/2011 - Shaiya Private Server - 2 Replies
Hey Guys, I used Omega's tutorial on creating a private server. All of it works perfectly, but I want to edit it so my spouse can access it too (same internet connection, different computer). This isn't going to be a public server, just one for my spouse and I to test with. I tried Hamachi, but epically failed. I read a post on port forwarding, but it was not detailed enough for me to understand. *Sorry, I'm a bit of a noob* Here is my ps_game.ini file text: ServerName=Game01



All times are GMT +1. The time now is 15:09.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.