I want to ask something about server that has been compromised. Recently, one of my VPS server has been hacked and the attacker install somekind like "IRC" script.
Everytime I killed the process or close the port, it can open again .. and again ..I'm sure the attacker has installed something like a hidden script. I hv using tool like Rootkit Hunter and find each of the suspicious result.
It really makes me crazy and pain. How can he/she go into my server (as a root) even I have changed the root password.
Hi,
There are some ways to enter a compromised system even if you have changed the root password. Probably the hacker has modified the system, so he can enter without being asked a password.
Your best bet to solve the problem is backup everything valuable and get a new server installed. The only way I know of investigating a compromised server that can lead anywhere is taking it offline to avoid more interference from the hacker.
Think that probably the hacker is inside your system and you could not detect it.
All the tools like rkhunter tell you to not relay only on them. And they are good for detection, but they don't serve for more than that.
Hope you get it solved
jmanel
Is there any possibility I can secure my VPS server without re-install ? Since it has many webhost domain in it and each has huge database for more than 5 years.
You are right, using RKHunter has no effect at all, except just giving any vulnerabilities information.
Today, I was trying again to clean my server from any malicious IRC script, such as:
- Closing port (113,6667,7000)
- Trace process and kill it
- Remove the IRC script files
- Lock any user account that has been compromised, also change my root password
- Give no shell access to all accounts, only root & mysql have /bin/bash
- Scan multiple times with RKHunter and ClamAV to make sure there's no left over malicious files & security hole
- Restrict SSH access to only from spesific IP Address and also disable Authentication Key
- Chmod all domain host directory to 700, set subdirectory to be 755, and only images folder has 777 file permissions. Other files only has 644 file permission.
- Update Centos 5 with yum, almost every day.
I did that procedures above all day long, but after several hours later, in my /root there appears again malicious IRC files with uid and gid 1000. It really makes me pain .. how can the attacker enter my server. I guess he did "rooting" my server.
Did the attacker exploit the /tmp or /dev. I dont know.
Please anyone, whoever expert in Linux security help me on this case.
Is there any possibility I can secure my VPS server without re-install ? Since it has many webhost domain in it and each has huge database for more than 5 years.
If you have full-backups made, restore to a good one. Otherwise... how could you possibly trust it's not doing anything behind your back?
@Corona.
If it means about full backup of each domain in /home, no I didnt make any backup. Disk space is limited and no additional disk. Last option maybey I should request OS restore to the hosting provider(?).
I was doing deep analyze of this attack for several days, and I guess my server has been turned to be one of botnet in the internet for several months or maybey in a year.
One thing that makes me confuse. I have locked the domain account that might be has been compromised, after doing the procedures above, how can the attacker create multiple processes and open port 6667,7000 with that locked account name and established connection to xxx.IRC.dal.net?
@Neo.
Thanks for your suggestion. I'll learn about that tripwire technique.
But, do you have any idea about how the attacker compromised my server?
# Additional information.
Here I give part of command history left by the attacker in last days.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
I think it is more important to determine what are your key apps on the server; then back them up if you think they are not compromised and rebuild the VPS server from scratch; and reinstall your app.
You should also make sure your file system is secure based on the apps that are running, and run a cryptographic file system management tool (tripwire or some other version of the same thing) immediately to get a baseline.
What you have failed to mention is the core production app that is running on the server. Is it a web server? A mail server? A database back end?
It is really not possible to help you if you are not specific about what is "core app" and what is "supporting files". The reason is that you need to rebuild your file system from scratch to be perfectly safe. However, there may be some files you need (database, web files) that are not compromised and you can just back them up, reinstall the system (the supporting file system) and then get the main act up and running.
But the exact strategy is based on what is the main core application running on the server.
Hi everyone,
I hope I am posting in the right spot and I really need some help. I am going through a horrible divorce and I am afraid that my husband has compromised . He set up my mac computer and router and for my job set up remote access for me. I caught him cheating on me and I think he... (6 Replies)
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A.
Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server).
We dont have RSA key... (4 Replies)
Hi ,
Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file.
We want to copy a file on multiple servers and run the installation.
Thanks (1 Reply)
I need to connect to a ftp server-1 from linux server-2 and copy/get a file from server-1 which follows a name pattern of FILENAME* (located on the root directory) and copy on a directory on server-2. Later, I have to use this file for ETL loading... For this I tried using as below
/usr/bin/ftp... (8 Replies)
Dear Friends,
Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field.
Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task... (8 Replies)
Hi All,
I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible.
I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Hello!
I have a Linux nfs server (called server100 below) with a export nfs. My problem is that the Solaris client (called client100 below) doesn't seems to like it. In the Solaris syslog I got following messages (and after a while the solaris client behave liked its hanged/to buzy). Also see... (3 Replies)
/* Linux Slackware */
looking in my logs I see tons of entries similar to below. Does anyone know what these mean, and should I be concerned. I looked up a few of the IP's at Arin.net and saw that many of them belong to isp's (not good).. Any information is helpful..
Body of Messages log... (1 Reply)