Forum Moderators: coopster

Message Too Old, No Replies

My website hacked again and again?

I have a website which is created in php and using...

         

Knowledge seeker

10:21 am on May 8, 2010 (gmt 0)

10+ Year Member



I have a website which is created in php and MySQL. There is admin control panel through which I uploads daily picture to my website and at the homepage latest uploaded picture display automatically when I upload any new picture.
To logging in to my control panel path is for example " www.ie.com/admin.php"
where I use the password and username to login to my website control panel. both the password and username are saved in MySQL.

Now the hacker hacked my website in such a way my homepage is change with there logo or there index page, none of other things are deleted from the my ftp including MySQL database and other directory.
And whenever I correct this problem then again after 2 or 3 days my website hacked.
And whenever my website hacked they write about it in hacker forums, and now they are betting on my website for hacking.
Please any senior php developer tell me what should I do in my php code so that they cannot hacked my website.

Matthew1980

6:58 pm on May 8, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there Knowledge seeker,

Firstly, are you making sure that you have protection against any user submitted as this is usually the source of hacking attempts. The use of: mysql_real_escape_string(); strip_tags(); and htmlentities(); are a few good functions to use to sanitise data that is posted via forms and/or used in conjunction with sql queries.

Secondly, have you checked over your database to see if there is any "unusual" data, especially if you are calling your index/home page from a table etc.

I think though that sanitising the data will save you headaches like this in future.

Hope this helps :)

Cheers,
MRb

dreamcatcher

10:36 pm on May 8, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, good advice Matthew1980 :)

Also, is your website on a shared hosting server? If so, are you sure it was your website that got hacked and its not some invulnerability with someone else`s website thats affecting all sites on the same server?

dc