Bash Script for remove SHV5 rootkit

Bash Script for remove SHV5 rootkit Requirements : Debian apt-get with working sources root access CentOS : yum with wor...

Bash Script for remove SHV5 rootkit

Requirements :
Debian
apt-get with working sources
root access

CentOS :
yum with working rpm’s
root access

Download [at] http://blog.evilcoder.net/shv5-rootkit-remover/#sthash.0GdClqnw.dpuf Or Here
========================================================
#!/bin/bash
echo "SHV Rootkit checker by alex [at] evilcoder.net"
if [ $# -ne 1 ]
then
        echo "This is a SHV5 rootkit remover"
        echo "This script is released as it is and i can't be held responsable for any damages"
        echo "This script has been tested on Debian , Ubuntu and CentOS servers "
        echo "You must agree with that"
        echo "Usage : $0 yes"
        exit 1
fi
if [ "$1" != "yes" ];
then
echo "You should agree"
exit 1
elif [ "$1" == "yes" ];
then
echo "Thanks"
fi
#checking Linux type
OS=`cat /etc/issue|cut -d " " -f 1 | head -1`
if [ -d "/usr/lib/libsh" ];
then
        echo "We have SHV rootkit"
else
        echo "You don't have shv5 installed"
        exit 1
fi
echo "System Check"
if [ "$OS" == "Debian" ];
then
        echo "We have Debian"
        echo "Removing immutable from infected files"
chattr -sia /bin/dir
chattr -sia /usr/bin/find
chattr -sia /sbin/ifconfig
chattr -sia /bin/ls
chattr -sia /usr/bin/lsof
chattr -sia /usr/bin/md5sum
chattr -sia /bin/netstat
chattr -sia /bin/ps
chattr -sia /usr/bin/pstree
chattr -sia /usr/bin/top
chattr -sia /lib/libsh.so
chattr -sia /usr/lib/libsh
chattr -sia /usr/lib/libsh/*
chattr -sia /etc/sh.conf
chattr -sia /sbin/ttymon
chattr -sia /sbin/ttyload
echo "Deleting rootkit folders"
rm -rf /lib/libsh.so
rm -rf /usr/lib/libsh/
rm -rf /etc/sh.conf
rm -rf /sbin/ttyload
rm -rf /sbin/ttymon
echo "Reinstall new files"
apt-get update >>/dev/null
apt-get -y install --reinstall coreutils binutils net-tools psmisc lsof procps findutils >>/dev/null
echo "Killing Rootkit"
killall -9 ttymon
echo "You should reboot to finish cleaning"
elif [ "$OS" == "Ubuntu" ];then
echo "We have Ubuntu"
echo "Removing immutable from Ubuntu known infected files"
chattr -sia /bin/dir
chattr -sia /usr/bin/find
chattr -sia /sbin/ifconfig
chattr -sia /bin/ls
chattr -sia /usr/bin/lsof
chattr -sia /usr/bin/md5sum
chattr -sia /bin/netstat
chattr -sia /bin/ps
chattr -sia /usr/bin/pstree
chattr -sia /usr/bin/top
chattr -sia /lib/libsh.so
chattr -sia /usr/lib/libsh
chattr -sia /usr/lib/libsh/*
chattr -sia /etc/sh.conf
chattr -sia /sbin/ttymon
chattr -sia /sbin/ttyload
echo "Deleting rootkit folders"
rm -rf /lib/libsh.so
rm -rf /usr/lib/libsh/
rm -rf /etc/sh.conf
rm -rf /sbin/ttyload
rm -rf /sbin/ttymon
echo "Reinstall new files"
apt-get update >>/dev/null
apt-get -y install --reinstall coreutils binutils net-tools psmisc lsof procps findutils >>/dev/null
echo "Killing Rootkit"
killall -9 ttymon
echo "You should reboot to finish cleaning"
elif [ "$OS" == "CentOS" ];then
echo "We got CentOS"
echo "Removing immutable flag from CentOS known infected files"
chattr -sia /usr/bin/dir
chattr -sia /usr/bin/find
chattr -sia /sbin/ifconfig
chattr -sia /bin/ls
chattr -sia /usr/sbin/lsof
chattr -sia /usr/bin/md5sum
chattr -sia /bin/netstat
chattr -sia /bin/ps
chattr -sia /usr/bin/pstree
chattr -sia /usr/bin/top
chattr -sia /lib/libsh.so
chattr -sia /usr/lib/libsh
chattr -sia /usr/lib/libsh/*
chattr -sia /etc/sh.conf
chattr -sia /sbin/ttymon
chattr -sia /sbin/ttyload
echo "Deleting rootkit folders"
rm -rf /lib/libsh.so
rm -rf /usr/lib/libsh/
rm -rf /etc/sh.conf
rm -rf /sbin/ttyload
rm -rf /sbin/ttymon
echo "Reinstall new files"
yum -y reinstall coreutils binutils net-tools psmisc lsof procps findutils >>/dev/null
echo "Killing Rootkit"
killall -9 ttymon
echo "You should reboot to finish cleaning"
fi
fi
========================================================

Source from this Link

COMMENTS

Name

Android,5,Apache,3,Bash Scripting,5,Bot,1,Centos,12,Cisco,5,GNS3,1,Hacking,5,internet marketing,1,Mikrotik,4,Monitoring,2,Nginx,2,Paket Tracer,2,Squid Proxy,2,Tips And Tricks,1,Virtualization,1,Webmin,2,Webserver,4,
ltr
item
Berbagi Itu Indah: Bash Script for remove SHV5 rootkit
Bash Script for remove SHV5 rootkit
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWbT6Acg74EntjTYu8kmgufQdn4xvxrUbq56VQ9VZ6r9nrJLxKICZs29pMmWNfcUhw3AN8LYt7-IYPAfjvKDXyUwKh6bZGYAMqG_MSn9a3lV_uwRTkIWEvPo4AaMtYmXODZXfKDdGVA8Es/s400/rootkit.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWbT6Acg74EntjTYu8kmgufQdn4xvxrUbq56VQ9VZ6r9nrJLxKICZs29pMmWNfcUhw3AN8LYt7-IYPAfjvKDXyUwKh6bZGYAMqG_MSn9a3lV_uwRTkIWEvPo4AaMtYmXODZXfKDdGVA8Es/s72-c/rootkit.png
Berbagi Itu Indah
https://wahyubud.blogspot.com/2013/11/bash-script-for-remove-shv5-rootkit.html
https://wahyubud.blogspot.com/
https://wahyubud.blogspot.com/
https://wahyubud.blogspot.com/2013/11/bash-script-for-remove-shv5-rootkit.html
true
4332986676755765585
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy