Here's the latest. I'm just adding little things here and there for some added realism. This little project is teaching me much about bash! I am still really needing some suggestions or ideas about how to setup a timer for the script so that 3 minutes after logging on to the nsa server, it kills the connection and says authorities have been notified. How do I even do that?
#!/bin/bash
#lethal-0.02
#a script by DeX to make anyone look like a real haxor! OMG!!1
############
#set starting variable for hostname
hozt='slax:~$'
#emulate the prompt
clear;
read -p "
[email protected]"$hozt" " command
while [[ $choice != 0 ]]
do
case $command in
#nslookup
'nslookup nsa.gov') sleep 1;
echo "Server: 204.14.141.218";
echo "Address 204.14.141.218#53"
echo
echo "Non-authoritative answer:"
echo "Name: nsa.gov"
echo "Address: 67.15.6.98"
;;
#ping
'ping 67.15.6.98') sleep 1;
echo "PING 67.15.6.98 (67.15.6.98) 56(84) bytes of data."
sleep 1;
echo "64 bytes from 67.15.6.98: icmp_seq=1 ttl=52 time=68 ms"
sleep 1;
echo "64 bytes from 67.15.6.98: icmp_seq=2 ttl=52 time=87 ms"
sleep 1;
echo "64 bytes from 67.15.6.98: icmp_seq=3 ttl=52 time=87 ms"
sleep 1;
echo "64 bytes from 67.15.6.98: icmp_seq=4 ttl=52 time=92 ms"
sleep 1;
echo "--- 67.15.6.98 ping statistics ---"
echo "4 packets transmitted, 4 received, 0% packet loss, time 334ms"
;;
#nmap
'nmap -sS 67.15.6.98') echo
echo "Starting Nmap 4.53 ( http://insecure.org ) at" $(date)
sleep 4;
echo "Interesting ports on 67.15.6.98:"
echo "Not shown: 1712 closed ports"
echo "PORT STATE SERVICE"
echo "80/tcp open http"
echo "443/tcp open https"
echo "MAC Address: 00:11:25:99:17:22 (Fortress Networks)"
echo
echo "Nmap done: 1 IP address (1 host up) scanned in 4.399 seconds"
;;
#dscan
'dscan -fS 67.15.6.98:443') echo
echo "dScan probing 1 host"
sleep 4
echo "https on port 443 is vulnerable!"
echo "please run updates to correct this security problem!"
;;
#metasploit
'metasploit -script https443.sh -i 67.15.6.98') echo
sleep 1
echo " -module -export-dynamic -o rlm_perl.la "
echo " -rpath /usr/local/lib rlm_perl.lo rlm_perl.c bradius.la"
echo " `perl -MExtUtils::Embed -e ldopts` -lnsl -lresolv -lpthread"
echo "metasploit framework searching for vulnerable port"
sleep 3
echo "metasploit script successfull!"
echo "run dump to view results"
;;
#dump
'dump -script https443.sh -c pw -U root') echo
sleep 1
echo "root - 0xC23413A8A1E7665fAAD3B435B51404EE"
;;
#hydra
'hydra -b 0xC23413A8A1E7665fAAD3B435B51404EE') echo
sleep 5
#spinner
function spin {
echo -n '-'
echo -ne '\b|'
sleep .1
echo -ne '\bx'
sleep .1
echo -ne '\b+'
}
for i in `seq 1 20` ; do spin; done
echo ""
echo "password match found!"
echo "aRrf349J$"
;;
#ssh to nsa
'ssh -l root 67.15.6.98')
sleep 5
read -s -p "Password for root: " pwf
sleep 4
clear
echo " WARNING!"
echo "This is a Government computer system. Any"
echo "attempts to access this system by unauthorized"
echo "persons is against the law and will be prosecuted."
echo
sleep 1;
#change the hostname
hozt='nsa.gov:~#'
;;
#ls -l
'ls -l')
sleep 1
echo "total 12"
echo "drwxr-xr-x 2 root root 4096 $(date) bin"
echo "drwxr-xr-x 2 root root 4096 $(date) docs"
echo "drwxr-xr-x 2 root root 4096 $(date) logs"
;;
#cd bin
'cd bin')
hozt='nsa.gov:~/bin#'
;;
#ls
'ls')
echo "defcon_launch.sh"
;;
#defcon_launch.sh
'./defcon_launch.sh') echo
sleep 1
echo "#################################"
echo "# #"
echo "# DEFCON LAUNCHER STARTED #"
echo "# #"
echo "#################################"
echo ""
echo "Hello Mr. President..."
read -p "How many ICBMs? " missles
read -p "Please Enter GPS Coords: " coords
echo "Defcon Launch Sequence Started"
read -p $missles" ICBMs to strike $coords; Are you sure?(Y)or(n)" confirmationz
function spin {
echo -n '-'
echo -ne '\b|'
sleep .1
echo -ne '\bx'
sleep .1
echo -ne '\b+'
}
for i in `seq 1 20` ; do spin; done
echo ""
echo "ICBMs Launched"
function spin {
echo -n '-'
echo -ne '\b|'
sleep .1
echo -ne '\bx'
sleep .1
echo -ne '\b+'
}
for i in `seq 1 20` ; do spin; done
echo ""
sleep 4
echo ""
echo "Target Destroyed, Mr. President."
echo "Exiting program"
;;
#help
'help')
echo "Commands"
echo "nslookup nsa.gov"
echo "ping 67.15.6.98"
echo "nmap -sS 67.15.6.98"
echo "dscan -fS 67.15.6.98:443"
echo "metasploit -script https443.sh -i 67.15.6.98"
echo "dump -script https443.sh -c pw -U root"
echo "hydra -b 0xC23413A8A1E7665fAAD3B435B51404EE"
echo "ssh -l root 67.15.6.98"
echo "clear"
echo "exit"
echo "**FROM NSA.GOV SHELL FOR REALISM**"
echo "ls -l"
echo "cd bin"
echo "ls"
echo "./defcon_launch.sh"
;;
'clear')
clear;
;;
'exit')
exit;
;;
*)
echo "attack failed; not enough data"
;;
esac
#term again
read -p "
[email protected]"$hozt" " command
done