Jump to content
  • 0

how to prevent sql injection in website


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

You should have your RO hoster rename your tables and such so its not the same common stuff like ragnarok>inventory and such

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

Pneuma is correct you can also use this http://pastebin.com/P5c1suYU

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   6
  • Joined:  08/01/12
  • Last Seen:  

Try with

<?php
// Connect
$enlace = mysql_connect('db_mysql', 'user_mysql', 'pass_mysql')
   OR die(mysql_error());
// query
$consulta = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",
	    mysql_real_escape_string($usuario),
	    mysql_real_escape_string($contraseña));
?>

Maybe it works :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi TrojanWorm,

Best way to defend against this is to stop using bad PHP-based scripts/web-sites which link to your RO database. Then edit your MySQL user accounts to be locked in to specific hosts, so that they can not attempt to brute force or attempt to remotely access your MySQL server.

Re-naming the database and such, isn't going to help; since MySQL injection is based off poorly coded PHP scripts/web-sites which already designate what database/tables to access and use.

Also, check if your computer is key-logged; get Malware Detectors.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

check all your ports..change your password regularly..and inspect the code of every module that you will install to your site..and lastly never trust other people on giving access you must choose a person you really trust...

:meow:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

How do you know it's a SQL injection in your website ?...

If you know the answer, you will be able to fix it alone.

Why people still continue to believe that the only way to hack is using SQL injection ? There are so more fun and exotic way to have full or partial access to a server.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

How do you know it's a SQL injection in your website ?...

If you know the answer, you will be able to fix it alone.

Why people still continue to believe that the only way to hack is using SQL injection ? There are so more fun and exotic way to have full or partial access to a server.

agreed

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   14
  • Joined:  11/21/11
  • Last Seen:  

check

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

check your site log

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  126
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

Posted · Hidden by Brian, September 4, 2013 - 8-month old topic
Hidden by Brian, September 4, 2013 - 8-month old topic

please can anyone help me here cuz my site has been injected and the hackers add commands like @item

please help me here

Pneuma is correct you can also use this http://pastebin.com/P5c1suYU

if you using GMprotect is not safe also bcus. if some 1 attack your ragnarok using SQL injector . . .

not only a GM lvl but also the phpmyadmin he/she can delete your phpmyadmin ragnarok files :D

very safe to do don't trust any people sending web code to aply your server :)

only cant delete is your trunk :)

Link to comment

  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Posted · Hidden by Brian, September 4, 2013 - 8-month old topic
Hidden by Brian, September 4, 2013 - 8-month old topic

Mybe you can try to ask your hoster to check regulary you ended coding like php,js, or some error..
Btw you can try sql your site alone...
WIth the toll the are free on google.com...
 

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...