Jump to content
MakeWebGames

HELP! SQL-Injection Atacked!


mxyi

Recommended Posts

hello all!

recently i found a person on my game called Major561 or somthing and i caught him with 2147m (max for normal int) wich would take frigin ages to get also he had 1.5b crystals.. i deleted them and banned him but how do i stop this from happening again?! also how do i ip ban people? thanks dudes also im the only one with access to the phpmyadmin no staff actions from it in the staff panel so it must be sql injection

Link to comment
Share on other sites

Please note:

this is not a fix. it just helps you get the user auto jailed so if you are not online his / her money or crystals can not be stolen or used/transferred

 

use this till you get your site sorted out and secured then remove

add this code to your header

 


   	if($ir['money'] > 2700000000 OR $ir['crystals'] > 60000 AND $ir['userid'] != 1 AND $ir['userid'] != 2) {
	die("<table>
     	<td class='your class'> Under investigation!!!</td></table>


  	<font color='#ffffff'>You have over $2.700,000,000 in cash OR 60.000 in crystals, 
     	Your account is under investigation.Please mail Admin on [email][email protected][/email]</font>");
    	mysql_query("UPDATE users SET fedjail=1000 WHERE userid={$ir['userid']}"); 
}
Link to comment
Share on other sites

plus if i hacked would just re resister then set my money to 2699999999 ... bank it then do it again plus some games rely on large ammounts of money using bigint

but your way would help stop script kiddies, maby IP banning them would stop the re resestering or setting a session then checking for the session registration

Link to comment
Share on other sites

this is to be used for a day or 2 till site is fixed, so that you dont have to reset, ive seen games that had to reset cos the hacker giving users money - crystals or getting mugged, this usually happens when admin is fast asleep and no staff online so yes it is a good script to use to start with.

As stated in my first post

"use this till you get your site sorted out and secured then remove" so that will answer the bigint pointed out, it is not to be used as secured but as a temporary security

Link to comment
Share on other sites

  • 1 month later...
Does anyone have the sql injection so i can test my game to see? PM If you do thanks

LOL no 1 will send you an sql injection

you can ask people like eternal/crazy-t to test the site for you (just a few examples of people they may not actuly do it) but as i said no1 will send you the sql injection as you could be some newb who would go around hacking sites

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...