Re: Can someone translate this script? (malicious script)
Your friend's hosting provider is quite correct - I would most probably do the same if I owned the server.
Removing the code from the list of files your provider has given you is step 1, sure, but that doesn't do anything to block the security holes in your friend's site (which are his responsibility to fix - the hosting provider can't be expected to read through all your friend's PHP code and provide security assessments! I would have thought the file lists they provided were generated automatically.)
As it stands, the attacker can simply replicate exactly what they did last time and achieve the same effect. And the result of what the attacker does is (most probably) that innocent people visiting your site will have their PCs infected with malware/viruses/trojans that may well result in data loss, identity theft, fraudulent bank use, etc. etc.
I don't mean to be harsh, but placing code on the web comes with a certain level of responsibility. The fact that your friend may not understand SQL injection, for example, doesn't help the people being silently infected (running Windows ). Installing a Wordpress blog is fine; that code is reviewed by loads of people, and so long as you keep updating it regularly you should be fine. You need to be careful with your own server-side code though (PHP/Perl/ASP/etc).
The very first rule with web design is to completely, entirely & comprehensively sanitise every bit of input to your server side scripts that could conceivably be altered by a unscrupulous user.
If either of you are a bit rusty on web design/web security, I'd say it's imperative to read through a summary. I haven't looked, but I'd guess the Hardening Wordpress link posted by ankspo71 above is reasonable - such guides usually give a good overview of what you should be checking (after all, it's in the interests of the authors of the guides to be as comprehensive as possible).
Good luck, and happy code reviewing
Ace1 FreeBSD/Gnome 2, i5 2300, 16GB, HX750W, 20TB ZFS pool, 60GB SSD, Fractal Design XL
Ace2 Ubuntu/Xubuntu, i7 2600, 16GB, HX850W, 4TB, Asus HD6970, Fractal Design R3
Ace3 Ubuntu/XFCE, E7200, 4GB, OCZ GameXStream 700W, 8TB
Bookmarks