I recently had a discussion with a Partner NOC and they were discussing how they sometimes need to go into their customers' unmanaged servers to clean up the remains of a security breach caused by users running outdated website software.
The issue
While proactive measures exist such as using something like cPAddons/Site Software or a third party utility that permits forced upgrading of outdated website software, since these are customers' unmanaged servers, such proactive measures are often out of their hands.
What happens is a vulnerable (often outdated) website script will be compromised and a shell is uploaded, and by looking at the directories in /home or using other methods, they can determine the usernames of users on that server. They would then use a URL like the following to propagate the attack:
http://(domain of compromised website)/~(username)/(attack URL)
This can be prevented by enabling mod_userdir protection, but the Partner NOC often is compelled to clean up the mess regardless of how server admins configure their cPanel&WHM servers. Keep in mind, SuPHP and SuExec, while it prevents one account from accessing another account, does not prevent a script running on another computer from calling any URL it wants.
Often, there are indicators in the SSH, mail and other logs that clearly indicate an attack is underway. While tools such as the free third party utility ConfigServer Security & Firewall exist to proactively combat these issues including by means of monitoring logs for suspicious activity and preemptively banning such IPs, again the servers are outside the control of the Partner NOC so such proactive measures are deemed impractical since these are unmanaged servers.
One suggestion
This Partner NOC suggested adding an option to WHM's Password Modification screen to indicate that an account has been compromised. This would somehow produce information based on how that account was compromised including:
- Check the last logs to see when unrecognized IPs initially got into SSH
- Use find -mtime to discover what they changed/created/etc.
- Check for SSH keys
- Check if they added FrontPage Authorization
- Look at the Apache error logs for other sites they have attacked
- Analyze the error codes in the Apache error log to reflect what they may have successfully hit
- Analyze the secure.log and cPanel logs to see if they ever logged into the accounts' cPanel or WHM interfaces
Ultimately, scanning this list of items could help reduce re-infections and missed infections.



LinkBack URL
About LinkBacks
Reply With Quote





