|
|||
|
Server compromised, concerns...
Had a server compromised earlier today. I'm just in the process of copying the cpanel accounts to a different server as we speak.
What concerns me is that all our servers are configured identically, always kept up to date and looked after properly. I've been running my hosting business for 7 years now and this is the first time we've ever had a root exploit. An account with a dodgy Joomla module was compromised - a backdoor script copied to /tmp. This was picked up straight away, deleted and the account suspended. Scripts in /tmp cant be executed so they couldnt have run it. So I thought I'd resolved it. Nope. Later on we started getting support tickets from customers - their index pages were being changed - the hacker leaving his little message on any index.* page on the whole server. This can only have been done via a root exploit of some kind. rkhunter found parts of two rootkits as a result of this incident - but everything else was fine. I have no idea how this happened and I'm worried for our other servers because, as I said, they are all the same. I admit - I've been a bit slack lately in keping the kernels up to date and have now updated all servers - but if this exploit is something else I'm probably screwed. Can anyone recommend a good server security service that doesnt cost too much? I'd like to have all our servers checked by an expert. Last edited by 4u123; 11-27-2009 at 02:16 PM. |
|
||||
|
Are you using suPHP Apache module (mod_suphp) on your servers ?
You can ask for help in the Server Management and Server Repair Forum Thanks,
__________________
Serversignature.com - Professional Linux Consulting. |
|
|||
|
Try Chirpy:
ConfigServer Server Services |
|
|||
|
Hi guys, yes I'm using suphp on all our servers. I identified the compromised account very quickly and suspended it as mentioned above. The hacker somehow managed to change all index pages in any directory on the server by using some kind of root exploit. Thats what I'm worried about - not the fact that a customers account was used. Normally, if a customers PHP script is hacked, the hacker can only change files that the account's userid is allowed to change - so its not a major issue. But today they managed to access any part of the server they wanted. Any scripts that are copied into /tmp cant be executed so I have no idea how they managed to install a rootkit.
I did actually speak to configserver but they didnt seem to understand my request. The person I spoke to thought I was asking them to identify which customers script was compromised and like you, asked if I was using suphp but I was asking them to take a look at the server and find out how the hacker managed to get higher access. Unfortunately I think I spoke to a junior member of staff who didnt understand my situation. I was told that they didnt provide that kind of service. |
|
||||
|
You saw this one then I take it?
ConfigServer Anti-Spammer/Exploit Service |
|
|||
|
Quote:
Quote:
Last edited by 4u123; 11-27-2009 at 07:36 PM. |
|
||||
|
try to get this info, run this commands as root
/usr/local/cpanel/cpanel -V cat /etc/redhat-release uname -r Mod_security -- Do you have it installed ? mod_security works for apache only, does not work for whm.
__________________
Serversignature.com - Professional Linux Consulting. |
|
|||
|
cpanel version is 11.24.5-RELEASE_38506
OS is centos 4.8 Yes mod_security was installed although the rules were a couple of months old. Kernel was 2.6.9-78.0.22 which was about 4 months out of date but doesnt contain any known security issues. Last edited by 4u123; 11-28-2009 at 03:19 AM. |
|
|||
|
In the underground there are many zero day exploits and unpublished exploits. Finding exactly how they gained access can be extremely difficult since most hackers erase all their tracks or try to.
It sounds like they used a script vulnerability to gain shell access then tried hitting your server with rookits and 0 day exploits. My suggestion is to keep your system updated and use layers of security. Firewall suphp mod_security upload guardian clamav Also having directories like /tmp locked and restricted access to binaries like wget can help a ton. Steve
__________________
Upload Guardian 2.0 - Sign up for our early beta ServerProgress - Server security, consulting and assistance |
|
|||
|
The 2.6.9-78.0.22 kernel was released back in May. I know in August there was a pretty nasty kernel vulnerability that was discovered. I'm not sure if there are any exploits for this vulnerability floating around, but chances are it was a kernel vulnerability or some other vulnerability on the server that allowed the user to gain root on the server.
I would recommend having the server reimaged and restore the accounts from backups. |
|
|||
|
Quote:
In fact, the vast majority of "experts" out there are totally and completely unaware of the real potential threats against your server which unfortunately continue to evolve and expand everyday as more exploits are discovered and more creative ways are devised to attack the servers. It's not really surprising that you got a hacking situation. The real question is what you are going to do about it and are you going to take action to prevent the same thing from reoccurring again? Quote:
There is several new exploits in the wild the past week that has kept me psychotically busy the past few days with clients all over the world as I'm right at the top of the call list for most data centers and many hosts particularly where it comes to security but I'll squeeze you into my schedule if you would like me to take a look. Regarding your side mention of the I-Frame/Index hacks, I can give you the ability to detect those and take action on those kind of attacks instantly even while the hacker is still connected; Plus, got a lot of other security related technologies that could be of great benefit for you. Oh and to the following comment .... Quote:
Anyway, like I said -- got you covered. You just need to contact me. Private Message is fine though my schedule doesn't always allow me to watch forums closely.
__________________
[b][color="Blue"]Server Support[/color]: [color="Red"]Server consulting, security, and management![/color][/b] Last edited by Spiral; 12-02-2009 at 11:14 PM. |
|
||||
|
You can also check JoneSolutions.Com - Services, Server Management, Security and Stability we are more than 4 years with Jones with more than 35 servers and never had any root exploit.
|
|
|||
|
Quote:
#1. Do not install, reinstall or delete anything from that drive #2. List the current open files, lsof, current processes, ps aux, current open ports netstat -anpe #3. Pull the power cord out from the box (if possible or have the data center do it) #4. Notify all your users that there has been a compromise, notify your provider if necessary. #5. Make a forensic image of the drive (or have the data center do it) using the unix dd command, set the original drive in a safe place and ensure you maintain a chain of custody on it. #6. Go through the logs you have from Chkrootkit / Rootkit Hunter / Aide / Samhain / Snort / Integrit / Osiris or tripwire, if the logs are on the drive itself look at them on the image your made. #7. Review the image of the compromised drive, was the OS/kernel current? Were all the packages up to date? What was in the world writeable directories like /tmp, /var/tmp, /dev/shm, what services were running on the drive, what was the version of php, perl, etc. #8. Look at the logs files and logrotated files such as wtmp, secure, messages, firewall logs setuid files, user shell histories, yum logs. #9. Document any hints, hunches, or gut feeling you have on the the box was hacked. #10. Only after your investigation and developing a plan to keep the box more secure should you install the OS on the new drive (the compromised drive should still be in a safe place) and only the user home data should be restore, and chowned to the user’s username, prior to the server being live on the internet again. #11. Contact other parties, such as law enforcement if appropriate. |
|
|||
|
I would help you but I am fully booked right now and currently not taking any new clients.
|
|
|||
|
Quote:
Understand, however, that it's not always possible to determine how a box gets popped, so don't expect a completely detailed explanation. Not keeping your kernel updated? Expect to find yourself in this situation again and again. Quote:
Good luck. If you figure out how the box was owned, feel free to update this thread.
__________________
Last edited by jpetersen; 11-30-2009 at 01:17 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Server Compromised? | keykurt | cPanel Newbies | 2 | 01-02-2007 05:57 PM |
| Server Compromised | iisnet | cPanel and WHM Discussions | 4 | 12-27-2004 11:17 AM |
| Compromised Server | mygregory | cPanel and WHM Discussions | 9 | 05-31-2004 06:39 AM |
| Our server was compromised | simonlee | cPanel and WHM Discussions | 4 | 10-23-2003 07:20 PM |
| Squirrelmail + security concerns with cPanels using UW Imap Server! | sexy_guy | cPanel and WHM Discussions | 2 | 05-02-2003 03:28 PM |