How can a hacker put a file on my server root (apache, php, 1and1)

Posted by mike-sav on Stack Overflow See other posts from Stack Overflow or by mike-sav
Published on 2010-04-20T07:57:31Z Indexed on 2010/04/20 8:03 UTC
Read the original article Hit count: 290

Filed under:
|
|

Hi there, I have a site hosted on 1and1 and a couple of weeks ago I noticed a hacker had put a .php file on the server that when viewed in a browser exposed my DB schema, DB connection strings, FTP account (for file uploads using a form), etc, etc. Naturally I panicked and I wiped the server and reuploaded my files. Fortunatley I encrypt passwords using MD5 and I don't store things like credit card details, etc, etc.

Now I checked my files and with all user input I use a clean function (htmlentities, sql_real_escape_string, etc, etc) that strips the input of any XSS or SQL injection. I have also made sure that the session key gets re-engineered when a user status changes (like they log into their account) to prevent session hijacking, my folder permissions are set to 755 and file permission are 644.

Has anyone got any idea how this could have happened? Or if I'm missing something

© Stack Overflow or respective owner

Related posts about apache

Related posts about php