Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Holograph Security Patch #2

Status
Not open for further replies.
retired
Joined
Jun 17, 2008
Messages
561
Reaction score
39
Another Holo security fix brought to you by Nillus, myself and Aaron (not the otaku aaron).

Good evening habboons! You are lucky today, thanks to good ole Niggus + Aaron from ForceHotel.com, another SQL vulnerability in the emulator was detected. Well, actually ‘thanks’ to the scriptkiddies that tried to abuse it…

We were discussing the weak security of running MySQL under it’s almighty root account, and after I told him to create a limited account and disable file functions etc for it, errors showed up in the server log. A scriptkiddie was using this SQL vulnerability in an attempt to create a new database table, but was caught in the act: he failed to use it properly thus leading into errors in the server log, notifying Aaron of a SQL exploit. Congratulations, the ‘I failed at haxing’-award goes out to you.

This is a SQL vulnerability, which allows badguys to execute any SQL query that they want at your database. This includes modifying data, but, under an insecure server setup, creation of new files in the filesystem like shells etc: so they can take over your server and stuff! Bad times! How to fix?

1) Open up virtualUser.cs of the emulator sourcecode

2) Search for:

dbClient.runQuery(“UPDATE users_badges SET slotid = ‘” + slotID + “‘ WHERE userid = ‘” + this.userID + “‘ AND badgeid = ‘” + Badge + “‘ LIMIT 1″); // update slot

replace it with…

dbClient.AddParameterWithValue(“badge”, Badge);
dbClient.runQuery(“UPDATE users_badges SET slotid = ‘” + slotID + “‘ WHERE userid = ‘” + this.userID + “‘ AND badgeid = @badge LIMIT 1″); // update slot

3) Save and recompile

Woop, another SQL vulnerability patch. Provided free of charge by Pvt. Nillus, with help from ForceHotel and a noob scripter.

Another tip: don’t use MySQL’s root user for your private server: it’s not safe. Create a limited account like ‘holo_user’, and only give it access to SELECT, UPDATE, INSERT, DELETE. Then configure your emulator and CMS to use this account. This prevents them from using the file functions, incase they find a SQL exploit. Good evening boons, and stay safe.

If you haven't already, apply the other security patch, which you can find at http://forum.ragezone.com/f353/holograph-security-patch-nillus-656280/
 
Last edited by a moderator:
Joined
Jun 25, 2009
Messages
831
Reaction score
475
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Cheers for this, will use it.

-EDIT-

Andrew i'm using the emu you released and edited, and i cannot find this bit to replace, does this mean you possibly may have done it?
 
Last edited:
retired
Joined
Jun 17, 2008
Messages
561
Reaction score
39
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

tell Mir and Alec they can't use Bob anymore ;)
 
Newbie Spellweaver
Joined
Feb 9, 2007
Messages
19
Reaction score
6
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

To be honest, if you don't use params on the main areas in the source, this kind of injection can be used anywhere. These patches are only focused on the areas that are known to be used for exploiting.

I guess Jordan was right when he tipped me off to do that. I better start doing it again, this time paying closer attention to make sure I don't mess it up again.

Also, to prevent anyone from tampering with your MUS connections, you're going to want to set your MUS port to only work locally as well as changing the headers so nobody can re-create them if they are ever successful. I've noticed some script kiddies from holoscripter are using that to exploit several hotels minus what Mir was doing with the SQL exploits.
 
Last edited:
Experienced Elementalist
Joined
Sep 16, 2009
Messages
271
Reaction score
11
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

it's a nice emu good job Andrew,Nillus and aaron.
 
Junior Spellweaver
Joined
May 14, 2007
Messages
192
Reaction score
10
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Solved my issue.. ty XD
 
Last edited:
retired
Joined
Jun 17, 2008
Messages
561
Reaction score
39
I found this some time ago ;)

but anyone can help me?

Error 1 'Ion.Storage.DatabaseClient' does not contain a definition for 'AddParameterWithValue' and no extension method 'AddParameterWithValue' accepting a first argument of type 'Ion.Storage.DatabaseClient' could be found (are you missing a using directive or an assembly reference?)

thanks

your version of Holograph must be ancient.

@Jincos, care to share to your patches?
 
Junior Spellweaver
Joined
May 14, 2007
Messages
192
Reaction score
10
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Solved my issue.. ty XD
 
Last edited:
Junior Spellweaver
Joined
Mar 24, 2009
Messages
111
Reaction score
8
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

How do I fix that error

Error 2 'Ion.Storage.DatabaseClient' does not contain a definition for 'AddParameterWithValue' and no extension method 'AddParameterWithValue' accepting a first argument of type 'Ion.Storage.DatabaseClient' could be found (are you missing a using directive or an assembly reference?)
 
Junior Spellweaver
Joined
May 14, 2007
Messages
192
Reaction score
10
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Habbie, contact me in pm with your msn ^^
 
Junior Spellweaver
Joined
Mar 24, 2009
Messages
111
Reaction score
8
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

I sended a PM too you
 
Newbie Spellweaver
Joined
May 27, 2006
Messages
28
Reaction score
0
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Habbie we got the same server but you need add it in DatabaseClient :p

´Niels
 
Junior Spellweaver
Joined
Mar 3, 2008
Messages
147
Reaction score
13
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Thanks! :)
 
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

Thanks again Andrew. Good release. :)

By the way, to those of you who can't get this working, and get build errors, simply change the part that says "AddParameterWithValue" to "AddParamWithValue" (minus the quotes) and it should successfully recompile.
 
Last edited:
Junior Spellweaver
Joined
Nov 29, 2007
Messages
186
Reaction score
7
Re: Holograph Security Patch #2 [NILLUS+FORCE HOTEL]

nice patch fix
 
Newbie Spellweaver
Joined
Dec 19, 2007
Messages
79
Reaction score
7
Im have been testing this fix with 3 different servers. Everytime the badges doesnt work. Can anyone help me?
 
Junior Spellweaver
Joined
May 14, 2009
Messages
130
Reaction score
23
Im have been testing this fix with 3 different servers. Everytime the badges doesnt work. Can anyone help me?

I have the same problem. I removed the patch until someone figures out how to fix it.
 
Status
Not open for further replies.
Back
Top