Yeah sql injection is something I always look for. If ' " ` and such are escapped properly I'm pretty much safe right? or is there more to it? What I normally do is right off the bat I convert those chars to their html counterparts, so " becomes " and so on. I'm thinking it was some kind of upload script I got hit by, even though most if all, check against file type, maybe they found a way to circumvent it. The folders that did have stuff in them were also chmodded 777, so thats one thing to watch for, though some simply require it. (upload scripts or scripts that work with files) but I converted this ancient shout box script to use mysql, so its one folder less to have set at 777.
I'm also big on server side validation of submitted data. Just because the client side form constraints the user, does not mean the http post packet can't be sent without the form.
I've also retired using ftp completely, I'm using only sftp now. I rarely login to cpanel so that way I don't have to send my password in clear text. Though I don't think this is how I got hacked. Sniffing someone's packets is not as easy as it sounds, you still need to be able to branch on their data stream somehow and with everything going into multiplexed fiber/copper its kind of hard to pick a single stream.