how mysql database tables empty by hacking

Discussion in 'MySQL' started by intime.work, Mar 11, 2011.

  1. #1
    i have a problem that after some days my database tables are empty by hacking or may b any other way.

    i want to know any body know how it possible. and how i prevent from this hacking.
     
    intime.work, Mar 11, 2011 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Check if your application is not doing so. Is it happening on regular intervals?
     
    mwasif, Mar 11, 2011 IP
  3. NemoX

    NemoX Active Member

    Messages:
    116
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Do you run Vbulletin ?
    If yes then it's most probably a hacker .
     
    NemoX, Mar 11, 2011 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There are many possible ways of tables being emptied form poor programming, hacking the website, hacking the database, people working out passwords to database or webserver admin through to SQL injection.

    Need to investigate the cause before you can plug the hole
     
    AstarothSolutions, Mar 11, 2011 IP
  5. carleisenstein

    carleisenstein Peon

    Messages:
    253
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    SQL Injection sounds likely. I'd do the following:

    1) Make sure that the server running MySQL is as locked down as possible. The only computer in the world that should be able to access port 3305 is the one running your website. Be sure you've not got other ports open unnecessarily. You probably just need 25 for SSL to your various admin locations, and 3305 to your web server.
    2) Make sure you're not running anything like phpMyAdmin on your webserver, or that if you are, it's locked down correctly too, with as much authentication as possible (at the very least .htaccess authentication, but ideally this would be limited by IP address).
    3) Check your entire web scripts to make sure that it properly cleanses data coming in from anywhere using something like mysql_escape_string before passing it to MySQL.
    4) Change all passwords throughout your setup - your admin and SSL passwords on your web server and MySQL server, your MySQL user passwords, your FTP/SFTP passwords etc.
     
    carleisenstein, Mar 13, 2011 IP